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.
Renames an agent or sets its monthly spend cap. Both take effect at once, without publishing. At the cap the agent pauses and its conversations wait for your team until the month turns (UTC) or the cap is raised or removed.
apiKeyx-api-key<token>id*string^agt_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
name?|nullmonthlySpendCapDollars?||The most the agent may spend in a calendar month (UTC), in dollars and whole cents. Null removes the cap. Takes effect at once, without publishing.
Agent
application/json- response
id*AgentId^agt_[0-9a-hjkmnp-tv-z]{16,24}$name*stringnamespaceId*|nullrevision*stringdraft*publishedVersion*|nullpublishedAt*string|nullpausedAt*string|nullcreditsPausedAt?string|null|nullmonthlySpendCapDollars*number|nullspend*createdAt*stringupdatedAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.agents.update({ "id": "example"});{ "id": "string", "name": "string", "namespaceId": "string", "revision": "string", "draft": { "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 }, "publishedVersion": -9007199254740991, "publishedAt": "string", "pausedAt": "string", "creditsPausedAt": "string", "monthlySpendCapDollars": 0, "spend": { "month": "string", "spentDollars": 0, "capReachedAt": "string" }, "createdAt": "string", "updatedAt": "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.
Add members to a contact group
Adds one or more contacts to a contact group, returning counts of added and skipped members. One request carries at most 1000 ids.