Embed Kumo
Use the Agent API and Agent Kit SDK. Kumo's model plans and runs the work.
Agent quickstart →Embed Kumo's complete agent, call individual HR operations, connect another agent over MCP, or let Kumo act through tools you publish. This is the full public contract, with runnable requests and real response shapes.
const kumo = new KumoAgentClient({
token: delegated.accessToken
});
const thread = await kumo.createThread({
title: "New-starter readiness"
});
const result = await kumo.sendMessage(
thread.data.thread.id,
{ message: "Check Monday's starters." }
);
for await (const event of kumo.streamRun(
result.data.runId
)) {
console.log(event);
}All Kumo surfaces share one identity and governance model. Every request is attached to a named Kumo user. Scopes can narrow that user's live role; they can never widen it.
Use the Agent API and Agent Kit SDK. Kumo's model plans and runs the work.
Agent quickstart →Use versioned REST endpoints for focused, permission-aware HR operations.
REST reference →Point Cursor, Claude Code, VS Code, or your own MCP client at Kumo.
Inbound MCP →Register a published MCP server or run the outbound Connector privately.
Outbound MCP →Create an admin integration credential under Settings → API access. Keep it on your backend, exchange it for a short-lived named-user credential, then create a thread and send work to Kumo.
Select Integration and grant only the scopes your application needs.
Exchange on your backend. The user must already belong to the Kumo workspace.
Threads hold conversational continuity across messages and runs.
Use SSE for live progress and reconnect from the last event id.
Show approval or co-sign cards instead of auto-accepting actions.
npm install @kumohr/agent-sdkimport { KumoAgentClient } from "@kumohr/agent-sdk";
const integration = new KumoAgentClient({
token: process.env.KUMO_INTEGRATION_CREDENTIAL!
});
const delegated = await integration.exchangeCredential({
userId: kumoUserId,
externalSessionId: yourSession.id,
scopes: [
"agent:run",
"agent:read",
"agent:approve",
"agent:artifacts"
]
});const kumo = new KumoAgentClient({
token: delegated.accessToken
});
const created = await kumo.createThread({
title: "New-starter readiness"
});
const result = await kumo.sendMessage(
created.data.thread.id,
{
message:
"Check Monday's starters and prepare missing actions."
}
);
if (result.data.kind === "run") {
for await (const event of kumo.streamRun(
result.data.runId
)) {
renderAgentEvent(event);
}
}The Agent Kit package is currently distributed during technical onboarding. The REST and MCP contracts are public and usable without the SDK.
Kumo never runs an anonymous service agent. Credentials are workspace-bound, revocable, expirable, and shown once.
kumo_REST, MCP, development, and user-owned integrations
30–365 dayskumo_app_Customer backend; exchanges for delegated credentials
30–365 dayskumo_dlg_Short-lived application session for one existing user
15 minutesAuthorization: Bearer kumo_YOUR_TOKENleave:readRead leave requests and balancesleave:writeCreate leave requestsreports:readRun read-only reportsagent:runStart and continue Kumo agent workagent:readRead agent conversations, runs, and eventsagent:approveApprove or decline agent actionsagent:artifactsUpload inputs and retrieve agent deliverablesaudit:readRead and export the agent audit trailA scope grants no role permission by itself. Kumo resolves the user's current workspace role on every call, then intersects it with the credential scopes.
https://kumohr.comAll versioned REST routes begin with /api/v1.
{ data, requestId }Failures return { error: { code, message } }.
Idempotency-KeyRequired on Agent API mutations. Reuse only for an identical request.
auditCorrelationIdJoins the external request to model, approval, tool, receipt, and outcome events.
60/minutePer credential. Respect Retry-After on HTTP 429.
ISO 8601 · opaque IDsTimestamps are UTC. Treat every identifier as an opaque string.
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 42
Retry-After: 42 # only on 429Kumo reads the user request and owned attachments.
The model proposes a durable, permission-aware run.
A person starts the plan and decides every committed action.
Native and connected tools run with idempotency and attribution.
Reports, tables, charts, and files remain attached to the run.
The full trace is encrypted, correlated, hash-chained, and exportable.
draftawaiting_inputawaiting_approvalrunningawaiting_externalcompletedA run may finish as failed or cancelled from any non-terminal stage. Parked external work resumes from a durable checkpoint.
Search the complete Agent API and focused REST surface. Expand an operation for parameters, behavioral notes, a runnable cURL request, and a real response shape.
Issue a short-lived credential delegated to an existing named Kumo user. The user must already belong to the integration credential’s workspace.
curl -X POST "https://kumohr.com/api/v1/agent/token" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"userId": "usr_8f2b…",
"externalSessionId": "portal-session-01839",
"scopes": [
"agent:run",
"agent:read",
"agent:approve",
"agent:artifacts"
]
}'{
"tokenType": "Bearer",
"accessToken": "kumo_dlg_…",
"expiresAt": "2026-08-21T10:30:00.000Z",
"userId": "usr_8f2b…",
"tenantId": "tenant_42ac…",
"scopes": [
"agent:run",
"agent:read",
"agent:approve",
"agent:artifacts"
],
"auditCorrelationId": "2b90…"
}List the delegated user’s Kumo conversations, newest activity first.
curl "https://kumohr.com/api/v1/agent/threads" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"threads": [
{
"id": "thread_19d0…",
"title": "New-starter readiness",
"createdAt": "2026-08-21T09:00:00.000Z",
"updatedAt": "2026-08-21T09:08:00.000Z",
"lastRun": {
"id": "run_e75f…",
"title": "Check new starters",
"status": "completed"
}
}
]
},
"requestId": "req_…"
}Create a conversation for embedded Kumo work.
curl -X POST "https://kumohr.com/api/v1/agent/threads" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"title": "New-starter readiness"
}'{
"data": {
"thread": {
"id": "thread_19d0…",
"title": "New-starter readiness",
"createdAt": "2026-08-21T09:00:00.000Z",
"updatedAt": "2026-08-21T09:00:00.000Z",
"lastRun": null
}
},
"requestId": "req_…",
"auditCorrelationId": "88a1…"
}Read a conversation and its ordered user, assistant, and run turns.
curl "https://kumohr.com/api/v1/agent/threads/RESOURCE_ID" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"thread": {
"id": "thread_19d0…",
"title": "New-starter readiness"
},
"turns": [
{
"id": "turn_1",
"role": "user",
"content": "Check whether Monday’s starters are ready.",
"runId": null,
"createdAt": "2026-08-21T09:01:00.000Z"
},
{
"id": "turn_2",
"role": "run",
"content": null,
"runId": "run_e75f…",
"run": {
"id": "run_e75f…",
"title": "Check new starters",
"status": "completed"
}
}
]
},
"requestId": "req_…"
}Let Kumo reply conversationally or plan a durable agent run using Kumo’s model runtime.
curl -X POST "https://kumohr.com/api/v1/agent/threads/RESOURCE_ID/messages" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"message": "Check whether Monday’s starters are ready and prepare the missing actions.",
"attachmentIds": [
"attachment_c32d…"
]
}'{
"data": {
"kind": "run",
"runId": "run_e75f…",
"detail": {
"run": {
"id": "run_e75f…",
"status": "awaiting_approval"
},
"steps": [
{
"id": "step_1",
"title": "Read upcoming starters",
"status": "pending"
}
],
"actions": [],
"artifacts": [],
"auditCorrelationId": "bc13…"
}
},
"requestId": "req_…"
}Read the plan, events, pending actions, and artifacts for one owned run.
curl "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"run": {
"id": "run_e75f…",
"title": "Check new starters",
"status": "awaiting_approval",
"createdAt": "2026-08-21T09:01:00.000Z"
},
"steps": [
{
"id": "step_1",
"title": "Read upcoming starters",
"status": "pending"
}
],
"events": [
{
"id": "18201",
"type": "plan_proposed",
"payload": {
"stepCount": 3
}
}
],
"actions": [],
"artifacts": []
},
"requestId": "req_…"
}Open a resumable Server-Sent Events stream. Use the SSE `id` or `?cursor=` value to continue without losing events.
curl "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/events" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"id: 18202\nevent: agent.event\ndata: {"id":"18202","type":"step_started","payload":{"title":"Read upcoming starters"}}\n\nRecord the named user’s plan decision and start or cancel the run.
curl -X POST "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/decisions" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"decision": "approve"
}'{
"data": {
"runId": "run_e75f…",
"decision": "approve",
"status": "running"
},
"requestId": "req_…",
"auditCorrelationId": "e21d…"
}Answer a clarification and resume planning or execution.
curl -X POST "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/answers" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"answer": "Use the London onboarding template."
}'{
"data": {
"runId": "run_e75f…",
"status": "awaiting_approval"
},
"requestId": "req_…",
"auditCorrelationId": "39fe…"
}Cancel a non-terminal run and preserve the reason in the audit ledger.
curl -X POST "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/cancel" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"reason": "The source data is being corrected."
}'{
"data": {
"runId": "run_e75f…",
"status": "cancelled"
},
"requestId": "req_…",
"auditCorrelationId": "72ac…"
}Approve, decline, retry, interrupt, or co-sign a pending action.
curl -X POST "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/actions/ACTION_ID/decisions" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"decision": "approve"
}'{
"data": {
"actionId": "action_4be2…",
"decision": "approve",
"status": "done",
"summary": "Manager nudges prepared."
},
"requestId": "req_…",
"auditCorrelationId": "adc1…"
}Upload and extract a file for the next Kumo message using multipart form data.
curl -X POST "https://kumohr.com/api/v1/agent/attachments" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-F "file=@document.pdf"{
"data": {
"attachment": {
"id": "attachment_c32d…",
"name": "onboarding-plan.pdf",
"mime": "application/pdf",
"sizeBytes": 84211,
"status": "ready",
"summary": "Onboarding plan for the London cohort."
}
},
"requestId": "req_…",
"auditCorrelationId": "a67b…"
}List deliverables produced for the delegated user. Use `?limit=1..100`.
curl "https://kumohr.com/api/v1/agent/artifacts" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"artifacts": [
{
"runId": "run_e75f…",
"runTitle": "Check new starters",
"artifact": {
"id": "artifact_41dd…",
"kind": "summary",
"title": "New-starter readiness",
"createdAt": "2026-08-21T09:07:00.000Z"
}
}
]
},
"requestId": "req_…"
}Retrieve one owned run artifact and its structured body.
curl "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/artifacts/ARTIFACT_ID" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"artifact": {
"id": "artifact_41dd…",
"kind": "summary",
"title": "New-starter readiness",
"body": {
"markdown": "# Readiness\\n\\nThree starters are ready; one needs equipment."
}
}
},
"requestId": "req_…"
}Download an owned deliverable as Markdown, CSV, or JSON.
curl "https://kumohr.com/api/v1/agent/runs/RESOURCE_ID/artifacts/ARTIFACT_ID/download" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"Binary response with Content-Disposition attachmentRead decrypted tenant-visible events with request, run, action, tool, and integrity correlation.
curl "https://kumohr.com/api/v1/agent/audit" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"events": [
{
"id": "291",
"sequence": "84",
"eventType": "agent.action.approve",
"outcome": "success",
"requestId": "req_…",
"runId": "run_e75f…",
"actionId": "action_4be2…",
"eventHash": "adc1…",
"occurredAt": "2026-08-21T09:06:00.000Z"
}
],
"nextCursor": "84"
},
"requestId": "req_…"
}Admin-only signed manifest for the tenant’s hash-chained ledger.
curl "https://kumohr.com/api/v1/agent/audit/export" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"manifest": {
"version": 1,
"tenantId": "tenant_42ac…",
"eventCount": 84,
"rootHash": "f19a…",
"integrity": {
"ok": true,
"brokenAt": null
}
},
"signature": "HMAC-SHA256 signature",
"algorithm": "HMAC-SHA256"
}Verify a signed manifest against Kumo’s audit signing key.
curl -X POST "https://kumohr.com/api/v1/agent/audit/verify" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"manifest": {
"version": 1,
"tenantId": "tenant_42ac…"
},
"signature": "…"
}'{
"data": {
"valid": true,
"tenantId": "tenant_42ac…",
"checkedAt": "2026-08-21T09:10:00.000Z"
},
"requestId": "req_…"
}List event endpoints, recent delivery attempts, and supported event names.
curl "https://kumohr.com/api/v1/agent/webhooks" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"endpoints": [
{
"id": "webhook_a10c…",
"label": "Customer portal",
"url": "https://example.com/kumo/events",
"enabled": true,
"events": [
"agent.run.completed",
"agent.action.required"
]
}
],
"deliveries": [],
"supportedEvents": [
"agent.run.completed",
"agent.run.failed",
"agent.run.cancelled",
"agent.action.required",
"agent.artifact.created",
"agent.connector.health"
]
},
"requestId": "req_…"
}Create a signed HTTPS event endpoint. The signing secret is returned once.
curl -X POST "https://kumohr.com/api/v1/agent/webhooks" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"label": "Customer portal",
"url": "https://example.com/kumo/events",
"events": [
"agent.run.completed",
"agent.action.required"
]
}'{
"data": {
"endpoint": {
"id": "webhook_a10c…",
"label": "Customer portal",
"url": "https://example.com/kumo/events",
"events": [
"agent.run.completed",
"agent.action.required"
],
"enabled": true
},
"signingSecret": "kumo_wh_…"
},
"requestId": "req_…",
"auditCorrelationId": "eb91…"
}Stop future deliveries without deleting delivery history.
curl -X DELETE "https://kumohr.com/api/v1/agent/webhooks/RESOURCE_ID" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Idempotency-Key: unique-request-id"{
"data": {
"id": "webhook_a10c…",
"enabled": false
},
"requestId": "req_…"
}Returns the authenticated user, workspace (tenant), role, employee id, and the scopes this token carries. Use it to verify a token before wiring anything else.
curl "https://kumohr.com/api/v1/me" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"token": {
"name": "Zapier integration",
"scopes": [
"leave:read",
"reports:read"
]
},
"user": {
"id": "uuid",
"name": "Amara Okafor",
"email": "amara@acme.com",
"role": "HR_MANAGER"
},
"tenant": {
"id": "uuid",
"name": "Acme Ltd"
},
"employee_id": 214
}
}Lists leave requests you are allowed to see: your own for self-service roles, your team’s for line managers, your department’s for directors, the whole workspace for HR and admins. Filter by status and date range.
statusquerystringFilter by status. Values: PENDING, APPROVED, REJECTED, CANCELLED, IN_PROGRESS, COMPLETED.
fromquerystringOnly requests ending on or after this date (YYYY-MM-DD).
toquerystringOnly requests starting on or before this date (YYYY-MM-DD).
limitquerynumberMax rows to return (1–200, default 50).
curl "https://kumohr.com/api/v1/leave/requests" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"requests": [
{
"id": "uuid",
"employee_id": 214,
"employee_name": "Amara Okafor",
"policy": "Annual Leave",
"start_date": "2026-09-07",
"end_date": "2026-09-11",
"total_days": 5,
"half_day": false,
"status": "APPROVED",
"reason": "Family trip",
"created_at": "2026-08-30T09:15:00.000Z"
}
]
}
}Books time off for the token’s user through the platform’s own leave engine. Policy validation, balance movement, approval routing, and notifications all run exactly as from the app. Pass start_date plus either end_date or days; the policy defaults to annual leave.
start_datebodyrequiredstringFirst day off (YYYY-MM-DD).
end_datebodystringLast day off, inclusive (YYYY-MM-DD). Use this OR days.
daysbodynumberNumber of consecutive calendar days off. Use this OR end_date.
policybodystringLeave policy name, e.g. "Annual Leave". Defaults to the annual policy.
policy_idbodystringExact policy id (overrides policy).
reasonbodystringOptional short reason.
half_daybodybooleanTrue for a single half-day request.
curl -X POST "https://kumohr.com/api/v1/leave/requests" \
-H "Authorization: Bearer kumo_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
--data '{
"start_date": "2026-09-07",
"end_date": "2026-09-07",
"days": 2,
"policy": "Annual Leave",
"policy_id": "value",
"reason": "Family trip",
"half_day": false
}'{
"data": {
"id": "uuid",
"status": "PENDING",
"policy": "Annual Leave",
"start_date": "2026-09-07",
"end_date": "2026-09-08",
"total_days": 2,
"warnings": []
}
}Per-employee untaken leave for a year: allocated, used, and remaining days with department and manager, sorted by most untaken first. Runs through the same permission-gated reporting tool Kumo’s agent uses. Your role decides whose rows you see.
yearquerynumberBalance year (defaults to the current year).
min_untaken_daysquerynumberOnly employees with at least this many untaken days.
policyquerystringLeave policy name filter (defaults to annual policies).
curl "https://kumohr.com/api/v1/reports/untaken-leave" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"{
"data": {
"year": 2026,
"employees": [
{
"employee": "Amara Okafor",
"department": "Engineering",
"manager": "Lena Fischer",
"allocated_days": 25,
"used_days": 6,
"untaken_days": 19
}
],
"totals": {
"employees": 42,
"untakenDays": 512
}
}
}Stream /api/v1/agent/runs/{id}/events. Kumo sends standard SSE ids so a dropped client can continue from its final durable event.
curl -N "https://kumohr.com/api/v1/agent/runs/RUN_ID/events?cursor=18201" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"event: status
data: {"status":"running","requestId":"req_..."}
id: 18202
event: agent.event
data: {"id":"18202","type":"step_started","payload":{"title":"Read upcoming starters"}}
event: heartbeat
data: {"cursor":"18202"}
event: done
data: {"cursor":"18209"}statusCurrent persisted run statusagent.eventPlan, tool, action, artifact, warning, or outcomeheartbeatConnection liveness and current cursordoneTerminal run; close the streamerrorTransport or data-source failureSSE is the interactive channel. Webhooks notify your backend when work needs attention or reaches a durable outcome. Delivery is signed and retried with backoff.
agent.run.completedagent.run.failedagent.run.cancelledagent.action.requiredagent.artifact.createdagent.connector.healthKumo-Webhook-Id: delivery_...
Kumo-Webhook-Timestamp: 1787290200
Kumo-Webhook-Signature: v1=7dc7...
# Signed input:
HMAC_SHA256(signing_secret, timestamp + "." + raw_body)const valid = await verifyWebhookSignature({
secret: process.env.KUMO_WEBHOOK_SECRET!,
timestamp: request.headers.get("Kumo-Webhook-Timestamp")!,
body: rawBody,
signature: request.headers.get("Kumo-Webhook-Signature")!,
toleranceSeconds: 300
});
if (!valid) return new Response("Invalid signature", { status: 401 });JSON re-serialization changes bytes and invalidates the signature. Verify before parsing.
Point an MCP client at https://kumohr.com/api/mcp. Tools are filtered to the PAT's scopes and the named user's role.
Register a published HTTPS MCP server or run the Connector inside your network. Every external action remains human-confirmed.
{
"mcpServers": {
"kumo-hr": {
"type": "http",
"url": "https://kumohr.com/api/mcp",
"headers": {
"Authorization": "Bearer kumo_YOUR_TOKEN"
}
}
}
}KUMO_URL=https://kumohr.com \
KUMO_CONNECTOR_TOKEN=kumo_cn_... \
MCP_URL=http://127.0.0.1:8799/mcp \
npm run mcp:connectorKumo correlates the credential, external session, message, model calls, plan, approvals, tools, MCP receipts, artifacts, credits, recovery, and final outcome.
Full-fidelity business payloads use AES-256-GCM after secret redaction.
Tenant sequence, previous hash, event hash, and server signature expose tampering.
Plan approval, action decisions, amendments, and co-signatures are normalized records.
Admins export a manifest and verify it through the Audit API.
curl "https://kumohr.com/api/v1/agent/audit?runId=RUN_ID&limit=100" \
-H "Authorization: Bearer kumo_YOUR_TOKEN"400Invalid requestMalformed fields, unsupported decision, or missing idempotency key.
401UnauthorizedMissing, unknown, revoked, expired, or invalid credential.
403ForbiddenMissing scope, live role denial, or admin-only operation.
404Not foundThe resource does not exist or is not owned by this named user.
409ConflictInvalid run state, duplicate in progress, or idempotency mismatch.
413File too largeThe attachment exceeds the accepted upload limit.
415Unsupported mediaKumo cannot extract that attachment type.
429Rate limitedWait for the number of seconds in Retry-After.
{
"error": {
"code": "idempotency_conflict",
"message": "That Idempotency-Key was already used for a different request."
},
"requestId": "req_..."
}We will map identities, system boundaries, named tools, approvals, and residency with your engineering team.