Skip to content

Commit 6e0f794

Browse files
committed
docs: update memory architecture documentation and expand goal system specifications in README
1 parent ff165f7 commit 6e0f794

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,16 @@ Analyze local images directly in the conversation:
142142
* Automatic MIME type detection and size limits.
143143
* Integrated with the vision-LLM pipeline.
144144

145-
## 🧠 Advanced Memory
145+
## 🧠 Advanced Memory Architecture
146146

147-
Sofia has a multi-layered memory architecture:
147+
Sofia uses a highly modular, multi-layered SQLite-backed memory architecture, decomposed into domain-specific components for maximum scalability and targeted retrieval:
148148

149-
* **Semantic Memory (Knowledge Graph):** Structured facts, entities, and relationships stored as nodes and edges. The `knowledge_graph` tool allows the agent to add, search, and delete knowledge.
150-
* **Memory Consolidation:** `MemoryConsolidator` merges duplicate nodes and resolves conflicting relationships — keeping the knowledge graph clean automatically.
151-
* **Strategic Forgetting:** `MemoryPruner` calculates a survival score based on access frequency and time since last access. Nodes below a threshold are discarded.
152-
* **Self-Evolving Memory:** All accesses are tracked via `RecordStat`, driving both consolidation and pruning based on actual usage patterns.
149+
* **Sessions Context (`db_sessions.go`):** Manages conversational history, rolling context windows, and channel-specific session isolation.
150+
* **Semantic Knowledge Graph (`db_semantic_*.go`):** Structured facts, entities, and relationships stored as nodes and edges. Includes `MemoryConsolidator` for deduplication and `MemoryPruner` for strategic forgetting based on access usage records (`RecordStat`). Includes the `knowledge_graph` tool.
151+
* **Freeform Notes (`db_notes.go`):** Unstructured, indexed scratchpad notes for flexible, text-based memory recall.
152+
* **Agent Reflections (`db_reflections.go`):** Stores structured post-task evaluations and meta-learning matrices for continuous self-improvement.
153+
* **Observability & State (`db_traces.go`, `db_checkpoints.go`):** Records execution traces (LLM spans, tool usage) for distributed observability, alongside agent loop checkpoints for safe rollback capabilities.
154+
* **Autonomous Goals (`db_goals.go`):** Dedicated persistence layer for long-term objectives across sessions.
153155

154156
## 🔄 Self-Reflection & Self-Improvement
155157

@@ -167,7 +169,11 @@ Sofia evaluates herself after every task and improves continuously:
167169

168170
Sofia can act independently without user initiation:
169171

170-
* **Long-Term Goals:** The `manage_goals` tool creates and tracks goals that persist across sessions. Active goals are automatically injected into the agent's context.
172+
* **Long-Term Goals System:** Sofia autonomously pursues complex, multi-step objectives across sessions using a robust Goal Engine via the `manage_goals` tool.
173+
* **Phased Lifecycle:** Goals transition through structured phases: `Specify` (defining parameters), `Plan` (breaking down tasks), `Implement` (executing work), and `Completed`.
174+
* **Rigorous Specifications:** Active goals retain a structural `GoalSpec`, outlining strict requirements, success criteria, context, and operational constraints.
175+
* **Structured Results:** Upon completion, a `GoalResult` captures the outcome summary, produced artifacts, actionable next steps, unmet criteria, and evaluation evidence.
176+
* **Automatic Injection:** Active, high-priority goals are dynamically inserted into the agent's runtime context for immediate focus.
171177
* **Context-Aware Triggers:** The `manage_triggers` tool creates conditional actions that trigger based on user conversational context.
172178
* **Proactive Suggestions:** `AutonomyService` periodically analyzes recent activity and generates unsolicited suggestions when deemed valuable.
173179
* **Autonomous Research:** Identifies knowledge gaps and independently initiates research on relevant topics.

0 commit comments

Comments
 (0)