How an agent learns from its mistakes experiences.
The Persistent Agent Framework isn't a chatbot. It's a persistence layer that transforms stateless AI sessions into agents that accumulate knowledge and write their own behavioral rules.
Identity Layer
The Boot Sequence
File-Based Identity
Every session starts with a clean slate. The agent reconstructs its identity by reading its core files. This is the Boot Context.
These files provide stable, predictable behavior. Total boot context is kept under 15% of the token window.
Database Directives
While files provide stable rules, the database provides evolved behavior.
Directives earned through making mistakes carry more behavioral weight than static instructions. The agent's personality literally evolves from its failures.
Memory Layer
Hybrid Context Loading
Not all memories are created equal. The framework uses a two-pronged approach to populate the agent's context for any given task: Importance vs. Similarity.
A nightly job vectorizes un-embedded entries using a local Ollama model (no API costs).
Signal Tracing
The Ledger & The Core Innovation
Standard "mistake logs" are shallow. They record what went wrong, but rarely why. PAF introduces Signal Tracing to force deep behavioral correction.
Generic Mistake Log
PAF Signal Trace
By tracing the exact misread signal, the agent learns how it failed to interpret intent, leading to robust rules rather than surface-level band-aids.
Directive Promotion
The agent writes its own rules.
A single mistake is an anomaly. Three mistakes form a pattern. The framework uses an automated pipeline to escalate recurring issues into strict constitutional rules.
Mistake Logged
Initial entry created in agent_ledger.
Pattern Repeated
Auto-remediation daemon detects recurrence.
Auto-Promoted to Directive
Generated from ledger entries and injected into `agent_soul` (database) with priority 3.
Manual Consolidation to SOUL.md
Once proven highly effective across sessions, the operator consolidates auto-directives into the core static identity files, cementing the behavior permanently.
Multi-Terminal Continuity
One agent, many hands.
Using the log-activity.sh and read-activity.sh hooks, the framework creates real-time awareness between independent terminals.
When a tool fires in Terminal A, Terminal B sees a summary of that activity on the next user prompt. Shared database, shared memory, shared awareness.