What Are Agents?
An agent in OpenClaw is an autonomous AI-powered entity that can perceive its environment, make decisions, and take actions to accomplish goals. Unlike simple chatbots that merely respond to prompts, agents maintain state, use tools, and execute multi-step workflows.
Agents vs. Chatbots
| Feature | Chatbot | OpenClaw Agent |
|---|---|---|
| Memory | None or session-only | Persistent short-term and long-term memory |
| Tools | No external tool access | 5,700+ skills and built-in tools |
| Channels | Single interface | 50+ channel integrations simultaneously |
| Planning | Single response | Multi-step reasoning and task decomposition |
| Autonomy | Reactive only | Proactive scheduling and event-driven actions |
Agent Architecture
Every OpenClaw agent is composed of four layers:
- Model Layer -- The underlying LLM (cloud or local) that powers reasoning.
- Memory Layer -- Short-term conversation context and long-term persistent storage.
- Tool Layer -- Built-in tools and installed skills the agent can invoke.
- Channel Layer -- The interfaces through which users interact with the agent (Slack, Discord, web, API, etc.).
Agent Lifecycle
An agent moves through several states during its lifetime:
- Created -- The agent configuration is defined but the agent is not yet running.
- Initializing -- OpenClaw loads the model, connects memory backends, and registers tools.
- Running -- The agent is live and responding to messages on connected channels.
- Paused -- The agent is temporarily suspended but retains its state.
- Stopped -- The agent is shut down. Memory persists for the next start.
You can inspect an agent's current state at any time:
openclaw status my-agent
Creating Your First Agent
Agents are defined in a YAML configuration file. Here is a minimal example:
# config.yaml
agents:
my-first-agent:
model: openai/gpt-4o
system_prompt: "You are a helpful assistant."
channels:
- terminal
memory:
backend: sqlite
tools:
- web_search
- calculator
Start the agent with:
openclaw start my-first-agent
Agent Configuration Options
The agent block in config.yaml supports many options. Here are the most common:
| Field | Type | Default | Description |
|---|---|---|---|
model | string | required | The model identifier (e.g., openai/gpt-4o, ollama/llama3). |
system_prompt | string | "" | Instructions that define the agent's personality and behavior. |
channels | list | [terminal] | Which channels the agent listens on. |
memory.backend | string | sqlite | Memory storage backend (sqlite, redis). |
tools | list | [] | Built-in tools to enable for this agent. |
skills | list | [] | Installed skills to attach to this agent. |
max_turns | integer | 50 | Maximum conversation turns before auto-reset. |
temperature | float | 0.7 | Model sampling temperature. |
For the full configuration reference, see Configuration Reference.
Multi-Agent Setups
OpenClaw supports running multiple agents simultaneously. Each agent can use a different model, connect to different channels, and have its own memory store:
agents:
support-bot:
model: anthropic/claude-sonnet-4.6
channels: [slack, email]
skills: [ticket-creation, knowledge-base]
code-reviewer:
model: openai/gpt-4o
channels: [github]
skills: [code-review, linting]
Start all agents at once:
openclaw start --all
Next Steps
- Learn how agents remember context in Memory.
- Explore the Built-in Tools available to every agent.
- Connect your agent to channels in the Channels documentation.