[P] I built an open cognitive architecture for Android that maintains persistent beliefs, doubts, and goals across conversations. 13-section reasoning pipeline, local knowledge graph, flat cost at scale. Free.
Local cognitive architecture maintains beliefs and goals across conversations with flat API costs at scale.
A developer has released The Orchard, an open cognitive architecture for Android that solves the persistent problem of stateless AI conversations. Unlike standard chatbots that forget everything between sessions, this system maintains beliefs, doubts, and goals across conversations through a local SQLite database that never leaves the device. The architecture wraps any LLM provider (Anthropic, OpenAI, Google, or local models via Ollama/OpenRouter) in a structured 13-section reasoning pipeline that processes each message through intent parsing, knowledge graph validation, contradiction assessment, and independent teacher model evaluation before generating responses.
The system's persistent knowledge graph stores beliefs with confidence scores, tracks claims awaiting validation, and maintains active doubts through a weighted graph with co-retrieval reinforcement and decay. After conversations, a sleep consolidation cycle strengthens important connections and decays stale ones. Notably, the architecture maintains flat API costs regardless of conversation length—at 400+ turns, per-message costs remain the same as turn one—by intelligently managing context to prevent runaway token accumulation. The developer reports the system even caught itself attempting prompt injection during testing, demonstrating the robustness of structured reasoning over raw prompting approaches.
- 13-section reasoning pipeline processes messages through intent parsing, knowledge graph checks, and independent teacher model evaluation
- Local SQLite database maintains persistent beliefs, doubts, and goals with interactive D3 force visualization
- Flat API costs maintained at scale through intelligent context management—same cost at 400+ turns as turn one
Why It Matters
Demonstrates practical implementation of persistent AI memory with structured reasoning, potentially influencing future agent architectures.