Agents
An agent is an AI system you run — a support bot, a coding assistant, an autonomous workflow. Task Guard, Govern, and Secure accept an agent identity so tasks, decisions, and incidents can be attributed to the right agent.
Good to know Registering agents is optional. You can call every endpoint with just a free-text
agent_name. Registering an agent gives you a stableagent_idand richer reporting — but it is never a prerequisite for using the API.
Registered vs. unregistered#
Task Guard task starts and every Govern and Secure call accept two optional identity fields:
| Field | Use it when… | Example |
|---|---|---|
agent_name | The agent isn't registered (or you just want to label the caller). | "agent_name": "billing-bot" |
agent_id | The agent is registered in Maetra and you want checkpoints/incidents tied to it. | "agent_id": "agt_5Ab2" |
You can send either, both, or neither. Passing agent_id links activity to the registered agent; agent_name is a human-readable label. Start with agent_name, and switch to agent_id once you register.
How Govern resolves policy scope#
For normal active-policy evaluation, agent_id is optional. Govern still evaluates the action when a REST or MCP request sends only agent_name.
| Request identity | Policy scope Maetra evaluates |
|---|---|
agent_id matches a registered agent | Organization-wide policies, plus policies assigned to that registered agent. |
agent_name matches a registered agent name | Organization-wide policies, plus policies assigned to that registered agent. |
Only an unknown agent_name is sent | Organization-wide policies only. Policies assigned to specific registered agents do not run. |
| No agent identity is sent | Organization-wide policies only. |
Pass agent_id when you can; use agent_name when an agent is not registered yet or when an MCP client does not have a registered ID. If you pass policy_ids or policy_group_ids on a checkpoint, Maetra evaluates the policies you explicitly selected.
When to register
- You want per-agent dashboards, findings, and audit trails.
- You want to scope rules or policies to specific agents.
- You're onboarding an agent to formal governance.
When you don't need to
- You're integrating quickly or prototyping.
- The caller is a one-off script or a product surface, not a tracked agent.
Registering an agent#
Register agents in the dashboard under Discover → Agent registry → Register agent. Only a name is required; everything else (owner, environment, framework, autonomy level, tools) is optional context. On save, Maetra assigns the agent_id you pass to the API.
List agents#
GET /v1/agents — returns the agents in your workspace, newest first, with a minimal public projection. Requires the discover:agents:read scope.
Query parameters
| Param | Description |
|---|---|
status | Filter by pending_review, registered, under_review, governed, or archived. |
limit | Max agents to return, 1–200. Defaults to 50. |
curl "https://api.maetra.io/v1/agents?limit=20" \
-H "Authorization: Bearer $MAETRA_API_KEY"
Response
{
"agents": [
{
"id": "agt_5Ab2",
"name": "billing-bot",
"description": "Handles customer refunds.",
"status": "registered",
"autonomy_level": "L3",
"risk_level": "medium",
"environment": "production",
"created_at": "2026-07-01T09:12:00.000Z",
"updated_at": "2026-07-06T22:04:00.000Z"
}
]
}
| Field | Type | Description |
|---|---|---|
id | string | The agent's ID — pass as agent_id to other endpoints. |
name | string | Human-readable name. |
description | string | null | Optional description. |
status | enum | pending_review, registered, under_review, governed, archived. |
autonomy_level | enum | L0–L5. |
risk_level | enum | low, medium, high, critical, unknown. |
environment | enum | production, staging, development, unknown. |
created_at / updated_at | string | ISO 8601 timestamps. |