Skip to content
AGH RuntimeAPI Reference

Agent

AGH Agent HTTP endpoints.

Audience
Operators running durable agent work
Focus
API Reference guidance shaped for scanability, day-two clarity, and operator context.

List coordination channels visible to the calling agent

GET/api/agent/channels

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/agent/channels"
{
  "channels": [
    {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Reply to one delivered coordination channel message

POST/api/agent/channels/reply

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/channels/reply" \  -H "Content-Type: application/json" \  -d '{    "body": null,    "metadata": {      "coordination_channel_id": "string",      "correlation_id": "string",      "message_kind": "status",      "run_id": "string",      "task_id": "string"    },    "reply_to_message_id": "string"  }'
{
  "message": {
    "body": null,
    "channel_id": "string",
    "from_session_id": "string",
    "message_id": "string",
    "metadata": {
      "coordination_channel_id": "string",
      "correlation_id": "string",
      "ext": {
        "property1": null,
        "property2": null
      },
      "message_kind": "status",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string"
    },
    "timestamp": "2019-08-24T14:15:22Z",
    "to_session_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Receive task-bound coordination channel messages

GET/api/agent/channels/{channel}/recv

Path Parameters

channel*string

Coordination channel id

Query Parameters

wait?boolean

Wait for the next message when no messages are immediately available

limit?integer

Maximum number of messages to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/agent/channels/string/recv"
{
  "messages": [
    {
      "body": null,
      "channel_id": "string",
      "from_session_id": "string",
      "message_id": "string",
      "metadata": {
        "coordination_channel_id": "string",
        "correlation_id": "string",
        "ext": {
          "property1": null,
          "property2": null
        },
        "message_kind": "status",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string"
      },
      "timestamp": "2019-08-24T14:15:22Z",
      "to_session_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Send one task-bound coordination channel message

POST/api/agent/channels/{channel}/send

Path Parameters

channel*string

Coordination channel id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/channels/string/send" \  -H "Content-Type: application/json" \  -d '{    "body": null,    "metadata": {      "coordination_channel_id": "string",      "correlation_id": "string",      "message_kind": "status",      "run_id": "string",      "task_id": "string"    }  }'
{
  "message": {
    "body": null,
    "channel_id": "string",
    "from_session_id": "string",
    "message_id": "string",
    "metadata": {
      "coordination_channel_id": "string",
      "correlation_id": "string",
      "ext": {
        "property1": null,
        "property2": null
      },
      "message_kind": "status",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string"
    },
    "timestamp": "2019-08-24T14:15:22Z",
    "to_session_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Return the bounded calling-agent situation context

GET/api/agent/context

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/agent/context"
{
  "context": {
    "capabilities": {
      "capabilities": [
        {
          "id": "string",
          "source": "string",
          "summary": "string"
        }
      ],
      "section": {
        "limit": 0,
        "returned": 0,
        "truncated": true
      }
    },
    "coordination_channel": {
      "available": true,
      "channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      }
    },
    "inbox_summary": {
      "items": [
        {
          "channel_id": "string",
          "kind": "status",
          "message_id": "string",
          "metadata": {
            "coordination_channel_id": "string",
            "correlation_id": "string",
            "ext": {
              "property1": null,
              "property2": null
            },
            "message_kind": "status",
            "run_id": "string",
            "task_id": "string",
            "workflow_id": "string"
          },
          "preview": "string",
          "timestamp": "2019-08-24T14:15:22Z"
        }
      ],
      "section": {
        "limit": 0,
        "returned": 0,
        "truncated": true
      },
      "unread_count": 0
    },
    "limits": {
      "context_section_limit": 0,
      "max_active_task_leases": 0,
      "max_children": 0,
      "max_spawn_depth": 0
    },
    "peer_roster": {
      "peers": [
        {
          "capabilities": [
            "string"
          ],
          "channel_id": "string",
          "display_name": "string",
          "peer_id": "string",
          "session_id": "string"
        }
      ],
      "section": {
        "limit": 0,
        "returned": 0,
        "truncated": true
      }
    },
    "provenance": {
      "generated_at": "2019-08-24T14:15:22Z",
      "source": "string"
    },
    "self": {
      "agent_name": "string",
      "model": "string",
      "provider": "string",
      "session_id": "string"
    },
    "session": {
      "channel": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "lineage": {
        "auto_stop_on_parent": true,
        "parent_session_id": "string",
        "permission_policy": {
          "mcp_servers": [
            "string"
          ],
          "network_channels": [
            "string"
          ],
          "sandbox_profiles": [
            "string"
          ],
          "skills": [
            "string"
          ],
          "tools": [
            "string"
          ],
          "workspace_paths": [
            "string"
          ]
        },
        "root_session_id": "string",
        "spawn_budget": {
          "max_active_per_workspace": 0,
          "max_children": 0,
          "max_depth": 0,
          "ttl_seconds": 0
        },
        "spawn_depth": 0,
        "spawn_role": "string",
        "ttl_expires_at": "2019-08-24T14:15:22Z"
      },
      "name": "string",
      "state": "starting",
      "type": "string",
      "updated_at": "2019-08-24T14:15:22Z"
    },
    "soul": {
      "active": true,
      "config_digest": "string",
      "digest": "string",
      "enabled": true,
      "max_body_bytes": 0,
      "max_bytes": 0,
      "present": true,
      "principles": [
        "string"
      ],
      "role": "string",
      "snapshot_id": "string",
      "source_path": "string",
      "tone": [
        "string"
      ],
      "truncated": true,
      "valid": true,
      "validation_status": "missing"
    },
    "task": {
      "available": true,
      "lease": {
        "claim_token_hash": "string",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "lease_until": "2019-08-24T14:15:22Z",
        "run_id": "string",
        "session_id": "string",
        "status": "queued",
        "task_id": "string"
      },
      "task": {
        "id": "string",
        "identifier": "string",
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "priority": "low",
        "scope": "global",
        "status": "draft",
        "title": "string",
        "workspace_id": "string"
      }
    },
    "workspace": {
      "id": "string",
      "name": "string",
      "root_dir": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Read resolved coordinator config for the calling agent workspace

GET/api/agent/coordinator/config

Query Parameters

workspace?string

Workspace id or path

include_health?boolean

Include metadata-only session health when available

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/agent/coordinator/config"
{
  "coordinator": {
    "agent_name": "string",
    "default_ttl_seconds": 0,
    "enabled": true,
    "max_active_per_workspace": 0,
    "max_children": 0,
    "model": "string",
    "provider": "string",
    "source": "workspace",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Resolve the calling agent session

GET/api/agent/me

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/agent/me"
{
  "me": {
    "active_task_leases": [
      {
        "claim_token_hash": "string",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "lease_until": "2019-08-24T14:15:22Z",
        "run_id": "string",
        "session_id": "string",
        "status": "queued",
        "task_id": "string"
      }
    ],
    "capabilities": [
      {
        "id": "string",
        "source": "string",
        "summary": "string"
      }
    ],
    "channels": [
      {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      }
    ],
    "coordinator": {
      "agent_name": "string",
      "default_ttl_seconds": 0,
      "enabled": true,
      "max_active_per_workspace": 0,
      "max_children": 0,
      "model": "string",
      "provider": "string",
      "source": "workspace",
      "workspace_id": "string"
    },
    "limits": {
      "context_section_limit": 0,
      "max_active_task_leases": 0,
      "max_children": 0,
      "max_spawn_depth": 0
    },
    "self": {
      "agent_name": "string",
      "model": "string",
      "provider": "string",
      "session_id": "string"
    },
    "session": {
      "channel": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "lineage": {
        "auto_stop_on_parent": true,
        "parent_session_id": "string",
        "permission_policy": {
          "mcp_servers": [
            "string"
          ],
          "network_channels": [
            "string"
          ],
          "sandbox_profiles": [
            "string"
          ],
          "skills": [
            "string"
          ],
          "tools": [
            "string"
          ],
          "workspace_paths": [
            "string"
          ]
        },
        "root_session_id": "string",
        "spawn_budget": {
          "max_active_per_workspace": 0,
          "max_children": 0,
          "max_depth": 0,
          "ttl_seconds": 0
        },
        "spawn_depth": 0,
        "spawn_role": "string",
        "ttl_expires_at": "2019-08-24T14:15:22Z"
      },
      "name": "string",
      "state": "starting",
      "type": "string",
      "updated_at": "2019-08-24T14:15:22Z"
    },
    "workspace": {
      "id": "string",
      "name": "string",
      "root_dir": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Inspect the resolved Soul read model for the calling agent

GET/api/agent/soul

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/agent/soul"
{
  "active": true,
  "agent_name": "string",
  "body": "string",
  "config_provenance": {
    "context_projection_bytes": 0,
    "digest": "string",
    "enabled": true,
    "max_body_bytes": 0,
    "source": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "diagnostics": [
    {
      "code": "string",
      "column": 0,
      "field": "string",
      "line": 0,
      "message": "string",
      "owner_surface": "string",
      "section": "string",
      "severity": "info",
      "source_path": "string"
    }
  ],
  "digest": "string",
  "enabled": true,
  "frontmatter": {
    "collaboration": [
      "string"
    ],
    "constraints": [
      "string"
    ],
    "memory_policy": [
      "string"
    ],
    "principles": [
      "string"
    ],
    "role": "string",
    "tags": [
      "string"
    ],
    "tone": [
      "string"
    ],
    "version": "string"
  },
  "limits": {
    "context_projection_bytes": 0,
    "max_body_bytes": 0,
    "max_bytes": 0
  },
  "present": true,
  "revision_id": "string",
  "snapshot_id": "string",
  "source_path": "string",
  "truncated": true,
  "valid": true,
  "validation_status": "missing"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Validate a proposed Soul body or the calling agent's current Soul

POST/api/agent/soul/validate

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/soul/validate" \  -H "Content-Type: application/json" \  -d '{}'
{
  "active": true,
  "agent_name": "string",
  "body": "string",
  "config_provenance": {
    "context_projection_bytes": 0,
    "digest": "string",
    "enabled": true,
    "max_body_bytes": 0,
    "source": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "diagnostics": [
    {
      "code": "string",
      "column": 0,
      "field": "string",
      "line": 0,
      "message": "string",
      "owner_surface": "string",
      "section": "string",
      "severity": "info",
      "source_path": "string"
    }
  ],
  "digest": "string",
  "enabled": true,
  "frontmatter": {
    "collaboration": [
      "string"
    ],
    "constraints": [
      "string"
    ],
    "memory_policy": [
      "string"
    ],
    "principles": [
      "string"
    ],
    "role": "string",
    "tags": [
      "string"
    ],
    "tone": [
      "string"
    ],
    "version": "string"
  },
  "limits": {
    "context_projection_bytes": 0,
    "max_body_bytes": 0,
    "max_bytes": 0
  },
  "present": true,
  "revision_id": "string",
  "snapshot_id": "string",
  "source_path": "string",
  "truncated": true,
  "valid": true,
  "validation_status": "missing"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "active": true,
  "agent_name": "string",
  "body": "string",
  "config_provenance": {
    "context_projection_bytes": 0,
    "digest": "string",
    "enabled": true,
    "max_body_bytes": 0,
    "source": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "diagnostics": [
    {
      "code": "string",
      "column": 0,
      "field": "string",
      "line": 0,
      "message": "string",
      "owner_surface": "string",
      "section": "string",
      "severity": "info",
      "source_path": "string"
    }
  ],
  "digest": "string",
  "enabled": true,
  "frontmatter": {
    "collaboration": [
      "string"
    ],
    "constraints": [
      "string"
    ],
    "memory_policy": [
      "string"
    ],
    "principles": [
      "string"
    ],
    "role": "string",
    "tags": [
      "string"
    ],
    "tone": [
      "string"
    ],
    "version": "string"
  },
  "limits": {
    "context_projection_bytes": 0,
    "max_body_bytes": 0,
    "max_bytes": 0
  },
  "present": true,
  "revision_id": "string",
  "snapshot_id": "string",
  "source_path": "string",
  "truncated": true,
  "valid": true,
  "validation_status": "missing"
}
{
  "error": "string"
}
Empty

Spawn a narrowed child session for the calling agent

POST/api/agent/spawn

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/spawn" \  -H "Content-Type: application/json" \  -d '{    "agent_name": "string",    "auto_stop_on_parent": true,    "permissions": {      "mcp_servers": [        "string"      ],      "network_channels": [        "string"      ],      "sandbox_profiles": [        "string"      ],      "skills": [        "string"      ],      "tools": [        "string"      ],      "workspace_paths": [        "string"      ]    },    "spawn_role": "string",    "ttl_seconds": 0  }'
{
  "spawn": {
    "lineage": {
      "auto_stop_on_parent": true,
      "parent_session_id": "string",
      "permission_policy": {
        "mcp_servers": [
          "string"
        ],
        "network_channels": [
          "string"
        ],
        "sandbox_profiles": [
          "string"
        ],
        "skills": [
          "string"
        ],
        "tools": [
          "string"
        ],
        "workspace_paths": [
          "string"
        ]
      },
      "root_session_id": "string",
      "spawn_budget": {
        "max_active_per_workspace": 0,
        "max_children": 0,
        "max_depth": 0,
        "ttl_seconds": 0
      },
      "spawn_depth": 0,
      "spawn_role": "string",
      "ttl_expires_at": "2019-08-24T14:15:22Z"
    },
    "permissions": {
      "mcp_servers": [
        "string"
      ],
      "network_channels": [
        "string"
      ],
      "sandbox_profiles": [
        "string"
      ],
      "skills": [
        "string"
      ],
      "tools": [
        "string"
      ],
      "workspace_paths": [
        "string"
      ]
    },
    "session": {
      "acp_caps": {
        "supported_models": [
          "string"
        ],
        "supported_modes": [
          "string"
        ],
        "supports_load_session": true
      },
      "acp_session_id": "string",
      "activity": {
        "current_tool": "string",
        "elapsed_seconds": 0,
        "idle_seconds": 0,
        "iteration_current": 0,
        "iteration_max": 0,
        "last_activity_at": "2019-08-24T14:15:22Z",
        "last_activity_detail": "string",
        "last_activity_kind": "string",
        "last_progress_at": "2019-08-24T14:15:22Z",
        "tool_call_id": "string",
        "turn_id": "string",
        "turn_source": "string",
        "turn_started_at": "2019-08-24T14:15:22Z"
      },
      "agent_name": "string",
      "channel": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "failure": {
        "crash_bundle_path": "string",
        "kind": "string",
        "summary": "string"
      },
      "health": {
        "active_prompt": true,
        "agent_name": "string",
        "attachable": true,
        "eligible_for_wake": true,
        "health": "healthy",
        "ineligibility_reason": "session_prompt_active",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "last_error": "string",
        "last_presence_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "state": "idle",
        "updated_at": "2019-08-24T14:15:22Z",
        "workspace_id": "string"
      },
      "id": "string",
      "lineage": {
        "auto_stop_on_parent": true,
        "parent_session_id": "string",
        "permission_policy": {
          "mcp_servers": [
            "string"
          ],
          "network_channels": [
            "string"
          ],
          "sandbox_profiles": [
            "string"
          ],
          "skills": [
            "string"
          ],
          "tools": [
            "string"
          ],
          "workspace_paths": [
            "string"
          ]
        },
        "root_session_id": "string",
        "spawn_budget": {
          "max_active_per_workspace": 0,
          "max_children": 0,
          "max_depth": 0,
          "ttl_seconds": 0
        },
        "spawn_depth": 0,
        "spawn_role": "string",
        "ttl_expires_at": "2019-08-24T14:15:22Z"
      },
      "name": "string",
      "provider": "string",
      "sandbox": {
        "backend": "string",
        "instance_id": "string",
        "last_sync_error": "string",
        "profile": "string",
        "provider_state_json": null,
        "sandbox_id": "string",
        "state": "string"
      },
      "state": "starting",
      "stop_detail": "string",
      "stop_reason": "completed",
      "type": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string",
      "workspace_path": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Atomically claim the next matching task run for the calling agent

POST/api/agent/tasks/claim-next

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/claim-next" \  -H "Content-Type: application/json" \  -d '{}'
{
  "claim": {
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "lease": {
      "claim_token_hash": "string",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "lease_until": "2019-08-24T14:15:22Z",
      "run_id": "string",
      "session_id": "string",
      "status": "queued",
      "task_id": "string"
    },
    "run": {
      "attempt": 0,
      "claim_token_hash": "string",
      "claimed_at": "2019-08-24T14:15:22Z",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "idempotency_key": "string",
      "lease_until": "2019-08-24T14:15:22Z",
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "queued_at": "2019-08-24T14:15:22Z",
      "result": null,
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "queued",
      "task_id": "string"
    },
    "task": {
      "id": "string",
      "identifier": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "workspace_id": "string"
    }
  }
}
Empty
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Complete a claimed task run for the calling agent

POST/api/agent/tasks/{run_id}/complete

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

result?unknown

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/complete" \  -H "Content-Type: application/json" \  -d '{}'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Fail a claimed task run for the calling agent

POST/api/agent/tasks/{run_id}/fail

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/fail" \  -H "Content-Type: application/json" \  -d '{    "error": "string"  }'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Extend a claimed task-run lease for the calling agent

POST/api/agent/tasks/{run_id}/heartbeat

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/heartbeat" \  -H "Content-Type: application/json" \  -d '{}'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Release a claimed task run for the calling agent

POST/api/agent/tasks/{run_id}/release

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

reason?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/release" \  -H "Content-Type: application/json" \  -d '{}'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty