Skip to content

Self-Evolution System

PRX includes a 3-layer self-evolution system that enables agents to autonomously improve their behavior over time. The system continuously analyzes agent performance and applies graduated improvements -- from memory optimization to prompt tuning to strategic policy changes.

Overview

Self-evolution is organized into three layers, each operating at a different level of abstraction:

LayerScopeFrequencyRisk
L1: MemoryMemory compaction, topic clusteringEvery sessionLow
L2: PromptSystem prompt optimization, A/B testingDaily/weeklyMedium
L3: StrategyTool policies, routing rules, governanceWeekly/monthlyHigh

Architecture

┌───────────────────────────────────────┐
│         Self-Evolution Engine          │
│                                        │
│  L3: Strategy    ← Low frequency       │
│    ├── Tool policy tuning              │
│    ├── Routing optimization            │
│    └── Governance adjustments          │
│                                        │
│  L2: Prompt      ← Medium frequency    │
│    ├── System prompt refinement        │
│    └── A/B testing framework           │
│                                        │
│  L1: Memory      ← High frequency      │
│    ├── Memory compaction               │
│    └── Topic clustering                │
└───────────────────────────────────────┘

Safety First

Every evolution proposal passes through a safety pipeline before execution. See Safety for details on rollback protection and sanity checks.

Configuration

toml
[self_evolution]
enabled = false  # opt-in only
auto_apply = false  # require manual approval by default

[self_evolution.l1]
enabled = true
schedule = "after_session"

[self_evolution.l2]
enabled = false
schedule = "weekly"

[self_evolution.l3]
enabled = false
schedule = "monthly"
require_approval = true

Released under the Apache-2.0 License.