Quick Start Tutorial
This document provides a hands-on tutorial for getting started with Automatos AI. You will learn how to create your first agent, build and execute a multi-step recipe, and interact with agents through the chat interface.
Prerequisites: This tutorial assumes you have completed the installation and setup described in Installation & Setup and have the application running locally. For detailed configuration options, see Configuration Guide.
What You'll Build: By the end of this tutorial, you will have created a custom agent, built a 2-step recipe that uses that agent to perform a task, and tested the agent through the chat interface.
Tutorial Overview
Sources: Tutorial structure based on system capabilities from orchestrator/modules/agents/factory/agent_factory.py:503-648, orchestrator/api/workflow_recipes.py:369-509, orchestrator/api/recipe_executor.py:572-868
Step 1: Create Your First Agent
Agents are the core execution units in Automatos AI. Each agent has a model configuration, skills, and can be assigned tools.
Agent Architecture Overview
Sources: orchestrator/modules/agents/factory/agent_factory.py:503-648, orchestrator/core/models/core.py:172-225
Create Agent via UI
Navigate to the Agents page
Click Create Agent
Fill in the agent details:
Name
"Research Assistant"
Display name for the agent
Description
"Searches knowledge base and summarizes findings"
What the agent does
Agent Type
"custom"
User-defined agent type
Model Provider
"openai"
LLM provider (openai, anthropic, etc.)
Model ID
"gpt-4"
Specific model to use
Temperature
0.7
Response creativity (0.0-2.0)
Assign skills (optional):
Select "Research" skill to enable knowledge base searching
Select "Analysis" skill for data interpretation
Click Save Agent
The agent is now created and stored in the agents table with a unique ID.
Sources: orchestrator/core/models/core.py:172-225, orchestrator/modules/agents/factory/agent_factory.py:522-648
Create Agent via API
Response:
The agent ID (42 in this example) will be used in the next step to assign it to recipe steps.
Sources: Agent creation endpoint at orchestrator/api/agents.py (referenced from main.py router mounting), model structure at orchestrator/modules/agents/factory/agent_factory.py:376-448
Understanding Agent Activation
When an agent is used (in chat or recipes), the AgentFactory.activate_agent() method creates an AgentRuntime instance:
Sources: orchestrator/modules/agents/factory/agent_factory.py:641-732, orchestrator/modules/agents/factory/agent_factory.py:234-296
Step 2: Build Your First Recipe
Recipes are multi-step workflows where each step is executed by an agent. Let's create a simple 2-step recipe that researches a topic and then summarizes the findings.
Recipe Structure
Sources: orchestrator/core/models/core.py:485-674, orchestrator/api/workflow_recipes.py:369-509
Create Recipe via UI
Navigate to Workflows → Recipes
Click Create Recipe
Basic Configuration (Step 1/4):
Recipe Name
"Research & Summarize"
Description
"Researches a topic and creates a summary"
Input Schema
{"topic": "string"}
Output Schema
{"summary": "string"}
Workflow Steps & Agents (Step 2/4):
Click Add Step twice to create two steps:
Step 1: Research Phase
Agent: Select "Research Assistant" (created in Step 1)
Prompt Template:
Error Handling: Stop
Step 2: Summarization Phase
Agent: Select "Research Assistant"
Prompt Template:
Error Handling: Stop
Execution Settings (Step 3/4):
Mode
Sequential
Max Retries
3
Timeout Per Step
120 seconds
Total Timeout
600 seconds
Auto Learning
Enabled
Memory Isolation
Shared
Scheduling & Triggers (Step 4/4):
Type: Manual (execute on demand)
Click Save Recipe
Sources: frontend/components/workflows/create-recipe-modal.tsx:68-381, frontend/components/workflows/recipe-step-builder.tsx:1-382
Create Recipe via API
Sources: orchestrator/api/workflow_recipes.py:369-509, frontend/hooks/use-recipe-form.ts:12-102
Step 3: Execute the Recipe
Now that your recipe is created, let's execute it with a sample topic.
Recipe Execution Flow
Sources: orchestrator/api/recipe_executor.py:572-868, orchestrator/api/recipe_executor.py:45-376
Execute Recipe via UI
Navigate to Workflows → Recipes
Find "Research & Summarize" recipe
Click Cook button
In the input modal, provide:
Click Start Execution
The Execution Kitchen view opens, showing real-time progress:
Sources: frontend/components/workflows/execution-kitchen.tsx:1-583, frontend/components/workflows/recipe-step-progress.tsx
Execute Recipe via API
Response:
Track execution status:
Sources: orchestrator/api/workflow_recipes.py:707-865, orchestrator/core/models/core.py:730-795
Understanding Step Execution
Each recipe step follows this execution pattern:
Sources: orchestrator/api/recipe_executor.py:45-376, orchestrator/core/services/recipe_scratchpad.py
Recipe Execution Monitoring
The execution creates several data artifacts:
Execution Record
PostgreSQL recipe_executions table
Status, timestamps, compact summaries
Step Results
step_results JSONB column
Per-step status, tool calls, output preview, duration
Full Logs
S3 workspaces/{workspace_id}/logs/executions/{execution_id}/step_{N}.json
Complete messages, tool calls, raw outputs
Memories
Mem0 (external service)
Execution learnings for future runs
Sources: orchestrator/api/recipe_executor.py:479-565, orchestrator/api/recipe_executor.py:524-565
Step 4: Use the Chat Interface
The chat interface lets you interact with agents in real-time, with streaming responses and automatic tool execution.
Chat Architecture
Sources: orchestrator/consumers/chatbot/service.py:493-1027, orchestrator/api/chat.py
Start a Chat Session via UI
Navigate to the Chat page
Optional: Select an agent from the dropdown
If you don't select one, the Universal Router will choose the best agent for your query
Type your message:
Press Send
The system will:
Assess complexity using AutoBrain (5 levels: ATOM to ORGANISM)
Route to appropriate agent (your Research Assistant in this case)
Activate the agent via AgentFactory
Stream the response with real-time updates
Sources: frontend/components/chat/chat.tsx, orchestrator/consumers/chatbot/service.py:493-710
Chat Response Streaming
The chat interface receives Server-Sent Events (SSE) with different event types:
chat-id
Session identifier
{"chat_id": "uuid"}
agent-info
Selected agent details
{"agent": {"id": 42, "name": "Research Assistant"}}
memory-injected
Retrieved memories
{"memories": [...], "total_matched": 5}
text-delta
Response text chunk
{"delta": "The latest..."}
tool-data
Tool execution result
{"name": "search_knowledge", "result": {...}}
finish
Response complete
{"finish_reason": "stop"}
Sources: orchestrator/consumers/chatbot/service.py:843-1027, orchestrator/consumers/chatbot/streaming.py
Understanding the Tool Execution Loop
When the agent decides to use tools, the chat service executes them automatically:
Sources: orchestrator/consumers/chatbot/service.py:843-1027, orchestrator/consumers/chatbot/service.py:88-186, orchestrator/modules/tools/tool_router.py
Chat via API
The response is a stream of SSE events:
Sources: orchestrator/api/chat.py, orchestrator/consumers/chatbot/streaming.py
Next Steps
Now that you've completed the quick start tutorial, you can:
Create specialized agents with different skills and models - see Creating Agents
Build complex recipes with parallel execution and error handling - see Recipe Execution Engine
Connect external tools via Composio for real-world integrations - see Composio Integration
Upload documents to enable RAG-powered knowledge retrieval - see Document Management
Set up triggers for event-driven recipe execution - see Scheduling & Triggers
Key Concepts Covered
Sources: Tutorial structure based on core workflows from orchestrator/modules/agents/factory/agent_factory.py:503-732, orchestrator/api/recipe_executor.py:572-868, orchestrator/consumers/chatbot/service.py:493-1027
Last updated

