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

Install a pack

Install an integration's ready-made toolset, reads plus governed writes with read-backs, approval policies and suggested limits, from the console, the CLI or the TypeScript SDK.

Giving an agent GitHub or Notion means writing dozens of action definitions by hand: each URL, header, input schema, impact and read-back rule, then the approval policies and limits around them. A pack is that work done once, in one file. Installing it makes the same API calls you would make yourself, so you get a full, governed toolset in minutes and review it before your agent uses any of it.

A pack holds:

  • The account it needs. A connected account, sent as {{connection:<integration>}}, so each call acts in the right person’s account. See Act in your users’ accounts.
  • Reads. A read changes nothing. It returns the provider’s answer, draws from no limit, gets no receipt, and is logged. An approval policy can still match it.
  • Governed writes. Each write is a declared action: it declares what it changes, is counted against limits, and gets a receipt. Where the provider can show the change, a read-back grades the receipt confirmed. A write with no read-back says why in its description and grades acknowledged.
  • Approval policies, installed off. You review each one and turn it on. A pack cannot install a policy that approves on anyone’s behalf.
  • Suggested limits. Created only when you ask (--with-limits). Otherwise the install prints them.

There is no pack endpoint and nothing a pack enforces on its own. Every rule is the one Anlyon enforces for any declared action.

Choose a pack

Each integration you can connect has a pack with its operations:

Integration Pack What it covers
Asana anlyon/asana Workspaces, projects, sections and tasks: create, comment, complete, tag, move
Attio anlyon/attio People, companies, notes, lists and tasks
Discord anlyon/discord Channels, messages, threads, pins
GitHub anlyon/github Issues, pull requests, reviews, labels, branches, file contents
Intercom anlyon/intercom Contacts, companies, conversations, tags, articles
Notion anlyon/notion Pages, databases, blocks and comments
PagerDuty anlyon/pagerduty Incidents, notes, on-calls, maintenance windows
Resend anlyon/resend Emails, domains, contacts and segments
Sentry anlyon/sentry Issues, events, releases: resolve, assign, archive, prioritize
Stripe anlyon/stripe Customers, payments, refunds, invoices, subscriptions

Each pack’s installed actions are named <integration>-<action>, for example github-create-issue. That prefix is what puts them on the integration’s own MCP server, https://api.anlyon.com/mcp/github. See One integration’s MCP server.

Install from the console

Open Integrations, connect the integration, then choose its operations on What may your agent do here?. The console installs the pack’s actions one switch at a time, with the same installer the CLI uses. See Choose what your agent may do.

Install with the CLI

Install the CLI and log in with an API key

Installing a pack needs secrets:read, secrets:write, actions:read, actions:write, policies:read and policies:write. --with-limits also needs impact-limits:read and impact-limits:write. Browser login cannot grant the policy and limit scopes, so create an API key with them in the console (Settings → API Keys) and log in with it:

npm install -g @anlyonhq/cli
anlyon auth login --api-key-stdin < key.txt

Get the pack

A pack is a directory with a pack.json in the anlyon-pack/v1 format, and an exercise.json if it has one. The CLI reads a pack from disk: pass the directory or the pack.json file. It does not download packs. Anlyon’s own packs install from the console, as above. The commands below use ./packs/github for a GitHub pack saved in your project.

See what it would do

anlyon packs plan ./packs/github

Nothing is sent. The plan lists every secret, action, policy and limit, and whether install would create it, skip it or need something from you first.

Install

anlyon packs install ./packs/github --yes

The actions are installed as github-create-issue, github-merge-pull-request and so on. Installing again changes nothing. If a definition changed, the install refuses unless you pass --update, which adds a new action version.

Review and turn on the policies

anlyon policies list

The GitHub pack suggests approval for closing an issue, deleting a comment or a label, approving a pull request and merging one. They are off until you turn them on in the console under Controls. A pack’s policies are decided by your team. To have your users decide instead, edit a policy to Decided by: End user. See Approvals.

Add the limits

anlyon packs install ./packs/github --with-limits --yes

A pack’s limits count for the whole environment. To give each of your users their own allowance, create the limit yourself with scope: "end_user". See Impact limits.

Install some operations, under your own secret name

Pick operations with --action, using the pack’s own action names. Only the secrets, parameters, policies and limits those operations use come with them.

anlyon packs install ./packs/github --yes \
  --action create-issue --action comment-on-issue
Option What it does
--action <name> Install only this action. Repeatable.
--with-limits Create the suggested limits instead of printing them.
--update Install a changed action definition as a new version instead of refusing.
--no-prefix Keep the pack’s action names, without <integration>-. Those actions are then served on https://api.anlyon.com/mcp only.
--credential connection|secret connection (the default) chooses the account at each call. secret binds the actions to the connected account the pack names, which must exist.
--secret-name PACK=YOURS Use your secret name for one the pack names, for example an account connected as GITHUB_SUPPORT. Repeatable.
--param name=value A value the pack fixes at install. Repeatable.
--secret NAME=value A stored secret value the pack needs that is not a connected account. Repeatable. The CLI never prints it.
--yes Confirm without prompting. Required when not interactive.

