AI Agent & Memory
Create AI agents that remember context and can reason through complex tasks.AI Agent Node
The AI Agent is a powerful node that combines an AI model with memory and optional tools for complex reasoning tasks.Input Handles
| Handle | Position | Purpose |
|---|---|---|
| Main Input | Left | User prompt/data |
| Memory | Bottom-left (diamond) | Connect Simple Memory |
| Model | Top (diamond) | Optional model override |
Parameters
Instructions that define the agent’s behavior and personality
The user message. Supports template variables.
Maximum reasoning iterations for complex tasks
Output
Example Configuration
Simple Memory Node
Stores conversation history for AI agents, enabling context-aware responses.Parameters
Unique identifier for the conversation session
Memory storage mode
Number of messages to keep (Window mode only)
Memory Types
| Type | Description | Use Case |
|---|---|---|
| Buffer | Keeps all messages | Short conversations |
| Window | Keeps last N messages | Long conversations |
Connection
Simple Memory connects to the AI Agent’s memory handle (diamond shape on bottom-left):Session Management
Use dynamic session IDs for multi-user scenarios:Output
Simple Memory is a config node - it doesn’t produce output. The AI Agent reads its configuration directly.Building an Agent Workflow
Basic Setup
Step-by-Step
- Add AI Agent from AI Agents category
- Add Simple Memory and connect to memory handle
- Add AI Model and connect to model handle (optional)
- Add Trigger (Webhook, WhatsApp, etc.) connected to main input
- Add Response node connected to agent output
Multi-Turn Conversation Example
First Request
Second Request
Memory Persistence
- Memory is stored in SQLite database
- Survives server restarts
- Managed automatically by the AI Agent
Clearing Memory
To clear a session’s memory, delete the session from the database or create a new session ID.Advanced: Window Mode
For long-running conversations, use Window mode to limit memory: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 gives inconsistent responses
Agent gives inconsistent responses
- Check if Session ID changes between requests
- Verify memory type and window size settings
- Review system prompt for clarity
Memory grows too large
Memory grows too large
- Switch to Window mode
- Set appropriate window size (10-20 messages)
- Consider clearing sessions periodically