Export Agent

Export the serialized JSON representation of an agent, formatted with indentation. Supports two export formats: - Legacy format (use_legacy_format=true): Single agent with inline tools/blocks - New format (default): Multi-entity format with separate agents, tools, blocks, files, etc.

Authentication

AuthorizationBearer

Header authentication of the form Bearer <token>

Path parameters

agent_idstringRequired

Query parameters

max_stepsintegerOptionalDefaults to 100
use_legacy_formatbooleanOptionalDefaults to false

If true, exports using the legacy single-agent format (v1). If false, exports using the new multi-entity format (v2).

Request

This endpoint expects an object.
specobject or nullOptional
Schema for serialized agent file that can be exported to JSON and imported into agent server.
legacy_specobject or nullOptional

Response

Successful Response

Errors