Agents
Get a published agent version (Preview)
Preview · Available to selected organizations. Returns the immutable definition of one published version. Use this endpoint to get a published agent version through the Samva email API.
GET
Returns the immutable definition of one published version.
apiKeyheader
x-api-key<token>id*stringMatch
^agt_[0-9a-hjkmnp-tv-z]{16,24}$version*stringAgentVersion
application/json- response
agentId*AgentIdMatch
^agt_[0-9a-hjkmnp-tv-z]{16,24}$version*integerRange
-9007199254740991 <= value <= 9007199254740991definition*publishedAt*stringmodelFallback*|nullimport { 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" }, "requireApproval": [ "string" ] } ], "mode": "live", "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
Get an agent (Preview)
Preview · Available to selected organizations. Returns an agent with its draft, its current revision, and its newest published version number.
List agents (Preview)
Preview · Available to selected organizations. Returns the agents the caller can reach, newest first, without their drafts. Pass nextCursor back as cursor for the next page.