Agents
Agent management and invocation
Create an agent
Authorization
bearerAuth Supabase JWT token
In: header
Request Body
application/json
Optional note describing this change
Custom entity ID (generated if not provided)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Agent display name
1 <= length <= 200Agent service base URL
uriActions this agent requires on target collections
1 <= itemsCollection to place agent in
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Agent description
length <= 2000Sub-agents this orchestrator delegates work to. Only provide the sub-agent ID (pi) - their permissions are fetched dynamically at invocation time. Warnings are returned if any referenced sub-agents do not exist or are disabled.
JSON Schema for input validation
JSON Schema for output description
Additional properties to store
Relationships to create
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/agents" \ -H "Content-Type: application/json" \ -d '{ "label": "OCR Processor", "endpoint": "https://ocr.example.com/v1", "actions_required": [ "entity:view", "entity:update", "file:create" ], "collection": "string" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "agent",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"warnings": [
{
"sub_agent_id": "string",
"reason": "not_found",
"message": "string"
}
]
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Get agent by ID
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
application/json
curl -X GET "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY"{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "agent",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"warnings": [
{
"sub_agent_id": "string",
"reason": "not_found",
"message": "string"
}
]
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Update agent
Authorization
bearerAuth Supabase JWT token
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Current tip CID for CAS validation. Request fails with 409 if this does not match.
1 <= lengthOptional note describing this change
Properties to add or update (deep merged)
Properties to remove. Use string[] for top-level keys (e.g., ["old_field"]), or nested objects for deep removal (e.g., { config: { options: ["debug"] } }). Dot notation like "config.options.debug" is NOT supported.
Relationships to add or update (upsert semantics)
Relationships to remove
Updated agent display name
1 <= length <= 200Updated agent description
length <= 2000Updated agent service URL
uriActions this agent requires on target collections
1 <= itemsAgent status
"development" | "active" | "disabled"Updated sub-agent references. Only provide sub-agent IDs (pi) - their permissions are fetched dynamically at invocation time.
Updated input schema
Updated output schema
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY" \ -H "Content-Type: application/json" \ -d '{ "expect_tip": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "agent",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"warnings": [
{
"sub_agent_id": "string",
"reason": "not_found",
"message": "string"
}
]
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Invoke an agent
Authorization
bearerAuth Supabase JWT token
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Collection ID to grant the agent access to. All agent permissions are collection-scoped.
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Job collection where agent should write logs. If not provided, creates new root collection.
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Input data for the agent (validated against agent input_schema)
Permission duration in seconds (60-86400, default: 3600)
360060 <= value <= 86400false = preview grants, true = execute agent
falseResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY/invoke" \ -H "Content-Type: application/json" \ -d '{ "target": "string" }'{
"status": "pending_confirmation",
"message": "string",
"grants": [
{
"agent": {
"id": "string",
"label": "string"
},
"actions": [
"string"
],
"role": "string",
"already_granted": true,
"expired": true,
"missing_actions": true,
"current_expires_at": "2019-08-24T14:15:22Z"
}
],
"target": {
"id": "string",
"label": "string"
},
"expires_at": "2019-08-24T14:15:22Z",
"can_proceed": true,
"grants_needed": true,
"warnings": [
{
"sub_agent_id": "string",
"parent_agent_id": "string",
"reason": "not_found",
"message": "string"
}
]
}{
"status": "started",
"job_id": "job_01JEXAMPLEID12345678901",
"job_collection": "string",
"grants": [
{
"agent_id": "string",
"role": "string",
"expires_at": "2019-08-24T14:15:22Z",
"was_update": true
}
],
"target_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"expires_at": "2019-08-24T14:15:22Z"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}List API keys for agent
Authorization
bearerAuth Supabase JWT token
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY/keys"{
"keys": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"prefix": "string",
"created_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"last_used_at": "2019-08-24T14:15:22Z",
"label": "string"
}
]
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Create API key for agent
Authorization
bearerAuth Supabase JWT token
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Human-readable label for the key
length <= 100Key expiration in days (1-365, default: 365)
3651 <= value <= 365Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY/keys" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"key": "ak_abc123...",
"prefix": "ak_abc1",
"created_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"label": "string"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Revoke API key
Authorization
bearerAuth Supabase JWT token
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$API key prefix (e.g., ak_xKj9)
4 <= length <= 12Response Body
application/json
application/json
application/json
curl -X DELETE "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY/keys/ak_xKj9"{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Verify agent endpoint ownership
Authorization
bearerAuth Supabase JWT token
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Set to true to perform verification. Omit or false to generate/get verification token.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/agents/01KDETYWYWM0MJVKM8DK3AEXPY/verify" \ -H "Content-Type: application/json" \ -d '{}'{
"verification_token": "vt_abc123def456...",
"agent_id": "string",
"endpoint": "http://example.com",
"instructions": "string",
"expires_at": "2019-08-24T14:15:22Z"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Get job status from agent
Path Parameters
Agent entity ID
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Job ID returned from agent invocation (e.g., job_01KFX...)
1 <= lengthQuery Parameters
Include detailed sub-job information (orchestrators/workflows only)
"full"Include last N errors in response (orchestrators only)
0 <= value <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://arke-v1.arke.institute/agents/string/jobs/job_01KFXPQ3ABCDEFGHIJKLMN/status"{
"job_id": "job_01KFXPQ3ABCDEFGHIJKLMN",
"status": "running",
"progress": {
"total": 10,
"pending": 3,
"dispatched": 2,
"done": 4,
"error": 1
},
"started_at": "2026-01-26T17:48:15.000Z",
"completed_at": "2026-01-26T17:49:30.000Z",
"updated_at": "2026-01-26T17:49:27.000Z",
"result": {
"property1": null,
"property2": null
},
"error": {
"code": "TIMEOUT",
"message": "Request timed out after 30 seconds"
}
}{
"error": "Entity not found"
}{
"error": "Failed to reach agent: Connection refused"
}