Skip to content

Define accounts and agents API surface#913

Merged
bokelley merged 7 commits intomainfrom
bokelley/principal-delegation
Jan 31, 2026
Merged

Define accounts and agents API surface#913
bokelley merged 7 commits intomainfrom
bokelley/principal-delegation

Conversation

@bokelley
Copy link
Contributor

Summary

Adds protocol-level definitions for account management and agent identification, addressing issue #868.

  • New Account and Agent core schema objects
  • list_accounts task for discovering accessible accounts
  • Optional account_id field in get_products and create_media_buy requests
  • Account attribution in media_buy responses
  • Support for billing proxy model ("Coke c/o Publicis")

Design

Three distinct entities in every billable operation:

  • Brand: Whose products (identified by brand manifest)
  • Account: Who gets billed and what rates apply (optional account_id)
  • Agent: Who is operating (from auth token)

Enables three billing scenarios: direct advertiser, advertiser via agency proxy, or agency as principal. Account creation is out of scope (seller-side process); the protocol defines what accounts look like and how to reference them.

Test Plan

  • Schema validation passes
  • All examples validate
  • Documentation links verified
  • No breaking changes to existing tasks (account_id is optional)

🤖 Generated with Claude Code

bokelley and others added 6 commits January 30, 2026 06:39
Defines the API surface for account management and agent identification:

- Add Account and Agent core schema objects
- Add list_accounts task for discovering available accounts
- Add account_id as optional field to get_products and create_media_buy
- Include account attribution in media_buy responses
- Document routing logic and error handling
- Support billing proxy model (e.g., "Coke c/o Publicis")

Resolves #868: clarifies who is buying (agent), on whose behalf (brand),
and who gets billed (account). Enables three billing models: direct
advertiser, advertiser via agency proxy, or agency as principal.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Clean up documentation to use consistent terminology:

- Principal → Agent (authenticated caller) + Account (billing entity)
- Update authentication.mdx to reference accounts-and-agents
- Rename "Principals & Security" to "Accounts & Security"
- Update glossary with Account/Agent definitions, deprecate Principal
- Update navigation and cross-references
- Replace "Principal" participant in diagrams with "Buyer"

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Rename principals-and-security.mdx to accounts-and-security.mdx
- Fix "Agency as principal" example description to "Agency as direct buyer"
- Remove agent field from response examples (not in schema)
- Add schema links to authentication.mdx
- Improve Principal deprecation note in glossary
- Update all navigation references to renamed file
- Add changeset

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The dist/docs/2.5.3/ is a versioned snapshot and should retain
its original filenames. Only current docs (3.0-beta, latest) use
the new accounts-and-security naming.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Links in dist/docs/2.5.3/ were using /docs/... paths which resolve
to current docs (where principals-and-security was renamed). Updated
to use /dist/docs/2.5.3/... paths to stay within the versioned snapshot.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extends account/agent model to creative management:
- sync-creatives-request: account_id for creative ownership
- sync-creatives-response: account attribution in results
- list-creatives-response: account per creative
- creative-filters: account_ids filter for multi-account querying

Addresses Yahoo feedback on creative ownership management.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove agent.json: Agent identity comes from auth token, not a schema
  field. The schema was created but never referenced in the protocol.
- Register account.json in index.json per review feedback
- Update changeset and authentication docs to reflect removal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 8e37138 into main Jan 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants