Skip to main content
persona.agents — /api/v1/developer/agents. An Agent is an AI assistant configuration: name, system prompt, model (via a Provider), attached Skills/Knowledge bases/MCPs/Stores, and visibility. Project-owned, or — when the client asserts an external user — owned by that end user.

Ownership & scoping

  • On a control-plane client (no externalUserId), Agents belong to the whole Project.
  • On a runtime-plane client, create() makes an Agent owned by that end user; list({ scope: 'mine' }) restricts to that user’s own Agents (ProjectRuntimeContext only — the server rejects scope: 'mine' on a control-plane client).
  • Public Agents from other Domains appear in discovery listings but are not editable by you, and their systemPrompt/providerId are stripped from the response when you don’t own them.

Methods

create(input, idempotencyKey?)

name, systemPrompt, and providerId are required.
Optional fields and defaults: The optional trailing idempotencyKey is sent as the Idempotency-Key header.

list(params?)

Returns PaginatedResult<Agent> — { items, pagination: { total, page, limit, pages } }. Note: on list(), each item’s skills/mcps/knowledgeBases/storeMounts are bare id strings (or omitted) — unlike get(), which populates them as objects.

get(agentId)

Fetches one Agent by _id. Unlike create()/update()/list(), get() returns skills/mcps/knowledgeBases/storeMounts populated as objects.
systemPrompt/providerId are stripped entirely from the response when the calling identity doesn’t own the Agent (e.g. browsing a public Agent from another Domain) — both fields are typed optional for exactly this reason.

update(agentId, input)

Partially updates an Agent — only the fields you pass are changed. UpdateAgentInput makes every field optional.
Important: array fields replace the entire array — this is not a merge/append:
  • skills, mcps, knowledgeBases, storeMounts — passing a new array replaces the whole set.
  • interruptOn — passing a new map replaces the whole map.
To add one Skill to an existing list, read the Agent first (or track the lists yourself) and pass the full new array.

delete(agentId)

Deletes an Agent. Returns void.

bulkDelete(ids)

Best-effort batch delete — partial failures don’t throw or abort the rest of the batch. Up to 100 ids per call; over the limit is rejected with a 400 before anything is deleted.

Complete example