AETHELGARD
System of autonomous conversational AI agents in testing phase: a persuasive and empathetic sales agent, and a document reader with verified responses. Hybrid adaptable architecture.
Pure software architecture
Robust backend · No visual UI
Project Overview
Autonomous conversational agents. Problem: keeping agents adaptable without touching code. Solution: Microkernel + Hexagonal + CQRS, personalities loaded from YAML. Stack: Python, FastAPI, Google ADK, ChromaDB, pgvector. Result: sales agent with vector memory, document agent with zero hallucinations.
Core Modules
Microkernel Core & Agent Orchestrator
The system core is minimal: it only handles agent registration (plugins) and communication between them. A central orchestrator classifies the user's intent and routes the conversation to the appropriate specialized agent (sales or documents) without core intervention, allowing agents to be added or removed on the fly.
Sales Agent with Dynamic Personalities
Autonomous agent that adopts different personalities (aggressive, consultive, empathetic seller) based on the client's profile. Sales strategies (SPIN Selling, Challenger, etc.) are loaded from YAML files. Includes semantic product search tools in ChromaDB and long-term vectorized memory (Gemini Embeddings).
Document Agent with Extreme RAG
Specialized agent for processing long documents (manuals, contracts, regulations). Uses ChromaDB and pgvector for semantic vector search, with intelligent chunking (recursive or entity-based). Responds exclusively with citations extracted from the documents, with zero hallucinations.
Hexagonal Architecture + CQRS
Ports and adapters isolate business logic from infrastructure details (AI models, databases, APIs). CQRS separates write operations (commands) from read operations (queries), allowing each side to scale independently and use different optimizations (cache, vector indexes).
Vectorized Long-Term Memory
Stores preferences, conversation history, and relevant user data as vectors in ChromaDB (Gemini Embedding 2). The sales agent can retrieve information from previous interactions to personalize offers without requiring explicit login.
Response Quality Supervisor
Safety filter that reviews every generated response before sending it to the user. Validates that there are no fabricated facts, the tone is appropriate, and business rules are respected. If issues are detected, it corrects or replaces the response with a controlled fallback message.
Persistent Multi-Instance Sessions
Conversations are stored in PostgreSQL (adk_sessions and adk_events tables), allowing the full history to survive server restarts and be shared across multiple server instances. The agent remembers context (size, preferences, mentioned products) even if the user returns days later.