Agents
Waypath is the secure customer intelligence and action layer for external agents. API, CLI, and MCP all expose the same capability gateway, so agents can discover what they may do, dry-run it, queue it for approval, execute it when explicitly allowed, and inspect the resulting receipt.
Most agent code follows the same loop: pull trusted lifecycle context, choose the next move, ask Waypath to queue or execute the action, then write the outcome back. Waypath handles workspace binding, capability grants, action credits, idempotency, AOS approval, and audit receipts.
01The capability gateway
| Endpoint | Purpose |
|---|---|
GET /api/v1/capabilities | Grant-filtered list of callable capabilities with schemas, examples, costs, modes, and approval behavior. |
POST /api/v1/capabilities/:id/invoke | Invoke a capability with dry_run, queue, or execute mode. |
GET /api/v1/capabilities/usage/actions | Current action-credit quota and recent action ledger rows. |
GET /api/v1/capabilities/actions/:request_id | Receipt for a capability invocation. |
GET /api/v1/capabilities/pending/:pending_action_id | AOS pending-action status and timeline. |
Initial capabilities include context.get, account.get, events.ingest,
memory.write, score.churn, score.conversion, plan.goal,
draft.outreach, queue.outreach, execute.outreach, queue.call,
execute.call, crm.mutate, cio.write, and report.generate.
02Two ways in
MCP. MCP tools are generated from the capability list for the active
wp_live_... key:
waypath-mcp
REST. Same surface, any language. Send X-API-Key: wp_live_... or
Authorization: Bearer wp_live_... to https://api.waypath.app.
CLI. The wp binary is the fastest developer path:
wp auth login --key wp_live_...
wp capabilities list
wp capabilities explain context.get
wp doctor
03What the agent sees
{
"customer": "Jane Doe . Acme (250-1000)",
"customer_id": "cus_8af2",
"lifecycle_stage": "opportunity",
"sentiment_trajectory": { "30d": "declining", "trigger": "support_ticket_unresolved" },
"intent_signals": ["viewed_pricing_3x", "downloaded_whitepaper"],
"open_loops": ["awaiting_security_review"],
"blockers": ["procurement_review_q2"],
"recent_decisions": [
{ "agent": "support_v2", "action": "escalate_to_human", "outcome": "ticket_resolved", "ts": "2026-04-12T14:22:11Z" }
]
}
That context comes from context.get. Side-effecting capabilities return the
same envelope with status, action_credit_cost, request_id, quota, and,
when approval is required, pending_action_id.
04Where to start
- Quickstart. 90 seconds from zero to a customer-context call.
- Capabilities. Canonical API/CLI/MCP contract.
- API Keys. Issue, scope, rotate.
- Customer Context. The read primitive.
- Lifecycle Writes. The decision/action/observation ledger.
- Account Brief. The B2B roll-up.
- Events. Single + batch ingest.
- MCP Setup. Claude Desktop, Cursor, ChatGPT.
- CLI. The
wpbinary.
05Internal agent ecosystem
The same primitives back Waypath's own multi-buddy system, an orchestrator plus four specialists that drive the platform surface.
- Orchestrator and Buddies. Personas, tool allowlists, delegation flow.
- Playbooks. Executable agent specs.
- BYOK. Per-buddy model routing (Metered, Claude, OpenAI).