Bind the user once. Ship the screens prebuilt.

Install the client for your stack. Your server binds the signed-in user with forUser, hands the model tools that have no user field, and drops prebuilt approval and connect screens into your app. Your API key never leaves your server.

A few lines on your server, then connect a user.

  1. 1.Install@anlyonhq/sdk for TypeScript, anlyon for Python.
  2. 2.Bind the useranlyon.forUser(session.userId) on your server, from your own session.
  3. 3.Hand over tools@anlyonhq/ai-sdk turns each action into a tool with its own input schema.
  4. 4.Show the screens@anlyonhq/react: approvals and connected accounts, in your theme.

Every tool you wire by hand is one more place a user id can come from the model. With the SDKs the user is bound on your server once, and nothing the model writes can change it.

Less risk

The user comes from your session, the key stays on your server, and the browser holds a token that lasts minutes.

Less cost

No connect pages, OAuth callbacks or approval inbox to design, build and keep working.

Less effort

A client, a list of tools and two components. A retried call is answered from the record, not run twice.

The pieces between your app and Anlyon. Your server names the user. The model names actions.

One client per language, the same API

@anlyonhq/sdk and anlyon cover actions, approvals, limits, your users and the audit record. anlyon.forUser(id) and client.for_user(id) return a client bound to one user that can't be switched. Every invoke carries an idempotency key, made for you when you pass none.

  • A resend after a timeout is answered from the recorded call
  • Verify each webhook delivery's signature with the SDK
  • The same methods on a client bound to a user

Your actions as tools, with no user field

@anlyonhq/ai-sdk builds AI SDK tools from your actions, each with the action's own input schema. Build them from a client bound to the user. A user who hasn't connected the account gets a connect_required result with a link instead of an error, and a gated call returns its approval id.

  • createAnlyonTools adds the list, invoke and approval tools
  • An unknown outcome is reported as unknown, and the model is told not to call again
  • Works with any AI SDK model provider

Approval and connect screens, prebuilt

@anlyonhq/react gives your app ApprovalInbox, ApprovalPrompt, ConnectButton and Connections, themed by your shadcn/ui tokens or your own CSS variables. Your server mints a session token for the signed-in user. The browser uses it, and never sees your API key.

  • A session token lasts 15 minutes by default, an hour at most
  • It lists, connects and decides for that one user, nothing else
  • It works only from the origins of your allowed redirect URLs

A link your user opens to connect their account

endUsers.createConnectLink returns a link for one user and one integration. With your own OAuth app it opens the provider's consent screen under your app's name. With Anlyon's app, a short page names your workspace first. For a key, a form checks it with the provider before keeping it.

  • Your server confirms each connection for the signed-in user
  • A link lasts 10 minutes and returns only to your redirect URLs
  • Erase a user and every connection they hold in one call

Tools for this user. A token for their browser.

The chat route builds tools from a client bound to the signed-in user. The session route gives the browser a short-lived token, and the inbox shows the user their own approvals.

app.tsx
// app/api/chat/route.ts: tools bound to the signed-in user.const tools = await anlyonTools({  client: anlyon.forUser(session.userId),  actions: ["notion-create-page", "github-create-issue"],});// app/api/anlyon/session/route.ts: a short-lived token for the browser.export const POST = createSessionHandler({  client: anlyon,  getEndUserId: async () => (await auth())?.user.id,});// In your app: the user decides their own approvals.<ApprovalInbox />

Install. Every package, one line each.

  • npm install @anlyonhq/sdk

    The TypeScript client, for Node and any server runtime.

  • pip install anlyon

    The Python client, with client.for_user(id).

  • npm install @anlyonhq/ai-sdk

    Tools for the Vercel AI SDK, built from your actions.

  • npm install @anlyonhq/react

    Approval and connect components, with a server helper for the session route.

  • npm install -g @anlyonhq/cli

    Invoke actions and decide approvals from a terminal or CI. See the CLI page.

  • https://api.anlyon.com/mcp

    The hosted MCP server, for Claude Code, Cursor, Codex and your agents. See the MCP page.

Let your agent act for your users, safely.

A few lines of server code, then send a user a connect link. Nothing to host.

$ claude mcp add --transport http anlyon https://api.anlyon.com/mcp