For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList agents
      • POSTCreate agent
      • POSTFetch external agent card
      • POSTRefresh cached agent card
      • GETGet agent details
      • PUTUpdate agent
      • DELDelete agent
      • GETExport agent for runtime
      • GETList agent executions
      • GETGet execution detail
      • GETList tool calls
      • GETGet tool call detail
      • POSTPublish agent
      • POSTAdd capability to agent
      • DELRemove capability from agent
Dashboard
LogoLogo
Runtype APIAgents

Export agent for runtime

GET
/v1/agents/:id/export-runtime
GET
/v1/agents/:id/export-runtime
$curl https://api.runtype.com/v1/agents/id/export-runtime \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "id": "agent_9f8b7c6d5e4f3a2b1c0d",
3 "name": "Customer Support Chatbot",
4 "description": "An AI agent designed to handle customer inquiries and support requests with integrated knowledge base access.",
5 "agentType": "runtype",
6 "config": {
7 "language": "en-US",
8 "maxResponseTokens": 1500,
9 "timeoutSeconds": 30
10 },
11 "primaryFlow": {
12 "start": "greeting",
13 "states": {
14 "greeting": {
15 "type": "message",
16 "text": "Hello! How can I assist you today?",
17 "next": "userQuery"
18 },
19 "userQuery": {
20 "type": "input",
21 "variable": "query",
22 "next": "processQuery"
23 },
24 "processQuery": {
25 "type": "action",
26 "action": "queryKnowledgeBase",
27 "input": {
28 "query": "{{query}}"
29 },
30 "next": "provideAnswer"
31 },
32 "provideAnswer": {
33 "type": "message",
34 "text": "{{actionResult}}",
35 "next": "end"
36 },
37 "end": {
38 "type": "end"
39 }
40 }
41 },
42 "capabilities": [
43 {
44 "name": "knowledgeBaseAccess",
45 "type": "mcp",
46 "credentials": {
47 "apiKey": "secret:kb_api_key"
48 },
49 "description": "Access to the internal knowledge base for answering customer questions."
50 }
51 ],
52 "externalConfig": {
53 "logging": {
54 "enabled": true,
55 "logLevel": "info",
56 "destination": "cloud-logs"
57 }
58 }
59}

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 are replaced with secret-name references.

Was this page helpful?
Previous

List agent executions

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Response

Exported agent definition
idstring
namestring
descriptionstring or null
agentTypeenum
Allowed values:
configmap from strings to any
primaryFlowmap from strings to any
capabilitieslist of maps from strings to any
externalConfigmap from strings to any

Errors

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