Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview
On this page

anlyon-end-users

The Agent Skill for acting in each of your users' own accounts: forUser, connect links and the confirming callback, per-user limits, approvals your users decide in your app, session tokens and the React components.

anlyon-end-users teaches your coding agent to build what Act for your users describes: your users connect their own accounts, such as GitHub or Notion, and every call your agent makes in those accounts runs under that user’s limit, waits for that user’s yes where a policy asks for it, and returns a receipt.

What it teaches

  • The trust model, as rules it must not break. Your server names the user from its own session with anlyon.forUser(id). The model never sees or sets a user id. The API key stays on the server. Every connection is confirmed in your callback for the signed-in user. Production keys require an end user.
  • The console steps it asks you to do: the redirect URL, your own OAuth app, connect confirmation.
  • The server code: the client module, the connect callback with parseConnectRedirect and connections.confirm, connect links, anlyonTools bound with forUser for the Vercel AI SDK, and EndUserConnectionRequiredError without it.
  • Limits and approvals per user: an impact limit with scope: 'end_user', and a policy with decidedBy: 'end_user'.
  • The UI: a Connect button for connect_required, and approvals either through @anlyonhq/react or your own routes on endUsers.approvals.
  • Removal: disconnecting an account, and erasing a user when they delete their account.

When it loads

When code needs anlyon.forUser or client.for_user, the Anlyon-End-User header, connect links or the connect callback, connect_required or END_USER_NOT_CONNECTED, end-user approvals, session tokens, or the components ApprovalInbox, ApprovalPrompt, ConnectButton, Connections and ConnectPrompt.

What’s inside

File Holds
SKILL.md The rules, the checklist and the core server code
references/server-routes.md Approval routes, the Python SDK, every end-user endpoint and its scope
references/react-components.md Session route, provider, components, theming, session errors
LICENSE MIT

Download: anlyon-end-users.zip.

Install

npx skills add https://docs.anlyon.com --skill anlyon-end-users

Install anlyon-governed-actions with it: the actions that reach your users’ accounts are defined there.

Try it

Our assistant should open issues in each user’s own GitHub repositories. Each user approves every issue in our app, and can open at most 20 a day.

Add a Connected accounts page to settings where users connect GitHub and Slack, using the Anlyon React components.

When a user deletes their account, remove everything Anlyon holds for them.

Was this page helpful?