Skip to main content

Runtime

List backend-agent artifacts for local runtime execution

GET
/runtime/backend-agent-artifacts
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/runtime/backend-agent-artifacts"
{
  "$schema": "/api/v1/schemas/ListRuntimeBackendAgentArtifactsResponse.json",
  "artifacts": [
    {
      "description": "string",
      "disable_tools": true,
      "findings_schema": {
        "property1": null,
        "property2": null
      },
      "max_tool_rounds": 0,
      "model_hint": "string",
      "name": "string",
      "slug": "string",
      "system": "string",
      "tools": [
        "string"
      ],
      "version": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Reserve one external action by idempotency key

POST
/runtime/evidence/action-receipts/begin
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/runtime/evidence/action-receipts/begin" \  -H "Content-Type: application/json" \  -d '{    "action_id": "string",    "idempotency_key": "string"  }'
{
  "$schema": "/api/v1/schemas/RuntimeBeginActionReceiptOutputBody.json",
  "execute": true,
  "receipt": {
    "$schema": "/api/v1/schemas/ActionReceipt.json",
    "action_id": "string",
    "actor_id": "string",
    "charge_usd": 0.1,
    "confirmed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "idempotency_key": "string",
    "provider_receipt": {
      "property1": null,
      "property2": null
    },
    "receipt_id": "string",
    "status": "string",
    "tenant_id": "string"
  }
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Complete a reserved external action

POST
/runtime/evidence/action-receipts/complete
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/runtime/evidence/action-receipts/complete" \  -H "Content-Type: application/json" \  -d '{    "action_id": "string",    "idempotency_key": "string",    "status": "confirmed"  }'
{
  "$schema": "/api/v1/schemas/ActionReceipt.json",
  "action_id": "string",
  "actor_id": "string",
  "charge_usd": 0.1,
  "confirmed_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "idempotency_key": "string",
  "provider_receipt": {
    "property1": null,
    "property2": null
  },
  "receipt_id": "string",
  "status": "string",
  "tenant_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Record idempotent observed or estimated outcome evidence

POST
/runtime/evidence/outcomes
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/runtime/evidence/outcomes" \  -H "Content-Type: application/json" \  -d '{    "event_type": "string",    "idempotency_key": "string",    "observed": true,    "occurred_at": "2019-08-24T14:15:22Z"  }'
{
  "$schema": "/api/v1/schemas/RuntimeRecordOutcomeOutputBody.json",
  "created": true,
  "event": {
    "actor_id": "string",
    "currency": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "estimation_method": "string",
    "event_id": "string",
    "event_type": "string",
    "idempotency_key": "string",
    "observed": true,
    "occurred_at": "2019-08-24T14:15:22Z",
    "recorded_at": "2019-08-24T14:15:22Z",
    "tenant_id": "string",
    "value": 0.1,
    "verification_source": "string"
  }
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}