Compare saved-test decisions (Preview)
Preview · Available to selected organizations. Runs saved tests against a supplied draft and the current immutable published definition, returning changed action decisions.
Runs saved tests against a supplied draft and the current immutable published definition, returning changed action decisions. No test or agent is modified and nothing is sent. Large comparisons can time out; run saved tests individually or shorten their conversations before retrying.
apiKeyx-api-key<token>id*string^agt_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
name*AgentName^\S[\s\S]*\S$|^\S$|^$1 <= length <= 120definition*AgentTestRerun
application/json- response
items*array<>import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.agents.rerunTests({ "id": "example", "name": "example", "definition": { "instructions": "example", "knowledge": "example", "endpointIds": [ "example" ], "integrations": [ { "integrationId": "example", "tools": { "kind": "all" } } ], "policy": { "presets": [ "example" ], "rules": [ { "match": {}, "decide": "run" } ] }, "model": "standard", "reasoning": "auto", "workingHours": { "timeZone": "example", "ranges": [ { "day": "monday", "opens": "example", "closes": "example" } ] }, "takeoverTimeoutMinutes": 1 }});{ "items": [ { "testId": "string", "publishedDecisions": [ { "actionIndex": 0, "kind": "send", "tool": "string", "outcome": "allow", "text": "string" } ], "draftDecisions": [ { "actionIndex": 0, "kind": "send", "tool": "string", "outcome": "allow", "text": "string" } ], "changedDecisions": [ { "actionIndex": 0, "kind": "send", "tool": "string", "outcome": "allow", "text": "string" } ] } ]}Related documentation
Replace an agent draft (Preview)
Preview · Available to selected organizations. Replaces the whole draft and returns the agent with a new revision.
Update an agent (Preview)
Preview · Available to selected organizations. Renames an agent or sets its monthly spend cap. Both take effect at once, without publishing.