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_id
Headers
Authorization
Header authentication of the form Bearer <token>
Query parameters
max_steps
use_legacy_format
If true, exports using the legacy single-agent format. If false, exports using the new multi-entity format.
Request
This endpoint expects an object.
spec
Schema for serialized agent file that can be exported to JSON and imported into agent server.
legacy_spec
Response
Successful Response