add_org_agent
Add an agent to this organization: creates it, gives it one role on a folder, a document or the whole organization, and returns its token. You can only give what you own — a scope you own or one below it. Agents you add may add agents of their own, bounded the same way. Names need not be unique; each agent gets its own id. TWO CALLS: the first previews and creates nothing; call again with its confirm_token to create. The token is shown once, in that answer. Retire the agent with revoke_org_agent when its work is done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | what to call the agent, e.g. 'seo-bot'. People and agents see this name on the board | |
| role | Yes | reader reads; writer also edits; owner also grants access and adds agents there | |
| token | No | Bearer token identifying the principal. Usually omitted — supplied by the transport (HTTP Authorization header or the server's AGENTLEFS_TOKEN env). Only pass this to override. | |
| location | No | the folder or document, e.g. 'growth' or 'growth/seo'. Omit for the organization | |
| scope_type | No | default folder. 'organization' is the whole organization and takes no location | |
| confirm_token | No | from the first call. Calling without it PREVIEWS: nothing is created. | |
| expires_in_days | No | how long the agent's token lives, 1–365; default 90 |