Architecture Overview
AA Kit is built on a modular, layered architecture that prioritizes simplicity, interoperability, and production readiness.
Layered Architecture
Each layer builds on the one below, creating a robust foundation for AI agents.
Application Layer
Your AI agents and applications
Agent Layer
Core agent functionality and reasoning
Protocol Layer
MCP protocol and communication
Provider Layer
LLM providers and integrations
Infrastructure Layer
Production features and reliability
Core Components
Understanding the key components that make AA Kit powerful yet simple.
Agent Core
The heart of every agent. Manages state, conversations, and tool execution.
- •Stateless design for scalability
- •Session-based context management
- •Async-first architecture
- •Type-safe interfaces
Reasoning Engine
Pluggable reasoning patterns for different use cases.
- •Simple (direct responses)
- •ReAct (tool usage)
- •Chain of Thought
- •Custom patterns
MCP Integration
Every agent is an MCP server, ensuring universal compatibility.
- •Native MCP protocol
- •Auto tool conversion
- •Service discovery
- •Bidirectional communication
Memory System
Flexible memory backends for stateless agents.
- •In-memory (dev)
- •Redis (production)
- •SQLite (local)
- •PostgreSQL (coming)
Production Features
Enterprise-grade reliability built into every agent.
- •Connection pooling
- •Hierarchical timeouts
- •Response caching
- •Graceful degradation
Tool System
Powerful tool integration with automatic MCP conversion.
- •Function decorators
- •Type inference
- •Automatic documentation
- •Tool composition
Request Flow
How a request flows through the AA Kit architecture
Request Received
Client sends a message to the agent
Rate Limiting
Check rate limits and apply throttling if needed
Cache Check
Look for semantically similar cached responses
Context Loading
Load session context from memory backend
Reasoning
Apply reasoning pattern (Simple, ReAct, CoT)
Tool Execution
Execute any required tools via MCP
Response Generation
Generate response using selected LLM
Context Update
Update session context in memory
Response Caching
Cache response for future similar requests
Return Response
Send response back to client
Design Principles
The guiding principles that shape every decision in AA Kit
Simplicity First
The most common use cases should require minimal code. Complexity is progressive.
Universal Interoperability
Every agent speaks MCP. No agent is an island.
Production by Default
Enterprise features aren't add-ons, they're built into the core.
Developer Experience
APIs should be intuitive, errors should be helpful, documentation should be excellent.
Built for Scale, Designed for Simplicity
Start building on a solid architectural foundation.
Explore the Docs