A stored secret is bound to the pack’s hosts and to headers. An existing secret is never overwritten.

Install from the TypeScript SDK

The CLI and the console use the same installer as client.packs in @anlyonhq/sdk. Packs install from the CLI, the console or the TypeScript SDK.

import { readFile } from 'node:fs/promises';
import { Client } from '@anlyonhq/sdk';

const client = new Client({ apiKey: process.env.ANLYON_OPERATOR_KEY! });
const manifest = JSON.parse(await readFile('packs/github/pack.json', 'utf8'));

const plan = await client.packs.plan(manifest); // nothing sent
for (const step of plan.steps) console.log(step.kind, step.name, step.outcome, step.detail);

const result = await client.packs.install(manifest, {
  actions: ['create-issue', 'comment-on-issue'],
  withLimits: true,
});
console.log(result.disabledPolicies); // review, then turn on
console.log(result.suggestedLimits);  // empty when withLimits created them

install takes the CLI’s options as actions, withLimits, update, noPrefix, credential, secretNames, params and secrets. A workflow pack reuses a catalogue operation by reference, { "name": "note-customer", "ref": "anlyon/hubspot#add-note" }. The CLI finds the referenced pack in a sibling directory. From the SDK, pass resolvePack: (id) => manifestFor(id). Without it a pack with a reference is refused.

Act in your users’ accounts

A pack sends each account as {{connection:<integration>}}, for example Authorization: Bearer {{connection:github}}. The account is chosen at each call:

  • A call made for one of your users, with the Anlyon-End-User header (anlyon.forUser(id) in TypeScript, client.for_user(id) in Python), uses that user’s own account. A user who has not connected gets 409 END_USER_NOT_CONNECTED with a connectUrl, and nothing is sent.
  • Any other call uses this environment’s connected account for the integration. With none, it fails before anything is sent. With two, it is refused as ambiguous.

So nothing needs connecting before install. The token travels only in a header, and only to the integration’s own hosts.

const user = anlyon.forUser(session.user.id);
const { data } = await user.actions.invoke('github-create-issue', {
  owner: 'acme',
  repo: 'support',
  title: 'Customer cannot export',
  body: 'Reported in chat.',
});

To tie the actions to one of your own accounts by name instead, for example when an environment has two GitHub accounts, install with --credential secret (credential: 'secret' in the SDK). A call made for one of your users still uses their own account. See Act for your users.

Run every action once

Each integration’s pack carries an exercise: one run through all of its actions against your own account, in an order that works, carrying ids from step to step and cleaning up after itself where the provider allows.

anlyon packs install ./packs/github --yes
anlyon packs exercise ./packs/github --need owner=acme --need repo=sandbox --need base_branch=scratch --need head_branch=try-1 --need reviewer_login=sam

--need gives the values the run cannot create itself. The pack’s README lists them. The run asks before it starts, because writes go to the real provider. It stops at the first step that does not succeed and prints, for every step, its outcome, receipt grade and effect id.

Fix a refused install

A refused install changes nothing. The installer decides from reads first and writes only when everything checks out.

Code Why What to do
PACK_CONNECTION_MISSING Installed with --credential secret or --secret-name, and the named connected account does not exist. Run the printed anlyon connections add <integration> --secret <NAME>, then install again.
PACK_SECRET_MISMATCH A secret with the pack’s name exists but is the wrong kind, or is not allowed to reach the pack’s hosts. Delete it, or map the pack’s name to another with --secret-name.
PACK_SECRET_VALUE_MISSING The pack needs a stored value and none was given. Pass --secret NAME=value.
PACK_PARAMETER_MISSING A parameter is missing or does not match its pattern. Pass --param name=value.
PACK_ACTION_CONFLICT An action with the same name exists with a different definition. Re-run with --update to add a new version.
PACK_AUTO_APPROVE_REFUSED A policy in the manifest auto-approves. Remove it. A pack may not approve on anyone’s behalf.
PACK_INVALID The manifest does not validate, names an unknown action, or references another pack without resolvePack. Fix the manifest, or pass resolvePack from the SDK.
403 AUTHORIZATION_ERROR naming a scope The key lacks a scope the install needs. Create a key with the scopes listed above.

Know what a pack does not do

A declared action has no provider idempotency and no stale-state protection, and a read-back can match a resource that already existed. Each pack’s README lists its own limitations, and each action’s description carries them into the preview a reviewer sees.

Write your own

A pack is a pack.json in the anlyon-pack/v1 format. Each of its actions takes the same fields as a declared action. Check one with anlyon packs plan <dir>: it validates the manifest and sends nothing, and PACK_INVALID names what to fix.

Was this page helpful?