The scenario is common: the automation team builds a flow in n8n that calls the model directly. The product team writes another prompt in code. Someone connects an AI assistant to the same database on their own. Three "agents" that are, in fact, three raw model calls — each with its own rules, cost and history, none auditable as a whole.
Agent portability is the alternative: the agent is defined once, on the platform, and each surface — automation, code, AI client or chat channel — just invokes it. This guide shows how that works in Zihin and where the limits of each path are.
What travels with the agent
In Zihin, persona, tools, policies and memory live on the platform. Every call is an agent call, never a raw model call. That means five things apply equally, no matter where the agent is triggered from:
- Roles (RBAC). Owner, admin, editor and member, enforced in the UI and the API.
- Budget. The per-agent dollar spending cap stops execution, even with your own model key.
- Human approvals. Actions in the configured scope stay pending until the responsible person decides.
- Audit. The session can be replayed with phases, tool calls and per-call latency.
- Session. The same conversation continues across surfaces, with the history stored on the platform.
Note: The practical difference: when the approval policy changes, it changes once. The n8n flow, the TypeScript service and Claude Desktop all respect the new rule on the next call, with no deploy.
See the product view at /product. Below, each invocation path with what is published today.
How to integrate an AI agent with n8n and other automations
For those who live in flows, Zihin publishes npm packages for n8n and Activepieces, plus an adapter for Paperclip. You install it as a node or piece and invoke the agent from any flow: the trigger can be a form, a new spreadsheet row, a CRM event — the node receives the input, calls the agent and passes the answer to the next step.
What to keep in mind:
- Installation and marketplace listing vary by platform. Check each package's version before depending on it.
- The node doesn't "talk to the model"; it invokes the agent. Roles, budget and approvals apply to the call as on any other surface.
- Streaming, retries and errors behave the same across all published connectors, because they share the same core.
Zapier and Make aren't public yet. If your flow lives in one of them, today's path is the webhook (next section, on channels) or the REST API.
From your code: TypeScript SDK, Python SDK and REST API
Three options, at different levels of maturity — and it's worth being direct about that.
TypeScript SDK @zihin/agent-client 0.4.0. It's the most complete client: agent invocation, response streaming and asynchronous triggers. Published on npm.
Python SDK zihin. Published on PyPI, it covers invocation and sessions. Context, attachments and triggers are left for future versions — there's no parity with the TypeScript client today. If your case needs attachments or triggers in Python, the REST API covers it.
REST API with SSE streaming. The API has its own call contract: request, response, structured JSON output with schema validation and sending images together with text. It is not compatible with the OpenAI SDK — an existing integration may need adjustments to authentication, payload and response handling. Automatic routing (model: "auto") and the fallback chain between models live in the agent's configuration, not in your code.
Tip: Treat the SDK as the agent's entry point, not as a model wrapper. Business logic, tools and limits stay in the agent definition; the code just sends the task and consumes the result. When the team changes the model or adds a tool, the service doesn't need to change.
Quickstart, call reference and packages are at /developers.
From the AI assistant you already use, via MCP
Zihin is also an MCP server. That lets you talk to your agents and manage the platform from the AI client your team already uses: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Codex and Gemini CLI.
Through MCP, an editor manages agents, secrets and telemetry without opening the console. Two governance points still apply:
- The available tools depend on the role and permissions of whoever connected. A member doesn't gain admin powers by being in Cursor.
- Actions require approval when the configured policies say so — MCP isn't a shortcut around policy.
The MCP package, at version 2.2.2, came with the removal of the direct database connection tools: data comes in through API tools or MCP servers, such as the MCP Bridge over the read-only copy maintained by Replay. The agent doesn't receive database credentials through any path.
From channels: WhatsApp, Slack, Teams, email, webhook and scheduling
The last surface is where the end user meets the agent. Today, the published integrations are:
- WhatsApp via Twilio.
- Slack and Teams via webhook/API.
- Incoming email as a trigger.
- HTTP webhook, for any system that can make a call.
- Scheduling, for routines at set times — check the time zone, input data and result destination.
Input, response and authentication vary by channel and provider. Webhook, email and scheduling triggers are available from the Core plan; multichannel (WhatsApp, Slack, Teams) from Pro — details at /plans. Telegram and Discord aren't in the published catalog.
The point that closes the loop: the conversation started on WhatsApp is the same session that Zihin Chat shows the internal team, with pending approvals in the same place. One person approves what another triggered, right in the chat, and the audit records both.
A checklist before multiplying surfaces
- Define the agent once, with an owner. Persona, tools, approval policy and spending cap. Only then add the second surface.
- Start with the lowest-friction path. Flow already exists in n8n? Use the node. Your own product in TypeScript? Use the SDK. Team operating in Cursor? Connect MCP.
- Confirm what's published. Package version, Python SDK coverage, channel available in the plan. This post reflects what Zihin publishes today; the changelog and the documentation record what changes.
- Test approval on every surface. Trigger an action in the approval scope through n8n, the SDK and MCP, and check that they all ended up pending in the same place.
When all four steps pass, the "n8n agent", the "code agent" and the "Claude agent" stop existing. There's one agent, with one rule, seen from several places — and that's what makes AI operable in production.
Want to map the surfaces of your operation and where to start? Book a diagnostic.
Originally published in Portuguese on the Zihin blog. I work at Zihin, which connects AI agents to a company's systems and processes, with permissions, human approvals and cost tracking.
Top comments (0)