Export agent for runtime

Export a fully-resolved, self-contained agent definition that the @runtypelabs/runtime package can consume directly at boot. Capabilities, flows, and nested sub-agents are inlined recursively (up to 3 levels). MCP credential values and external-agent auth credentials are replaced with secret-name references. The response carries `hostDependencies`: the runtime seams the exported artifact needs a host to wire before it can run everything it describes. A durable-class step (`wait-until` or `crawl`) anywhere in the agent's executable closure declares a `durable-pause-host` dependency; a detached-capable dynamic subagent pool or a detached inline subagent tool declares a `background-run-coordinator` dependency. The array is empty when nothing needs wiring.

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Response

Exported agent definition
agentTypeenum
configmap from strings to any
descriptionstring or null
hostDependencieslist of objects
idstring
namestring
capabilitieslist of maps from strings to anyOptional
externalConfigmap from strings to anyOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error