How turing-machines/mentals-ai works
Main Components
a) Core System Components:
• Agent Executor (Central Executive - System 2)
• LLM Interface (System 1)
• Memory Management System
• Tool Registry
• Code Interpreter
b) External Integrations:
• OpenAI API / LLM Providers
• PostgreSQL with pgvector
• File System
• Python Runtime
Architectural Layers
┌─────────────────────────────────────────────┐
• Agent Layer │
• (.gen files, Markdown-based agent scripts) │
• ┤
• Execution Layer │
• (Agent Executor, Memory Controller, Tools) │
• ┤
• Integration Layer │
• (LLM Interface, Database, File System) │
• ┘
Key Relationships to Highlight
a) Control Flow:
• Recursive loop between Agent Executor and LLM
• Instruction flow between components
• Demonstrate memory access patterns
b) Data Flow:
• Agent script processing
• Context management
• Memory operations
• Tool execution paths
Specific Implementation Details
• Blue rectangles: Core components
• Green hexagons: External services
• Yellow diamonds: Decision points
• Purple rounded rectangles: Tools
Component Interactions
Agent Script (.gen) → Agent Executor
• ↓
• ┌─────────────────────────────┐
• Instruction Pipeline │
• ┘
• ↙ ↘
• Working Memory Short-term Memory
• ↘ ↙
• ┌─────────────────────────────┐
• LLM Interface │
• ┘
Technical Details
• C++ core implementation
• LibOAI integration
• PostgreSQL vector storage
• Python interpreter integration
• File system interactions
• Natural language control flow
• Markdown-based agent definition
• Recursive decision-making process
• Memory management system
• Tool integration framework
This system design should effectively communicate both the high-level architecture and the detailed interactions between components, while highlighting the unique aspects of Mentals AI's approach to agent-based AI systems.