Agentic - Agents

Update the prompt for an agent

Update the prompt for an agent

put/api/v1/agentic/agents/prompt

Request

  • Base URL: https://api.voicelogica.ai
  • URL: https://api.voicelogica.ai/api/v1/agentic/agents/prompt
  • Auth: API key in header x-api-key

Headers

x-api-keystring required

Your API key for authentication. Required for all endpoints.

x-company-idstring

Optional company ID for resellers. When provided, the API request will operate on behalf of the specified subsidiary company. The API key must have access to the specified company.

Request body

promptstring required

The prompt text to evaluate

agentIdstring

The agent ID. If not provided, uses the default agent

destination'prod' | 'version'

Where to write the prompt. "prod" (default) updates the live agent immediately. "version" saves it as a numbered version WITHOUT touching the live agent (a new one, or agentVersionId when given) — test it with run_agent_scenario (agentVersionId) or scenarios_execute (action "run_agent_scenario_matrix") (versionIds), then put it live with versions_execute (action "publish_agent_version").

agentVersionIdstring

With destination "version": edit this saved version (from versions_query (action "list_agent_versions")) instead of creating a new one. Edits then build on that version's prompt.

Response

Prompt updated successfully

promptstring required

Main/systemic system prompt (agent.systemPrompt)

additionalCallSystemPromptstring

Additional call instructions from phone settings (agentPhoneSettings.systemPrompt). During calls both are merged at runtime.

agentIdstring

The agent ID. If not provided the default agent will be used

destination'prod' | 'version'

Where the prompt was written (update only)

agentVersionIdstring

Saved version id when destination was "version"

versionNumbernumber

Saved version number when destination was "version"

promptCharactersstring

Prompt size against the plan cap, e.g. "18420/20000". A write over the cap is REJECTED and nothing is saved, so check this before composing a longer prompt.

promptCharactersRemainingnumber

Characters still available before the plan cap is hit. Negative means the prompt would be rejected.

promptBudgetHintstring

Present only when prompt space is running low: tells you to move reference content to a knowledge file with add_knowledge_text instead of growing the prompt.

Changes

No recorded changes to this operation across all 2 revisions of this API.