Developer docs

Integrate agent escalation without inventing a manual ops layer

Expertrouter is for systems that already generate work with AI but still need a controlled way to hand tasks to real experts.

Quickstart

  1. 1 Define the lane, attach the artifacts, and include the policy envelope your system needs respected.
  2. 2 Submit the task and keep the task id in your own orchestration layer.
  3. 3 Resume automation from the webhook event or the structured result payload.

Request body

Create a task with lane, policy, and webhook

POST /v1/tasks
Authorization: Bearer er_live_***
Content-Type: application/json

{
  "lane": "engineering.code_review",
  "pool": "hybrid",
  "task": {
    "title": "Review release candidate before deploy",
    "objective": "Find ship blockers and return a go/no-go decision.",
    "artifacts": [
      { "type": "github_pr", "value": "https://github.com/acme/app/pull/184" },
      { "type": "build_url", "value": "https://ci.acme.dev/runs/8841" }
    ]
  },
  "policy": {
    "confidentiality": "internal_first",
    "maxBudgetUsd": 350,
    "targetSlaMinutes": 30
  },
  "responseSchema": "review_decision.v1",
  "webhook": {
    "url": "https://agents.acme.dev/webhooks/expertrouter",
    "secret": "whsec_***"
  }
}
{
  "id": "task_01HV7Y7P2K3QW8J4A3M9YQ9G7Z",
  "status": "accepted",
  "lane": "engineering.code_review",
  "policy": {
    "confidentiality": "internal_first",
    "maxBudgetUsd": 350,
    "targetSlaMinutes": 30
  },
  "responseSchema": "review_decision.v1",
  "estimatedCompletionMinutes": 28
}

Policy envelope

Send the guardrails as data

confidentiality

Keep sensitive work inside the expert pool your org approves.

maxBudgetUsd

Bound cost before a task is accepted so agent-side budgets stay deterministic.

targetSlaMinutes

Express turnaround expectations in the request instead of out-of-band instructions.

Response contract

Return something the calling system can use

decision

High-signal outcome your agent can branch on immediately.

severity

Normalized urgency that makes downstream automation safer.

summary

Operator-readable narrative for logs, UI, or audit review.

actions

Ordered follow-up steps the calling system can queue or verify.

Webhook events

Resume automation when work closes

task.acceptedtask.in_progresstask.blockedtask.completed
{
  "event": "task.completed",
  "createdAt": "2026-03-31T20:10:00Z",
  "taskId": "task_01HV7Y7P2K3QW8J4A3M9YQ9G7Z",
  "schema": "review_decision.v1",
  "result": {
    "decision": "ship_with_fixes",
    "severity": "medium",
    "summary": "Two non-blocking issues found. Fix before enabling auto-merge.",
    "actions": [
      "Patch analytics env guard",
      "Regenerate release artifact after smoke test"
    ]
  }
}

Implementation notes

  • Model the lane explicitly. Keep the escalation target visible in the request instead of burying it in prose.
  • Treat policy as first-class input. Budget, confidentiality, and turnaround requirements should be machine-readable.
  • Prefer schema-backed outcomes. The result should tell your system what to do next without manual interpretation.

FAQ

Is the API publicly self-serve today?

Not yet. The marketing site positions Expertrouter as early-access infrastructure, so implementation discussions still start through the early access form.

What should my agent send with a task?

Include the lane, the concrete objective, the artifacts an expert needs, and the policy envelope that must be preserved during execution.

How should I plan the handoff back to automation?

Assume a task id, lifecycle webhooks, and a schema-backed result payload so your agent can resume with a deterministic next step.