Skip to content

Agents API: promote agent authorization, access grants, tokens, and capability ceilings #1754

@chubes4

Description

@chubes4

Problem

Greg's post argues that agent memory and behavior should delegate to existing platform permissions, not invent a parallel ACL. Data Machine already has the pieces:

  • PermissionHelper maps agent actions to WordPress capabilities.
  • Agent bearer tokens have optional capability restrictions.
  • Agents execute under the owner's WordPress capability ceiling.
  • datamachine_agent_access grants admin, operator, and viewer roles per (agent_id, user_id).
  • Agent token auth sets the current user to the owner and records acting agent/token context.

These are generic agent substrate concepts and should move into Agents API contracts/default implementations.

Proposed shape

Promote generic contracts/value objects:

WP_Agent_Access_Grant
WP_Agent_Access_Store_Interface
WP_Agent_Token
WP_Agent_Token_Store_Interface
WP_Agent_Token_Authenticator
WP_Agent_Authorization_Policy_Interface
WP_Agent_Capability_Ceiling

Agents API should define the policy shape. Data Machine can keep its concrete DB tables initially as an adapter.

Acceptance criteria

  • Agents API can represent who is acting, which agent is effective, which workspace applies, what token/client is involved, and what capability ceiling applies.
  • Agent access grants are generic, role-based, and host-extensible.
  • Token metadata supports label, expiry, last-used timestamp, and capability restrictions without storing raw tokens.
  • Authorization checks compose token restrictions with the acting user's WordPress capabilities.
  • Data Machine product code delegates to the Agents API authorization model instead of owning the generic model.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Source audit and issue drafting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions