AI Agents & Memory
MachinaOs provides two types of AI agents for different use cases, plus a memory node for conversation context.Agent Types
| Agent | Purpose | Special Features |
|---|---|---|
| AI Agent | Complex reasoning with tool calling | LangGraph execution, iterative reasoning |
| Chat Agent | Conversational AI with skills | Skill-driven behavior, multi-turn chat |
| Simple Memory | Conversation history storage | Markdown format, long-term vector storage |
Specialized Agents
Pre-configured agents for specific domains. Same AI configuration as base agents with domain-focused defaults.| Agent | Description | Color |
|---|---|---|
| Android Control Agent | Android device control | Green |
| Coding Agent | Code execution | Cyan |
| Web Control Agent | Web automation | Red |
| Task Management Agent | Task automation | Purple |
| Social Media Agent | Social messaging | Green |
AI Agent Node
The AI Agent uses LangGraph for structured execution with tool calling and iterative reasoning.Input Handles
| Handle | Position | Purpose |
|---|---|---|
| Main Input | Left | User prompt/data from upstream nodes |
| Memory | Bottom-left (diamond) | Connect Simple Memory |
| Tools | Bottom-right (diamond) | Connect Tool nodes |
Parameters
AI provider: openai, anthropic, gemini, openrouter, groq, cerebras
Model to use (options based on provider)
Instructions that define the agent’s behavior and personality
The user message. Supports template variables like
{{nodeName.field}}Maximum reasoning iterations for complex tasks
Output
Tool Calling
Connect Tool nodes to the input-tools handle (bottom-right diamond) to give the agent capabilities:Chat Agent Node
The Chat Agent is designed for conversational interactions with skill-based behavior extension.Input Handles
| Handle | Position | Purpose |
|---|---|---|
| Main Input | Left | User message (e.g., from Chat Trigger) |
| Memory | Bottom-left (diamond) | Connect Simple Memory |
| Skills | Bottom-right (diamond) | Connect Skill nodes |
| Tools | Bottom (diamond) | Connect Tool nodes |
Parameters
AI provider: openai, anthropic, gemini, openrouter, groq, cerebras
Model to use (options based on provider)
Base system instructions (extended by connected skills)
User message. If empty, reads from connected input node’s
message, text, or content field.Skill Support
Connect Skill nodes to the input-skill handle to extend the Chat Agent’s capabilities:Input Methods
-
Template Variable (Explicit):
- Auto-Fallback (Implicit): Leave Prompt empty - the agent reads from the connected input node automatically.
Output
Simple Memory Node
Stores conversation history in markdown format for AI agents.Connection
Simple Memory connects to the memory handle (diamond shape on bottom-left):Parameters
Unique identifier for the conversation session. Use dynamic values for multi-user scenarios.
Number of message pairs to keep in short-term memory
Editable conversation history in markdown format. View and edit directly in the parameter panel.
Archive old messages to vector DB for semantic retrieval
Number of relevant memories to retrieve from long-term storage (shown when longTermEnabled is true)
Memory Format
Conversation history is stored in markdown:Memory Flow
- Agent reads
memoryContentmarkdown from connected Simple Memory node - Parses markdown to LangChain message format
- (If enabled) Retrieves relevant context from vector store
- Executes with conversation history
- Appends new messages to markdown
- Trims to keep last N pairs (windowSize)
- Archives removed messages to vector store (if longTermEnabled)
- Saves updated markdown back to node parameters
Dynamic Session IDs
For multi-user scenarios, use template variables:Building Agent Workflows
Basic AI Agent with Tools
Chat Agent with Skills
Step-by-Step Setup
- Add AI Agent or Chat Agent from AI Agents category
- Add Simple Memory and connect to memory handle (diamond)
- Add Tools/Skills and connect to respective handles
- Add Trigger (Webhook, Chat, WhatsApp) connected to main input
- Add Response node connected to agent output
AI Agent vs Chat Agent
| Feature | AI Agent | Chat Agent |
|---|---|---|
| Primary Use | Complex reasoning tasks | Conversational interactions |
| Tool Calling | Yes (LangGraph) | Yes (LangGraph) |
| Memory Support | Yes | Yes |
| Skill Support | Yes | Yes |
| Bottom Handles | Skill, Tools | Skill, Tools |
| Left Handles | Input, Memory | Input, Memory |
| Best For | Task automation, reasoning | Chat interfaces, multi-turn dialog |
Async Agent Delegation
Agents can delegate tasks to other agents connected via theinput-tools handle. The parent agent continues immediately while the child works in the background.
How It Works
- Connect a specialized agent to a parent agent’s
input-toolshandle - Parent agent calls
delegate_to_<agent_type>(task="...", context="...") - Child agent spawns as background task
- Parent receives
{"status": "delegated", "task_id": "..."}immediately - Child executes independently with its own tools
Example
- Calls
delegate_to_android_agent(task="Check battery and enable WiFi if low") - Android Agent spawns in background with its own connected tools
- AI Agent continues with other work
Multi-Turn Conversation Example
First Request
Second Request
Tips
Troubleshooting
Agent doesn't remember previous messages
Agent doesn't remember previous messages
- Verify Simple Memory is connected to diamond handle (not main input)
- Check Session ID is consistent across requests
- Ensure workflow is deployed (not just saved)
Agent doesn't use connected tools
Agent doesn't use connected tools
- Verify Tool nodes are connected to the input-tools diamond handle
- Check tool node has proper schema/description
- Ensure the prompt requires tool usage
Skills not affecting Chat Agent behavior
Skills not affecting Chat Agent behavior
- Verify Skill nodes are connected to input-skill handle
- Check skill SKILL.md content is valid
- Ensure skill’s allowed-tools match connected tool nodes
Memory grows too large
Memory grows too large
- Reduce windowSize setting (10-20 messages recommended)
- Enable long-term memory to archive old messages
- Consider clearing sessions periodically