How ichliebewxy/agent_console works
Agent Console is a local multi-agent and RAG workspace. The main workflow streams a user chat through the FastAPI chat route to the agent, which loads session history and may answer directly, use tools, search knowledge, or delegate to a skill agent; results and traces return over SSE and are persisted. Separate product paths manage document ingestion and hybrid retrieval, durable plan-and-execute runs, and long-term memory. The README documents capabilities beyond the sampled excerpts; those branches are included at supported module paths, while uncertain internal wiring is omitted.
Main entry points: agent.py Main Agent · routes_documents.py Document API · rag_pipeline.py RAG Pipeline · retrieval_steps.py Hybrid Retrieval
Components 26
Console and API
- Web Console
frontend/js/chat.js - FastAPI App
backend/app.py - Chat Route
backend/routes_chat.py
Agent and Tools
- Main Agent
backend/agent.py - Core Tools
backend/core_tools.py - Reviewed Bash
backend/bash_tool.py - Skill Delegation
backend/subagents.py - Skills Catalog
backend/skill_service.py - MCP Tools
backend/mcp_service.py
Knowledge Base
- Document API
backend/routes_documents.py - Document Parsing
backend/document_loader.py - Chunk Embeddings
backend/embedding.py - Vector Index
backend/milvus_client.py - Parent Chunks
backend/parent_chunk_store.py - Knowledge Search Tool
backend/search_tool.py - RAG Pipeline
backend/rag_pipeline.py - Hybrid Retrieval
backend/retrieval_steps.py - Expanded Retrieval
backend/rag_expanded.py
Durable Workflows
- Plan and Execute
backend/workflow_graph.py - Run Checkpoints
backend/checkpoint_service.py - Run Controls
backend/routes_runs.py
Memory and State
- Session History
backend/conversation_storage.py - Long-term Memory
backend/memory_service.py - Memory Extraction
backend/memory_extraction.py - Session Artifacts
backend/artifact_service.py
Other components
- User
Connections 28
- User → Web Console: sends message
- Web Console → Chat Route: posts chat
- Chat Route → Main Agent: invokes
- Main Agent → Session History: loads and saves
- Main Agent → Long-term Memory: searches context
- Main Agent → Core Tools: dispatches tools
- Core Tools → Reviewed Bash: uses guarded shell
- Main Agent → Skill Delegation: delegates
- Skill Delegation → Skills Catalog: loads skills
- Main Agent → MCP Tools: invokes discovered tools
- Main Agent → Plan and Execute: starts complex runs
- Plan and Execute → Run Checkpoints: checkpoints state
- Run Controls → Run Checkpoints: inspects and resumes
- Run Controls → Session History: projects run state
- Main Agent → Knowledge Search Tool: calls search tool
- Knowledge Search Tool → RAG Pipeline: runs query
- RAG Pipeline → Hybrid Retrieval: retrieves documents
- RAG Pipeline → Expanded Retrieval: retries expanded query
- Hybrid Retrieval → Vector Index: hybrid searches
- Hybrid Retrieval → Parent Chunks: loads parent context
- Document API → Document Parsing: parses uploads
- Document API → Chunk Embeddings: chunks and embeds
- Document API → Vector Index: writes leaf vectors
- Document API → Parent Chunks: writes parent chunks
- Main Agent → Memory Extraction: starts after reply
- Memory Extraction → Long-term Memory: deduplicates and writes
- Main Agent → Session Artifacts: lists session outputs
- Main Agent → Web Console: streams response and trace