Building Applications
This guide walks you through building a multi-agent application with the AgenticAI Core SDK. You’ll define agents, tools, memory stores, and an orchestrator, then launch the application server.Prerequisites
- AgenticAI Core SDK installed and configured.
- A configured LLM provider connection (OpenAI, Anthropic, or Azure OpenAI).
- Python 3.8+ with
async/awaitsupport.
Application components
| Component | Purpose | Guide |
|---|---|---|
App | Top-level container for all components. | This guide |
Agent | Autonomous unit that handles tasks. | Creating Agents |
Tool | Function an agent can invoke. | Working with Tools |
MemoryStore | Persistent data store scoped to users, sessions, or the app. | Memory Stores |
AppConfigurations | Streaming, attachments, filler messages. | This guide |
| Orchestrator | Routes messages between agents and users. | Custom Orchestration |
Build the application
1. Define the application
Create anApp instance with a name and orchestration type:
2. Create agents
Define agents for each domain or function in your application:3. Define tools
Register tools using the@Tool.register decorator. Agents can invoke them during task execution:
4. Set up memory stores
Configure persistent storage for conversation state, user preferences, or application-wide data:5. Configure advanced features
Set application-wide settings such as streaming, file attachments, and filler messages:6. Assemble the application
Combine all components into theApp instance:
7. Implement the orchestrator
SubclassAbstractOrchestrator to define routing logic:
8. Start the application
Launch the MCP server with your orchestrator:Complete example
Best practices
- Agent design: Keep agents focused on specific domains. Write detailed descriptions — the orchestrator uses them for routing. Include prompt guidelines and examples.
- Tool design: Make tools single-purpose with clear descriptions. Handle errors and return meaningful messages.
- Memory management: Choose the right scope (
USER_SPECIFIC,SESSION_LEVEL, orAPPLICATION_WIDE). Define schemas for strict validation in production. Set retention policies that match actual data lifetime. - Orchestration: Implement a
route_to_userfallback for unmatched queries. Maintain context across conversation turns using memory stores.