composition_by_language field.
Endpoints
PATCH /v2/agent/{agent_id} doesn’t accept composition_by_language.
composition_by_language object
An object keyed by language code. Each value is an ordered list of nodes, which Bolna joins in order to build the system prompt the agent runs on.
{customer_name} is then filled from the call’s variables, the same as a variable in a plain-text prompt. See Dynamic variables.
Node types
Every node has atype, which decides its other fields. A node with any key not listed for its type is rejected.
text
variable
function_tool
language_value
Prompt shapes
How the object is keyed depends on how the agent’s prompt is built. Keep the shape the agent already uses: edit the nodes you get back fromGET instead of switching between the two.
- Single prompt (one key)
- One prompt per language
Agents using the Single Prompt view have one key, the agent’s default language. The rules and flow are shared On a Hindi call the greeting renders as the
text nodes; every line that is spoken differently per language is a language_value node carrying all its translations.hi value, on an English call as the en value. A language missing from values renders as {language_greeting}, so fill in every language the agent speaks.Read the prompt
GET /v2/agent/{agent_id} returns composition_by_language as a top-level field, next to agent_prompts.
Request
Response (trimmed)
- It is the published prompt of the agent version returned, the same prompt live calls use. Unsaved edits in the platform editor aren’t included.
- It is
nullwhen the agent has no rich text prompt. The prompt is then the plain-textagent_prompts.task_1.system_prompt, which you update as before.
Update the prompt
Send the editedcomposition_by_language as a top-level key in the PUT /v2/agent/{agent_id} body, alongside agent_config and agent_prompts.
1
Get the agent
Call
GET /v2/agent/{agent_id} and keep composition_by_language.2
Edit the nodes
Change
text, add or remove variable and function_tool nodes, or update the wording inside a language_value node’s values. Keep every language key and every node you aren’t changing.3
Send it back with PUT
Include the full
composition_by_language in the PUT body, with the agent’s agent_config and agent_prompts.Request
Payload rules
Errors
See Single Prompt view for how marked lines and translations work in the editor.

