Repository navigation
PE-9413: Update agent API docs - #67
Conversation
Agents & API now covers the browser login, agent members, agent-created workspaces, the scope-and-role rule, and the proposal kinds the CLI gained. Each surface page lists its new commands under Programmatic access: swaps, Earn, auto-earn, off-ramps, invoices, automations, networks, message signing, and contact send rules. Members gains an Agent members section and Workspaces a From an agent section; Roles explains that an owner scope granted at login makes the agent an Owner. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@zherring Made a bunch of updates to the docs. I already taken a look at the docs changes in the preview app. |
|
|
||
| ## Agent members | ||
|
|
||
| An **agent member** is an AI agent that joined the workspace when a member approved its [browser login](/introduction/agents#sign-in-from-the-browser), or by [creating the workspace](/workspaces#from-an-agent) itself. It is a member of its own, not the person who approved it: [Settings > Members](https://app.splits.org/settings/team/members/) shows it with an *Agent* label, and its proposals, signatures, signer registrations, and invoices are recorded under its name. One agent member exists per agent signing key, reused in every workspace that key is approved in; its display name is the client name the agent gave at its first login. |
There was a problem hiding this comment.
@juliogarciag is this worth pointing out? Seems like its just updating from our prev permissions, which doesn't seem like its' appropriate to include in the body? wdyt?
There was a problem hiding this comment.
Yeah, I think it's better to cut the "It is a member..." part. What about this?
An agent member is an AI agent that joined the workspace when a member approved its sign-in, or by creating the workspace itself. Settings > Members shows it with an Agent label, and its activity is recorded under its name. One agent member exists per agent signing key, in every workspace that key is approved in, named after the client name the agent gave at its first sign-in.
| - **Recovery is contract-enforced.** The Treasury owns the account, so the Treasury's signers can remove the agent's key by [resetting signers](/accounts/editing#resetting-signers). The reset needs no signature from the account's own signers and does not change the account's address. Deposits and integrations that point at the address keep working. | ||
| - **Scopes bound the API, signers bound the chain.** The agent's API key carries a [scope](/workspaces/roles#api-key-scopes) (Read, Write, or Owner). The scope governs what the agent can query and propose. Scopes grant **no onchain signing authority**. Only the agent's registered key on the account's signer set grants that authority. | ||
| - **Every action is a proposal.** The agent proposes [transactions](/transactions) like any client. A transaction executes when its signatures meet the threshold. The agent proposes signer changes, and a human approves them in the app. | ||
| - **The agent is a member of its own.** When you approve the agent's [browser login](/introduction/agents#sign-in-from-the-browser), it joins the workspace as an [agent member](/members#agent-members) with its own name and key. The workspace records its actions under its name, not yours. |
There was a problem hiding this comment.
Deleting the on its own part. Doesn't add a lot. I think the ideas was to say it was a member on its own right (instead of being tied to an existing user).
| ### Sign the agent in | ||
|
|
||
| The agent [signs in to the CLI](/introduction/agents#install-the-cli-and-sign-in) with the API key. The agent then confirms the workspace, scopes, and key source. | ||
| The agent starts a [browser login](/introduction/agents#sign-in-from-the-browser) and shows you a link and a code. You sign in, enter the code, and connect the workspace with the [scopes](/workspaces/roles#api-key-scopes) you choose. No API key passes through the agent. The agent then confirms the workspace, scopes, and key source. |
There was a problem hiding this comment.
this is kind of disconnected. a link and a code .. how do you sign in with a link and a code? do you click the link? would be explicit here.
There was a problem hiding this comment.
The agent opens the link automatically and the user only has to paste the code. What about this?
The agent starts a browser login and gives you a code. A Splits login page opens. Sign in, enter the code, and connect the workspace with the scopes you choose.
| 2. `splits accounts update-signers <account> --addEoaSignerIds ... --threshold N`: propose adding it as a signer (**Owner** scope). A human approves the proposal in the web UI, and the update applies to every active network. | ||
| 3. `splits transactions sign <id>`: sign pending proposals with the local key (**Write** scope). Auto-submits once the threshold is met. | ||
| 1. `splits auth create-key --register`: generate a local EOA (stored in `~/.splits/config.json`) and register it. Import an existing key instead with `echo $PRIVATE_KEY | splits auth import-key`. `splits auth whoami` lists the local keys and whether each is registered. | ||
| 2. `splits accounts update-signers <account> --add-eoa-signer-ids <id> --threshold N`: propose adding it as a signer (**Owner** scope). An agent member can propose adding its own keys, with no other change, and an Owner signs it. A workspace [created from an agent](/workspaces#from-an-agent) already has the agent's key as the Treasury's only signer. |
There was a problem hiding this comment.
what does this "with no other change" mean? kinda unclear in isolation?
There was a problem hiding this comment.
Not editing the threshold. Yeah, doesn't make a lot of sense to point it out. Removing those words.
| ## The model | ||
|
|
||
| Everything visible in the app is queryable with the **Read** scope: accounts, balances, transactions (filterable by account, direction, amount, date, and memo), contacts, tokens, networks, members, settings, and automations. | ||
| Everything visible in the app is queryable with the **Read** scope: accounts, balances (including [Earn](/accounts/earn#programmatic-access) positions), transactions (filterable by account, direction, amount, date, and memo), contacts with their send rules, tokens, networks, members, settings, automations, and invoices. Bank accounts need the **Owner** scope. |
There was a problem hiding this comment.
"Transferring to and from bank accounts require…"
| - `splits transactions create swap --account 0x... --chain-id 8453 --sell-token 0x... --buy-token 0x... --amount 0.5`: propose a swap that sells an exact amount (**Write** scope) | ||
| - `splits transactions create swap ... --destination-chain-id 1`: swap onto another network (**Write** scope) | ||
|
|
||
| A just-in-time swap inside a send is a transfer with `--source-token`; see [Sends](/transactions/sends#programmatic-access). |
There was a problem hiding this comment.
this is confusing to me? better way to phrase it?
something like, agents can swap-and-send in a single transaction, by setting a transfer's --source token and payment source as different" or something equiv?
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…api-docs # Conflicts: # CLAUDE.md
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
@zherring Addressed your comments. Can you check again? |
|
all of it? 🫠 ok |
zherring
left a comment
There was a problem hiding this comment.
skimmed everything, reviewed replies, lgtm for now! ty for refactoring the docs w/ all the agent changes
|
done. appreciate it julio! |
Description
Documents what the Agent API expansions project shipped: the browser login, agents as workspace members, workspaces created from an agent, and the proposal kinds and commands the CLI gained. Merge after
@splits/splits-cli0.5.0 is published (0xSplits/splits-cli#62): the pages describeautomations create,accounts sign-message,workspace create-agent-owned, and the agent member behavior, which 0.4.0 does not have.Changes made
One home per fact, and every surface page points at its commands
introduction/agents.mdxis rewritten around how an agent gets access and what it is in the workspace: browser login (auth login --client-name, andlogin-start/login-statusunder MCP), the API key path, several saved workspaces, scopes (now with the role rule: Owner-only operations need the key's member to be an Owner), the proposal kinds,dataTypeon transactions, headless signing of signer and network changes,sign-message, andfeedback send. Themcp add/skills addinstructions are unchanged.CLAUDE.md's canonical-homes table names the new homes: browser login on/introduction/agents, agent members on/members, workspaces created from an agent on/workspaces.An agent is a member, and the approver sets its role
members/index.mdx: new "Agent members" section (what it is, no email or login, EOA keys only, role set at approval, cannot be invited, removal proposes dropping its keys from every account).members listnow documentskind.workspaces/roles.mdx: API keys are created in Settings or granted at a browser login; a key acts as a member; grantingownerat login makes the agent an Owner.introduction/core-concepts.mdxandmembers/keys.mdx: a member can be an agent; an EOA is registered under the member whose key registers it.A workspace can be created from an agent
workspaces/index.mdx: new "From an agent" section with the two paths (workspace create, approved in the browser, andworkspace create-agent-owned, owned by the agent with an unverified recovery email) and what differs from the app flow (agent key on the Treasury, email signer on the Root), plus a Programmatic access section.Each surface lists its new commands under Programmatic access
transactions/index.mdx: everytransactions createkind,update-gas-estimation, and signing of signer/network changes.transactions/sends.mdx:--source-token/--source-chain-id("Pay with"), off-ramps as sends to a bank.transactions/swaps.mdx:transactions create swapreplaces "no dedicated swap command", with cross-network and slippage flags.accounts/earn.mdx: new section: theearnobject on balances,earn-deposit/earn-withdraw,settings getauto-earn state,auto-earn-on/auto-earn-off.banking/offramping.mdx: new section:offramp external-accountsandtransactions create offramp(amount is what the bank receives, fee added on top, Owner key of a verified workspace).invoicing/index.mdxandinvoicing/recurring.mdx:invoices list/get/create, the Pro plan requirement, and schedules through--interval/--due-date-days(carried over from the closed Document the invoice CLI commands (PE-9117) #63).accounts/index.mdx:automations create;accounts/editing.mdxandaccounts/signers.mdx: signer changes are signable by an EOA, and an agent member may add only its own keys.introduction/networks-and-assets.mdx:accounts networks/add-networks/remove-networks.integrations/walletconnect.mdx: new section foraccounts sign-message.contacts/index.mdx: send rules come back onlistandlookup.Solutions and integrations follow
solutions/ai-agents.mdx: the agent is a member of its own; setup starts with the browser login instead of an API key; the "no programmatic route to a key" limit is replaced.business-banking,revenue-automation, andfamily-walletdrop invoices, off-ramps, and automations from their web-only lines.integrations/bankr.mdxstep 1 offers the browser login.How has this been tested?
pnpm lint:prose(strict STE onsrc/pages/solutions),node scripts/check-prose.mjson every changed page, andpnpm build(internal links) pass; an inbound-anchor grep for the two removed/introduction/agentsanchors found and fixed the one stale link.splits-clisrc/cli.tsonmainand the public v1 routes onsplitsmaster; the consent-page and Members-page claims againstsplits-teamsmaster..mdtwin of/introduction/agentsfrom the build output.Other notes
transactions/swaps.mdxstill says Splits charges no swap fees. 0xSplits/splits#3870 applies plan swap rates from 2026-11-09, which is a different project's docs update.🤖 Generated with Claude Code