---
question: Is a chat agent a class or a Settings record?
kind: overview
---

# Agents

An agent answers in a chat. It binds a chat model to a system prompt and to the tools it can call.

ABI has two kinds of agent. Both are listed in the workspace's Settings › Agents and in the chat's agent picker.

- **Module agent.** An SDK `IntentAgent` in a module's `agents/` folder. The module declares it with an `AgentDescriptor`, builds it when it starts and binds it with `expose_agent`; discovery publishes it, and Nexus lists it while the module runs. Only a module agent has tools. Write one with [Create an agent](/capabilities/build/agents/creating-an-agent?via=python).
- **Workspace agent.** A record in one Nexus workspace: a name, a description, a system prompt and a model, behind `/api/agents`. It has no tools. Add one from Settings › Agents with [Create an agent](/capabilities/build/agents/creating-an-agent?via=web).

Settings › Agents also lists the agents that ship with ABI and the marketplace modules, such as Abi. Settings › Agents belongs to the business workspace (members, chat), not to a code workspace.

<!-- matrix -->

## Key concepts

- **`create_agent(engine, module_id, ...)`**: the async function `abi new agent` writes. It asks the engine for its models and returns the `IntentAgent`.
- **`AgentDescriptor`**: the agent's name, description and capabilities in `ABIModule.agents`. Discovery publishes it; `agent.invoke.v1` is the capability Nexus and other modules call.
- **`IntentAgent`**: the SDK class, in `naas_abi_sdk.agents`. It maps the user's message to a tool with intents, then runs the model in a tool loop.
- **Model**: an agent asks the engine's model registry for a chat model by canonical id, or takes the default one. See [Models](/capabilities/build/models/overview).
- **Tools**: the functions the model can call. See [Tools](/capabilities/build/tools/overview).
- **Other agents**: a module agent calls another module's agent as a tool. See [Add sub-agents](/capabilities/build/agents/add-sub-agents).
- **Enabled**: the chat only offers a workspace's enabled agents. A module agent is on while its module is `READY`; the workspace's `agents:` list in `config.yaml` restricts that, and a toggle in Settings › Agents wins over it.
- **Default agent**: `default_agent` in `config.yaml`. The Nexus chat uses it on Auto unless the workspace names its own, which may be a module agent.
- **Memory**: an agent built with `document_memory(...)` keeps each conversation thread in the engine's Document Service. See [Persistent memory](/capabilities/build/agents/creating-an-agent#persistent-memory).
