No history yet

Understanding OpenCLAW Agents

What is an Agent?

In OpenCLAW, an agent is an AI assistant designed to perform specific tasks. Think of it not as a general-purpose chatbot, but as a specialized worker with its own memory, skills, and personality. Each agent operates independently, with its own dedicated space for files and conversation history.

An agent is a fully scoped brain with its own:

Workspace (files, AGENTS.md/SOUL.md/USER.md, local notes, persona rules). State directory (agentDir) for auth profiles, model registry, and per-agent config. Session store (chat history + routing state) under ~/.clawdbot/agents//sessions.

This structure allows you to create a team of distinct AI assistants. You might have one agent that excels at writing code, another that organizes your calendar, and a third that helps with research. Each one maintains its own context, ensuring they don't get confused or mix up information from different tasks.

The Agent's Workspace

Every agent has a home base called a workspace. This is a simple directory on your computer that holds all the files and information the agent needs to do its job. It's where the agent reads instructions, stores notes, and saves the files it creates.

This single workspace directory is the agent's entire world. When you ask it to read a file or run a command, it does so from within this folder.

Keeping everything in one place makes agents portable and predictable. You can easily see what information an agent has access to, and you can back up or share an agent simply by copying its workspace directory.

Core Configuration Files

An agent's behavior is defined by a few key markdown files within its workspace. These files act as the agent's instruction manual and personality guide. When you start a new conversation, OpenCLAW reads these files to understand how the agent should think, act, and respond.

Here’s a breakdown of the most important files:

  • AGENTS.md: This file defines the agent’s core identity. It specifies the agent's name, role (like 'expert programmer'), and permissions. It’s like a job description.
  • SOUL.md: This file shapes the agent's personality. You can instruct it to be formal, funny, concise, or verbose. It controls the tone and style of its responses, giving the agent character.
  • TOOLS.md: This file lists the tools and commands the agent is allowed to use. For now, just know this is where its capabilities are defined.
  • BOOTSTRAP.md: This contains initial instructions or context that the agent receives at the very beginning of a new session. It’s like a briefing before a mission, ensuring the agent starts with the right information.

By editing these simple text files, you can create and customize highly specialized AI agents without writing a single line of code.

Quiz Questions 1/5

What is the primary function of an agent in OpenCLAW?

Quiz Questions 2/5

An agent's workspace is a simple directory on your computer that holds all its necessary files and information.

Understanding these basic components is the first step to building powerful, custom AI agents.