Export Agent Serialized

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.

Path parameters

agent_idstringRequired

Headers

AuthorizationstringRequired

Header authentication of the form Bearer <token>

Query parameters

max_stepsintegerOptionalDefaults to 100
use_legacy_formatbooleanOptionalDefaults to true

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

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