Changelog
Notable changes to the Zihin API.
2026-10-18 — Chat turn ids, idempotent resend, push per company (releases 2026.10.14 to 2026.10.17)
Added — chat and sessions
- Turn ids in the stream:
response/doneevents ofPOST /api/v2/agents/:id/streamnow carryexecution_id,user_message_idandassistant_message_id. - Idempotent resend: the stream accepts
client_message_id. Resending the same message does not start a new turn; the completed answer is replayed withidempotent_replay: true. Reusing the id with a different message returnsIDEMPOTENCY_CONFLICT(409). - One turn per conversation on
/stream: a second message while a turn is running is refused withSESSION_BUSY. - Cancel by turn: the chat can stop its own turn by
execution_id; cancelling requires a session of your own company (and, formember, of your own conversation). - Turn in progress:
GET /api/v1/sessions/:idreturnsdata.session.active_turn, andGET /api/v1/me/eventsemitsturn_startedandturn_finished(withoutcome).session_updatednow carriesexecution_id. - Interrupted replies: a reply stopped by the user or by the time limit stays in the history with
metadata.interrupted(userortimeout). Partial text is kept only when safe; otherwise a platform note is stored. GET /api/v1/me/unread-by-tenant: unread conversations and pending approvals for each company of the signed-in user (user token only).GET /api/v1/sessionsnow returnsmeta.has_more.GET /api/v2/agentsreturnsavatar_urlandsystem_labelforadmin,editorandownertoo.
Added — push notifications
- The payload carries
tenant_id,categoryandtenant_name; tapping opens the right company. - Approval requests use
category: "approval_pending"withpending_action_idand open the approvals inbox; results useapproval_outcome. Decisions are made only in the interface. - A device receives notifications from all the companies of its owner.
Changed
- Unknown
statusfilter values in approvals, executions, tasks and sessions listings now return400with the accepted values, instead of an empty list. - Push is delivered only to active members of the company. A device registered by another person is removed from the previous account.
- The browser caches the CORS preflight for 10 minutes.
- Cancelled turns record the reason in the execution
error_message(cancelled:<reason>).
Fixed
- A provider failure in the middle of a reply no longer saves, as the agent's answer, the text of a turn that used tools or claimed an action was done.
2026-10-04 — @zihin/mcp-server 2.2.2 + tenant database removed from the MCP Server
Removed — MCP Server
- Tenant database feature: the 9 connection tools (
list_connections,get_connection,create_connection,update_connection,delete_connection,test_connection,get_connection_schema,get_connection_semantic,refresh_connection_schema), thedb_configschema type and thedb_eventtrigger. Database access is now done through anapi_configtool or your own MCP server. - MCP role counts:
admin/owner96 → 88,editor52 → 48,member5 (unchanged). Resources: 19 (3 catalogs + 10 formal contracts + 6 skills).
Changed — npm package @zihin/mcp-server 2.2.2
- Bundled skills resynchronized with the server: no database content, plus persistent memory, engagement control, quick replies and per-tool timeouts.
- The proxy now reports its real package version in the handshake (
serverInfo/clientInfo) and in the startup banner (2.2.1 identified itself as 2.2.0). - No breaking change in the proxy. To pick it up, see MCP Server — Updating.
2026-09-01 — Agent connectors on npm + @zihin/agent-client 0.4.0
Published
@zihin/agent-client0.4.0 — the agent-invocation core:invokeAgent/streamAgent(SSE), async triggers,listAgents. Dual CJS+ESM build.n8n-nodes-zihin0.9.0 — the Zihin Agent node over the core (community node).@zihin/piece-zihin0.3.0 — Activepieces piece (Invoke Agent); marketplace listing in progress.zihin-paperclip-adapter0.3.0 — Paperclip adapter over the core.
Changed — agent-client 0.4.0
- Per-operation timeouts sized above the backend's turn budgets (200 s stream / 260 s dispatch / 35 s reads) — the client now receives the server's structured turn outcome instead of aborting first.
AgentResult.contentSource('response'|'tokens') marks whether the text is the agent's final answer or a raw partial;contentno longer falls back to concatenated stream deltas.- Commercial errors are typed:
trial_expired,no_subscription,quota_exceeded(previously surfaced as generic auth / rate-limit); an exhausted quota is no longer retried. updateTriggerdoes read-merge-write ontrigger_config— a partial update no longer wipes stored callback auth, body templates or response transforms.
2026-07-02 — MCP Skills + @zihin/mcp-server 1.4.0
Added — Skills (6 expert playbooks)
- 6 skills served by the MCP Server as resources
zihin://skills/{slug}(total resources: 13 → 19):mcp(router),criar-agente,tools-de-agente,triggers-e-canais,diagnostico,governanca-e-operacao. Skills encode multi-tool workflows, decision trees and silent-failure gotchas — the server's instructions direct the model to read the relevant skill before multi-step flows (zero-install in any MCP client).
Added — npm package @zihin/mcp-server 1.4.0
install-skillssubcommand: installs the skills in each IDE's native format —--client claude|cursor|windsurf|codex|all,--dir,--global(claude),--bundled(offline). Fetches from the live server by default (always current).- Claude Code plugin:
claude plugin marketplace add zihin-ai/zihin-mcp+claude plugin install zihin@zihin— MCP server + skills in one command.
2026-07-01 — MCP Server v2.4.0
Added — MCP Tools (13 new, total now 96)
- Budget:
get_agent_budget,list_agent_budgets(read),set_agent_budget(write) — per-agent USD spend cap, counts every LLM call including BYOK - Approvals — HITL:
list_approvals,list_approval_policies,get_approval_policy(read),create_approval_policy,update_approval_policy(write) - Observability:
get_agent_lineage,get_tenant_health,get_execution_trace,get_session_agent_tree— aggregated server-side - Consumer Profile:
list_consumer_sessions— sessions of a specific consumer, cross-agent update_agentnow acceptschat_enabled(native chat channel gate)list_agent_sessionsnew filters:control_mode,consumer_key,roots_only
Added — Formal contracts and client UX
- 10 new resources
zihin://schemas/{type}— the exact JSON Schema the server validates with, plus anmcp_usagefield explaining granularity (schema_datapayloads vs full entities with server-injected fields) ToolAnnotationson all 96 tools (read-only/destructive/idempotent/open-world hints + titles) — clients can auto-approve reads and confirm destructive calls- Role-aware server instructions sent on
initialize(workflows, critical rules, contract-first flow)
Changed
- RBAC hardening: tool registration is now filtered by role —
editorno longer sees write tools intools/list; hardened call-time permission checks across all write tools ZIHIN_ROLE(stdio) is now downgrade-only — it can no longer escalate above the API Key's roleget_agent_metricsaggregates LLM metrics server-side (fixes a metrics undercount on large datasets) and addserrors,success_rate,latency_p50_ms/latency_p95_ms,last_call_at; tool usage is sampled with an explicitsample_truncatedflag- MCP role counts:
admin/owner83 → 96,editor42 → 52,member5 (unchanged)
Removed
- Legacy schema types
knowledgeandpolicyremoved fromcreate_schema/update_schemaenums and fromzihin://schema-templates(superseded by canonical types)
2026-05-29 — Session Control Lifecycle
Added — Session Control endpoints
POST /api/v1/sessions/:id/suspend— pause the agent on a specific sessionPOST /api/v1/sessions/:id/resume— resume the agent (control_mode='engaged')POST /api/v1/sessions/:id/handoff— markcontrol_mode='manual_handoff'POST /api/v1/sessions/:id/cancel— abort an in-progress turn (mid-LLM, mid-tool)POST /api/v1/sessions/:id/manual-message— operator sends a message through the agent's outbound channel; supportsIdempotency-KeyheaderGET /api/v1/sessions— new filters:control_mode,consumer_key- Session detail payload now includes
control_modeandcontrol_metadata
Added — Consumers endpoints
GET /api/v1/consumers— paginated list of cross-session consumers (filters:search,blocked)GET /api/v1/consumers/:key— aggregated profile (channels, total sessions, total turns)GET /api/v1/consumers/:key/sessions— sessions associated with a consumerPOST /api/v1/consumers/:key/deny— add to tenant-wide denylist (telemetry:write)DELETE /api/v1/consumers/:key/deny— remove from denylist
Added — MCP Tools (5 new, total now 83)
- Consumer Profile (owner, admin, editor):
get_consumer_profile,list_consumers - Consumer Ops (owner, admin):
set_consumer_denylist,set_session_control,send_manual_message,cancel_agent_turn
Changed
- MCP role counts:
admin/owner76 → 83,editor39 → 42,member5 (unchanged) - Webhook responses use empty TwiML (
<Response></Response>) when a gate blocks (denylist, suspended session). No LLM call, no quota consumed.
Workroom Realtime Events (new)
Tenant-scoped events emitted per tenant on the realtime events channel:
session_control_changed— whencontrol_modechanges (suspend/resume/handoff/auto-expire)consumer_denylist_changed— when a consumer is added or removed from the denylistmanual_message_sent— when an operator sends a manual messageturn_cancelled— when an agent turn is cancelled
Error Codes (new)
INVALID_SESSION_STATE(409) — manual-message attempted whilecontrol_mode='engaged'NO_TRIGGER_HISTORY(422) — manual-message on a session with no prior webhook historyNO_CALLBACK_CONFIG(422) — manual-message on a trigger without an outbound callback configuredDELIVERY_FAILED(502) — outbound channel (e.g., Twilio) returned an error
2026-02-17
Added
- Public documentation portal at docs.zihin.ai
- N8N integration nodes documentation
- Zihin Watch observability documentation
Docs are updated continuously. For feature requests and bug reports, contact the Zihin team.