How ajay8x/ai works
AJAX AI is a local-first assistant offering web and voice interaction, multilingual intent routing, local language-model responses, guarded tools, memory, and document-grounded RAG. The main workflow is a user query entering the web chat or voice session, reaching the central router, then being classified and answered through tools and/or the local model; conversation data is persisted. Document uploads form a separate indexing-and-retrieval branch. The graph preserves documented system, plugin, and neural capabilities; links to unsampled subsystems are omitted unless supported by the README or source index.
Main entry points: router.py Query router · crud.py Persistence operations · server.py FastAPI server · store.py Document retrieval
Components 24
User interfaces
- Web dashboard
frontend/js/app.js - FastAPI server
api/server.py - Chat controller
controllers/chat_controller.py - Voice session
voice/manager.py
Assistant orchestration
- Query router
core/router.py - Intent classifier
ai/neural/intent_classifier.py - Local model brain
ai/llm/factory.py - Prompt context
core/context.py
Knowledge and memory
- Document upload
controllers/upload_controller.py - Document retrieval
ai/rag/store.py - Graph RAG
ai/rag/graph_rag.py - Knowledge graph
ai/rag/knowledge_graph.py - User memory
memory/manager.py
Tools and extensions
- Tool registry
tools/registry.py - RAG tools
tools/rag_tools.py - Graph RAG tools
tools/graphrag_tools.py - Plugin manager
plugins/manager.py
Platform services
- Application database
database/db.py - Persistence operations
database/crud.py - Authentication
controllers/auth_controller.py - System diagnostics
controllers/system_controller.py - Hardware monitor
system/monitor.py - Runtime configuration
config/config_loader.py
Other components
- Assistant user
Connections 29
- Assistant user → Web dashboard: uses
README.md - Web dashboard → FastAPI server: requests
- FastAPI server → Chat controller: routes to
api/server.py - Chat controller → Query router: processes query
controllers/chat_controller.py - Assistant user → Voice session: speaks to
README.md - Voice session → Query router: routes query
voice/manager.py - Query router → Intent classifier: classifies with
core/router.py - Query router → Local model brain: generates with
core/router.py - Query router → Tool registry: dispatches tools
core/router.py - Query router → Prompt context: builds context
core/router.py - Chat controller → Persistence operations: persists chat
controllers/chat_controller.py - Document upload → Document retrieval: indexes documents
controllers/upload_controller.py - Document retrieval → Application database: uses database
ai/rag/store.py - Prompt context → Document retrieval: retrieves documents
core/context.py - Prompt context → Persistence operations: loads history
core/context.py - User memory → Persistence operations: reads and writes
memory/manager.py - RAG tools → Document retrieval: queries documents
tools/rag_tools.py - Graph RAG tools → Graph RAG: invokes retrieval
tools/graphrag_tools.py - Graph RAG tools → Knowledge graph: uses graph
tools/graphrag_tools.py - Graph RAG → Knowledge graph: queries graph
ai/rag/graph_rag.py - Graph RAG → Local model brain: uses model
ai/rag/graph_rag.py - Plugin manager → Tool registry: registers tools
plugins/manager.py - Persistence operations → Application database: accesses storage
database/crud.py - Authentication → Persistence operations: persists sessions
controllers/auth_controller.py - FastAPI server → Authentication: routes to
api/server.py - FastAPI server → System diagnostics: routes to
api/server.py - System diagnostics → Hardware monitor: reads telemetry
controllers/system_controller.py - System diagnostics → Intent classifier: tests classifier
controllers/system_controller.py - Runtime configuration → Application database: configures storage
config/config_loader.py