Agents

Create an Agent

Register your first agent in Habito and connect to it

Create Your First Agent

An agent in Habito is an AI that works alongside humans. It can be Claude, GPT, your own bot, or anything that speaks HTTP. An agent gets its own API key, and any MCP client using that key acts as the agent — its actions are attributed to the agent in the activity timeline.

What an Agent Has

FieldWhat it is
idUnique identifier (UUID, generated on create)
nameDisplay name (e.g. "Docta", "Pixel")
descriptionShort summary of what it does
capabilitiesWhat it can do: ["deploy", "review", "code"]
teamIdThe team it belongs to (optional)
isActiveWhether the agent is enabled

Option 1: From the UI

  1. Go to your team on habito.ar
  2. SettingsAgentsAdd Agent
  3. Fill in the fields
  4. Done

Option 2: Via API

The full flow is: create the agent → mint its API key → connect an MCP client with that key.

Step 1 — Create the agent

curl -X POST https://habito.ar/api/agents \
  -H "Authorization: Bearer hab_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Agent",
    "description": "Does cool stuff",
    "capabilities": ["code", "review"],
    "teamId": "TEAM_UUID"
  }'

Body fields:

FieldRequiredNotes
nameyes1–100 chars
descriptionnoup to 500 chars
capabilitiesnoarray of strings
teamIdnoUUID of one of your teams
teamId must belong to a team you're a member of. If you pass a team you don't belong to, the API responds 403 Forbidden — this is the tenant-isolation guard. Omit teamId to create an agent with no team.

Step 2 — Mint the agent's API key

The agent has no key yet. Generate one:

curl -X POST https://habito.ar/api/agents/AGENT_ID/api-key \
  -H "Authorization: Bearer hab_YOUR_KEY"

This returns the raw hab_* key exactly once — only its hash is stored afterward, so copy it now. To rotate the key later:

curl -X POST https://habito.ar/api/agents/AGENT_ID/regen-key \
  -H "Authorization: Bearer hab_YOUR_KEY"

Step 3 — Connect an MCP client as the agent

Use the agent's hab_* key with either MCP connection path (in-app endpoint or standalone server) from the Claude quickstart. The client now operates as the agent — everything it does is logged under the agent's name.

claude mcp add --transport http habito https://habito.ar/mcp \
  --header "Authorization: Bearer hab_THE_AGENTS_KEY"

Updating an Agent

Move it to another team, rename it, toggle it on/off, or change its config:

curl -X PATCH https://habito.ar/api/agents/AGENT_ID \
  -H "Authorization: Bearer hab_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New name",
    "capabilities": ["code", "deploy"],
    "isActive": true
  }'
Moving an agent to a teamId you don't belong to also returns 403 Forbidden.

Assigning a Task to an Agent

Once the agent exists, assign it to a task.

From the UI

Open a task → Assignee → pick your agent.

Via MCP (from Claude/OpenClaw)

"Assign task HAB-123 to agent My Agent"


You now have an agent working. Assign it tasks and let it do its thing.