AI agents API
Agents, versions, sessions and traces. 29 ops: list_agents, get_agent, get_agent_config_schema, create_agent, update_agent, promote_agent_version, rollback_agent, deploy_agent, undeploy_agent, archive_agent, set_agent_secret, list_agent_secrets, delete_agent_secret, test_agent, suggest_reply, list_a
Agents, versions, sessions and traces.
list_agents
readList AI agents · POST /api/v1/list_agents · scope agents:read or GET …?input=
The organization's AI agents with their status, production and test version ids and the phone numbers each answers (deployments). Archived agents are left out unless include_archived.
curl -X POST https://getwabi.dev/api/v1/list_agents \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_agents{
"type": "object",
"properties": {
"include_archived": {
"default": false,
"type": "boolean"
}
}
}get_agent
readGet an AI agent · POST /api/v1/get_agent · scope agents:read or GET …?input=
One agent: its summary, deployments, every version (stage, model, notes) and the configuration of the open draft, test and production versions. Use it before update_agent or promote_agent_version.
curl -X POST https://getwabi.dev/api/v1/get_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi get_agent --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
}
},
"required": [
"agent_id"
]
}Get the agent configuration schema · POST /api/v1/get_agent_config_schema · scope agents:read or GET …?input=
The JSON Schema of an agent version's configuration (model, instructions, knowledge, tools and their permissions, escalation and approval policies, language and style, budgets, turn and timeout limits), the models agents can use and the default configuration. Read it before writing a config for create_agent or update_agent.
curl -X POST https://getwabi.dev/api/v1/get_agent_config_schema \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi get_agent_config_schema{
"type": "object",
"properties": {}
}create_agent
writeCreate an AI agent · POST /api/v1/create_agent · scope agents:write
Creates an agent with version 1 as an open draft. Give it a name and a config (or start from the defaults and update_agent later). Next: add knowledge (add_knowledge_source), try it (test_agent), promote_agent_version to test, deploy_agent to the sandbox number, then promote to production. Returns the agent and its draft.
curl -X POST https://getwabi.dev/api/v1/create_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"name":"Support"}'npx @meterapp/wabi create_agent --json '{"name":"Support"}'{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": {
"default": "",
"type": "string",
"maxLength": 500
},
"config": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "Agent configuration (or a partial patch): model {name, effort, key_secret}, instructions, language, style, knowledge {source_ids, top_k, min_score}, tools [{type: knowledge_search|lookup_contact|assign_conversation|send_template|notify_slack|http|mcp, …}], escalation, approval, budgets, limits. get_agent_config_schema returns the full JSON Schema."
},
"visibility": {
"default": "org",
"description": "restricted: only people and teams it is shared with (share_resource) see it.",
"type": "string",
"enum": [
"org",
"restricted"
]
}
},
"required": [
"name"
]
}update_agent
writeUpdate an AI agent · POST /api/v1/update_agent · scope agents:write
Renames an agent or changes its configuration. Config changes go to the open draft (one is created from the latest version when none is open); test and production versions never change: promote the draft to ship it. config is merged into the draft (objects deep-merged, arrays replaced) unless replace_config.
curl -X POST https://getwabi.dev/api/v1/update_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi update_agent --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": {
"type": "string",
"maxLength": 500
},
"config": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "Agent configuration (or a partial patch): model {name, effort, key_secret}, instructions, language, style, knowledge {source_ids, top_k, min_score}, tools [{type: knowledge_search|lookup_contact|assign_conversation|send_template|notify_slack|http|mcp, …}], escalation, approval, budgets, limits. get_agent_config_schema returns the full JSON Schema."
},
"replace_config": {
"default": false,
"type": "boolean"
},
"notes": {
"description": "What changed in this draft (the version history shows it).",
"type": "string",
"maxLength": 1000
}
},
"required": [
"agent_id"
]
}Promote an agent version · POST /api/v1/promote_agent_version · scope agents:write
Ships a version: to test (the draft becomes the test environment's version: the sandbox number and test chats), or to production (a test version becomes what live numbers answer with; a draft needs skip_test: true). The version is frozen from then on; earlier production versions stay available for rollback_agent. Running sessions keep the version they started with.
curl -X POST https://getwabi.dev/api/v1/promote_agent_version \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","version_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","to":"test"}'npx @meterapp/wabi promote_agent_version --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","version_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","to":"test"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"version_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"to": {
"type": "string",
"enum": [
"test",
"production"
]
},
"skip_test": {
"default": false,
"type": "boolean"
},
"notes": {
"type": "string",
"maxLength": 1000
}
},
"required": [
"agent_id",
"version_id",
"to"
]
}rollback_agent
writeRoll back an agent · POST /api/v1/rollback_agent · scope agents:write
Puts an earlier production version back in production: the one before the current, or version_id. New sessions use it at once.
curl -X POST https://getwabi.dev/api/v1/rollback_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi rollback_agent --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"version_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"agent_id"
]
}deploy_agent
writeDeploy an agent to a number · POST /api/v1/deploy_agent · scope agents:write
Makes a phone number answer with this agent: environment test (the sandbox number only) or production. Replaces any agent the number had. Inbound messages are answered from the agents' queue within seconds; a conversation a person took over is left to them. The sandbox number is free on every plan; a live number needs Starter or higher.
curl -X POST https://getwabi.dev/api/v1/deploy_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","phone_number_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi deploy_agent --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","phone_number_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"phone_number_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Connected sender id (whatsapp_phone_numbers.id, not Meta's phone_number_id)."
},
"environment": {
"default": "production",
"type": "string",
"enum": [
"test",
"production"
]
}
},
"required": [
"agent_id",
"phone_number_id"
]
}undeploy_agent
writeRemove the agent from a number · POST /api/v1/undeploy_agent · scope agents:write
The phone number stops answering with an agent; people answer in the inbox. Sessions already running finish their current turn.
curl -X POST https://getwabi.dev/api/v1/undeploy_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"phone_number_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi undeploy_agent --json '{"phone_number_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"phone_number_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Connected sender id (whatsapp_phone_numbers.id, not Meta's phone_number_id)."
}
},
"required": [
"phone_number_id"
]
}archive_agent
writeArchive an AI agent · POST /api/v1/archive_agent · scope agents:write
Retires an agent: removes it from every number and hides it from lists. Its sessions, traces and versions are kept.
curl -X POST https://getwabi.dev/api/v1/archive_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi archive_agent --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
}
},
"required": [
"agent_id"
]
}Set an agent secret · POST /api/v1/set_agent_secret · scope agents:write
Stores a credential agents use, encrypted: model_key (your Anthropic key, BYO on Growth+), slack_webhook (a Slack incoming webhook URL), http_secret (signing secret for a custom HTTP tool), mcp_token (bearer token of an external MCP server). Versions refer to it by name; setting an existing name replaces the value. The value is never returned.
curl -X POST https://getwabi.dev/api/v1/set_agent_secret \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"name":"Support","kind":"model_key","value":"value"}'npx @meterapp/wabi set_agent_secret --json '{"name":"Support","kind":"model_key","value":"value"}'{
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"kind": {
"type": "string",
"enum": [
"model_key",
"slack_webhook",
"http_secret",
"mcp_token"
]
},
"value": {
"type": "string",
"minLength": 8,
"maxLength": 4096
}
},
"required": [
"name",
"kind",
"value"
]
}List agent secrets · POST /api/v1/list_agent_secrets · scope agents:read or GET …?input=
The names, kinds and last four characters of the organization's agent secrets (never the values).
curl -X POST https://getwabi.dev/api/v1/list_agent_secrets \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_agent_secrets{
"type": "object",
"properties": {}
}Delete an agent secret · POST /api/v1/delete_agent_secret · scope agents:write
Revokes a secret. Tools and model keys that name it fail closed (the agent hands off) until it is set again.
curl -X POST https://getwabi.dev/api/v1/delete_agent_secret \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"name":"Support"}'npx @meterapp/wabi delete_agent_secret --json '{"name":"Support"}'{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"name"
]
}test_agent
writeTest chat with an agent · POST /api/v1/test_agent · scope agents:write
Runs one agent turn on a conversation you write, without messaging anyone: the draft (default), test or production version answers the last customer message. Returns the decision (respond, approve or escalate), the reply, the sources it cited, the computed confidence and checks, tool calls (tools that change things are simulated unless allow_side_effects) and tokens, cost and latency; the trace is in the session explorer (channel test). mocks replaces tool outputs: {"<tool name>": <output>}.
curl -X POST https://getwabi.dev/api/v1/test_agent \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi test_agent --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"version_id": {
"description": "A specific version; default: the environment's version.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"environment": {
"default": "draft",
"description": "Which version to use when version_id is absent: the open draft (default), the test or the production version.",
"type": "string",
"enum": [
"draft",
"test",
"production"
]
},
"messages": {
"description": "The conversation so far, oldest first, ending with the customer's message.",
"minItems": 1,
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"customer",
"agent"
]
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
},
"required": [
"role",
"text"
]
}
},
"text": {
"description": "Shortcut for a one-message conversation.",
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"mocks": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"allow_side_effects": {
"default": false,
"type": "boolean"
}
},
"required": [
"agent_id"
]
}suggest_reply
writeSuggest a reply · POST /api/v1/suggest_reply · scope agents:write
For a person answering in the inbox: drafts a reply to the customer's latest messages in a conversation with sources, confidence and what the agent would have done (recommended: respond, approve or escalate). Nothing is sent. Uses the agent on the conversation's number (its production version, or test on the sandbox), or agent_id. Counts as an AI reply on the platform's model key.
curl -X POST https://getwabi.dev/api/v1/suggest_reply \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"conversation_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi suggest_reply --json '{"conversation_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"conversation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Conversation id."
},
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
}
},
"required": [
"conversation_id"
]
}List agent approvals · POST /api/v1/list_agent_approvals · scope agents:read or GET …?input=
Drafted replies and tool calls agents are holding for a person (status pending by default), with the reason, the draft, its sources and confidence. Decide them with decide_agent_approval.
curl -X POST https://getwabi.dev/api/v1/list_agent_approvals \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_agent_approvals{
"type": "object",
"properties": {
"status": {
"default": "pending",
"type": "string",
"enum": [
"pending",
"approved",
"rejected",
"expired"
]
},
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"limit": {
"default": 50,
"description": "Page size, at most 200.",
"type": "integer",
"minimum": 1,
"maximum": 200
}
}
}Approve or reject an agent action · POST /api/v1/decide_agent_approval · scope agents:write
Approves (sends the reply, optionally with your edited text, or runs the held tool call) or rejects an agent's pending action. Returns the approval with its result.
curl -X POST https://getwabi.dev/api/v1/decide_agent_approval \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"approval_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","approve":false}'npx @meterapp/wabi decide_agent_approval --json '{"approval_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","approve":false}'{
"type": "object",
"properties": {
"approval_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"approve": {
"type": "boolean"
},
"text": {
"description": "Edited reply text (replies only).",
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"note": {
"type": "string",
"maxLength": 500
}
},
"required": [
"approval_id",
"approve"
]
}List agent sessions · POST /api/v1/list_agent_sessions · scope agents:read or GET …?input=
The session explorer's list, newest first: each session's agent and version, conversation, channel (whatsapp, test, api, eval), status, resolution, stop and escalation reasons, turns, tokens, cost and timings. get_agent_session has the full trace.
curl -X POST https://getwabi.dev/api/v1/list_agent_sessions \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_agent_sessions{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"status": {
"type": "string",
"enum": [
"active",
"completed",
"escalated",
"failed",
"timed_out"
]
},
"channel": {
"type": "string",
"enum": [
"whatsapp",
"test",
"api",
"eval"
]
},
"conversation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Conversation id."
},
"limit": {
"default": 50,
"description": "Page size, at most 200.",
"type": "integer",
"minimum": 1,
"maximum": 200
},
"offset": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
}Get an agent session trace · POST /api/v1/get_agent_session · scope agents:read or GET …?input=
One session's full trace: every turn with its input, reply, decision, intent, sources retrieved and cited, checks and computed confidence, tool calls (input, output, status, latency, cost, MCP server), tokens, cost, latency, errors and retries, plus approvals, evaluations, stop and escalation reasons and the handoff packet.
curl -X POST https://getwabi.dev/api/v1/get_agent_session \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"session_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi get_agent_session --json '{"session_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"session_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"session_id"
]
}Get agent metrics · POST /api/v1/get_agent_metrics · scope agents:read or GET …?input=
Observability for one agent or all of them over the last `days`: sessions, active sessions, error rate, tokens, model and tool cost, turns per session, execution time, resolution, agent-contained resolution, escalation and human-intervention rates, evidence-supported answer rate, CSAT, cost per resolved issue, p50/p90/p95/p99 of turns, execution time, time to first response, tokens, model and tool latency, and per-tool analytics (calls, success rate, errors, timeouts, permission denials, p50/p95 latency, cost).
curl -X POST https://getwabi.dev/api/v1/get_agent_metrics \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi get_agent_metrics{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"days": {
"default": 7,
"type": "integer",
"minimum": 1,
"maximum": 90
}
}
}create_eval_case
writeAdd a golden-answer eval case · POST /api/v1/create_eval_case · scope agents:write
Adds (or replaces, by suite and name) a test case to an agent's golden suite: a conversation, what the reply must and must not contain, the decision expected (respond, approve, escalate), tools that must or must not be called, a minimum confidence, and mocked tool outputs. Run the suite with run_eval_suite.
curl -X POST https://getwabi.dev/api/v1/create_eval_case \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","name":"Support","input":{"messages":[{"role":"customer","text":"Hi, where is my order?"}]}}'npx @meterapp/wabi create_eval_case --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","name":"Support","input":{"messages":[{"role":"customer","text":"Hi, where is my order?"}]}}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"suite": {
"default": "default",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"input": {
"type": "object",
"properties": {
"messages": {
"minItems": 1,
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"customer",
"agent"
]
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
},
"required": [
"role",
"text"
]
}
},
"contact": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"messages"
]
},
"expected": {
"default": {},
"type": "object",
"properties": {
"answer_contains": {
"default": [],
"description": "Case-insensitive substrings the reply must contain.",
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"answer_excludes": {
"default": [],
"description": "Substrings the reply must not contain.",
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"decision": {
"description": "What the agent must decide.",
"type": "string",
"enum": [
"respond",
"approve",
"escalate"
]
},
"tools_called": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "string"
}
},
"tools_not_called": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "string"
}
},
"min_confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"mocks": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"agent_id",
"name",
"input"
]
}list_eval_cases
readList eval cases · POST /api/v1/list_eval_cases · scope agents:read or GET …?input=
An agent's golden-answer cases, optionally one suite, and the result of each suite's latest run.
curl -X POST https://getwabi.dev/api/v1/list_eval_cases \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi list_eval_cases --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"suite": {
"type": "string",
"maxLength": 100
}
},
"required": [
"agent_id"
]
}delete_eval_case
writeDelete an eval case · POST /api/v1/delete_eval_case · scope agents:write
Removes a case from an agent's golden-answer suite; future run_eval_suite runs skip it. Results of past runs are kept.
curl -X POST https://getwabi.dev/api/v1/delete_eval_case \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"case_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi delete_eval_case --json '{"case_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"case_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"case_id"
]
}run_eval_suite
writeRun a golden-answer suite · POST /api/v1/run_eval_suite · scope agents:write
Runs every case of a suite against a version (the draft by default) with mocked tools, in the background; results appear in list_eval_cases (runs) and get_eval_run within a minute or two. Tools that change things never run. Growth plan and up.
curl -X POST https://getwabi.dev/api/v1/run_eval_suite \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi run_eval_suite --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"suite": {
"default": "default",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"version_id": {
"description": "A specific version; default: the environment's version.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"environment": {
"default": "draft",
"description": "Which version to use when version_id is absent: the open draft (default), the test or the production version.",
"type": "string",
"enum": [
"draft",
"test",
"production"
]
}
},
"required": [
"agent_id"
]
}get_eval_run
readGet an eval run · POST /api/v1/get_eval_run · scope agents:read or GET …?input=
The results of one run_eval_suite run: each case passed or failed, with every check, the reply, the decision, the confidence, cost and latency, and the session to open in the explorer.
curl -X POST https://getwabi.dev/api/v1/get_eval_run \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","suite":"suite","run_id":"run_id"}'npx @meterapp/wabi get_eval_run --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","suite":"suite","run_id":"run_id"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"suite": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"run_id": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"agent_id",
"suite",
"run_id"
]
}replay_conversation
writeReplay a conversation against a version · POST /api/v1/replay_conversation · scope agents:write
Runs a past conversation's customer turns again against a version (the draft by default), with tools mocked or read-only (nothing is sent, nothing changes), and returns each step side by side: what the customer wrote, what was actually sent and by whom, and what this version would reply, decide, cite and cost. Use it before promoting a change. Growth plan and up.
curl -X POST https://getwabi.dev/api/v1/replay_conversation \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","conversation_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'npx @meterapp/wabi replay_conversation --json '{"agent_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","conversation_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'{
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"conversation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Conversation id."
},
"max_turns": {
"default": 5,
"type": "integer",
"minimum": 1,
"maximum": 10
},
"mocks": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"version_id": {
"description": "A specific version; default: the environment's version.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"environment": {
"default": "draft",
"description": "Which version to use when version_id is absent: the open draft (default), the test or the production version.",
"type": "string",
"enum": [
"draft",
"test",
"production"
]
}
},
"required": [
"agent_id",
"conversation_id"
]
}audit_conversations
writeAudit recent conversations · POST /api/v1/audit_conversations · scope agents:write
Conversation intelligence: analyzes the organization's conversations of the last since_hours (up to 150, newest first) with their agent sessions and failed tool calls. Counts outcomes (resolved, escalated, unanswered, open), escalation reasons and failing tools, then classifies each conversation's intent and outcome, finds recurring unresolved patterns and why they stay unresolved, documentation gaps (with an article to write), tool issues, and recommends knowledge, workflow and agent changes. Runs in the background (get_conversation_audit) unless wait: true, which answers directly for up to 60 conversations.
curl -X POST https://getwabi.dev/api/v1/audit_conversations \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi audit_conversations{
"type": "object",
"properties": {
"since_hours": {
"default": 168,
"type": "integer",
"minimum": 1,
"maximum": 2160
},
"agent_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "AI agent id."
},
"wait": {
"default": false,
"type": "boolean"
}
}
}Get a conversation audit · POST /api/v1/get_conversation_audit · scope agents:read or GET …?input=
One audit: status (running, completed, failed), period, conversations analyzed and the report (outcomes, intents, escalation reasons, failed tools, unresolved patterns, documentation gaps, tool issues, recommendations, per-conversation classification). Omit audit_id for the latest.
curl -X POST https://getwabi.dev/api/v1/get_conversation_audit \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi get_conversation_audit{
"type": "object",
"properties": {
"audit_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}List conversation audits · POST /api/v1/list_conversation_audits · scope agents:read or GET …?input=
Past conversation audits, newest first, without their reports (get_conversation_audit has one).
curl -X POST https://getwabi.dev/api/v1/list_conversation_audits \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_conversation_audits{
"type": "object",
"properties": {
"limit": {
"default": 20,
"type": "integer",
"minimum": 1,
"maximum": 100
}
}
}