Skip to main content
POST
Import an agent from AGENTS.md

Authorizations

Authorization
string
header
required

User-bound credential carrying an identity: either a session JWT or a user access token (at:*) generated from the user settings UI. Send as Authorization: Bearer <token>. Org API keys (iak_*) are not accepted here - they carry no user identity. Use the x-prismeai-api-key header instead (see OrgApiKeyAuth).

Body

application/json
agents_md
string
required

Full AGENTS.md document (front matter + markdown).

Maximum string length: 200000
target_agent_id
string

Optional - when set, patches the matching agent instead of creating a new one. Frontmatter id: is ignored; only this field triggers the patch path.

Maximum string length: 128

Response

Agent imported.

Slim record returned on agent create / import.

id
string
name
string
status
enum<string>
Available options:
draft
serviceAccountId
string
createdAt
string<date-time>
imported
boolean
Example:

true

action
enum<string>

Indicates whether the call created a new agent or patched an existing one (based on target_agent_id).

Available options:
created,
updated
warnings
object[]

Knowledge bases unlinked during the import because the caller cannot read them or they belong to another organization (an id from another environment included). The tool is kept with its vector_store_id (or Knowledge Explorer server) emptied.