Update agent visibility
Update an owned agent to private, public, unlisted, or team visibility. Team sharing automatically uses the owner’s current team and requires active membership. Installed forks remain independent private copies. Leaving team visibility, or moving to another team, returns editing to the owner alone: edit_access becomes owner and the named editors are removed. Only the owner may change visibility. Team visibility also shares the owner’s secrets named in require_env_vars and the attached toolkits the owner owns with that team; leaving the team or moving to another takes back what the agent shared (see AgentDependencies). The response carries the result in dependencies.
Authorizations
JWT authentication token
Path Parameters
Your own agent's ID (kebab-case slug), or the UUID of a custom agent: one you own, or a team-shared agent you can run (the id GET /api/v1/agents returns for it).
Body
public, private, unlisted, team Response
Visibility updated
Agent ID for user access (use with /agents/user/{agent_id})
user Dynamic toolkits attached to this agent (soft-deleted ones excluded). Filled on GET and PATCH of a single agent; omitted on list, create and visibility responses.
Single dynamic tools attached to this agent (soft-deleted tools and tools of soft-deleted toolkits excluded). Filled on GET and PATCH of a single agent; omitted on list, create and visibility responses.
Whether the caller may edit this agent: always for the owner; for a team-shared agent, when its owner gave the caller edit access.
What sharing this agent with its team shared or took back: its required secrets and attached toolkits. Present only on the visibility PATCH response; GET /api/v1/agents/user/{agent_id}/dependencies reads it at any time.
Who besides the owner may edit a team-shared agent: owner nobody; team every active team admin or member; members the named editors. Viewers never edit.
owner, team, members Number of named editors. 0 unless edit_access is members. Omitted on list responses for an agent whose edit_access is members; GET the agent for the count.
Whether the caller owns this agent.
Team whose members can discover, run, and install this agent. Required for team visibility; omitted otherwise.
Who made the latest change. Resolved by GET and PATCH of a single agent; null on other routes and when unknown.
Directory entry ID
public, private, unlisted, team 
