Skip to Content

Get a published agent version

Returns the immutable definition of one published version. Request: GET /v1/agents/{id}/versions/{version}. Scope: agents:read.

GET
/v1/agents/{id}/versions/{version}

Returns the immutable definition of one published version.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^agt_[0-9a-hjkmnp-tv-z]{16,24}$
version*string

Response Body

AgentVersion

application/json
  1. response
agentId*AgentId
Match^agt_[0-9a-hjkmnp-tv-z]{16,24}$
version*integer
Range-9007199254740991 <= value <= 9007199254740991
definition*
publishedAt*string
modelFallback*|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.agents.getVersion({
  "id": "example",
  "version": "example"
});
Example Response
{
  "agentId": "string",
  "version": -9007199254740991,
  "definition": {
    "instructions": "string",
    "knowledge": "string",
    "knowledgeSourceIds": [
      "string"
    ],
    "endpointIds": [
      "string"
    ],
    "integrations": [
      {
        "integrationId": "string",
        "tools": {
          "kind": "all"
        }
      }
    ],
    "policy": {
      "presets": [
        "string"
      ],
      "rules": [
        {
          "match": {
            "kind": "send",
            "effect": "read",
            "channel": "sms",
            "integration": "string",
            "tool": "string",
            "subject": "agent"
          },
          "note": "string",
          "decide": "run",
          "atLeast": null
        }
      ],
      "instructions": "string"
    },
    "model": "standard",
    "reasoning": "auto",
    "workingHours": {
      "timeZone": "string",
      "ranges": [
        {
          "day": "monday",
          "opens": "string",
          "closes": "string"
        }
      ]
    },
    "takeoverTimeoutMinutes": 1
  },
  "publishedAt": "string",
  "modelFallback": {
    "from": "string",
    "to": "standard",
    "reason": "candidate",
    "since": "string"
  }
}

Related documentation