Skip to navigation

Export flow for runtime (limited preview)

Export a fully-resolved, self-contained flow definition that the @runtypelabs/runtime package can consume directly at boot. All step configs are inlined; no live DB queries are needed at execution time. An export that would carry a literal credential typed into a tool config or MCP server is refused with 422 and code raw_credential_in_export. Requires the RUNTIME:EXPORT scope and an Enterprise plan (the byoc entitlement); an unentitled account receives 403 with code BYOC_PLAN_REQUIRED in every environment.

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 flow’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, and the export is never refused for a declared dependency.

The response also carries warnings: each Claude Managed agent the flow references (embedded only as a stub the runtime cannot run), and each child flow or sub-agent that an embedded agent could not include, with the reason. The array is empty when every child was embedded.

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Response

Exported flow definition
hostDependencieslist of objects
idstring
namestring
stepslist of maps from strings to any
warningslist of objects

Referenced sub-agents and flows the export could not embed, each with the reason. The export still returns 200; a tool or capability that names a dropped child is absent from the artifact. Empty when every child was embedded.

agentsmap from strings to maps from strings to anyOptional
dependencyRefsobjectOptional
descriptionstring or nullOptional

Errors

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