Skip to content

Update an action

POST
/api/v1/actions/spec/{name}
curl --request POST \
--url http://localhost:11044/api/v1/actions/spec/example \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "description": "example", "inputTypeNames": [ "example" ], "llmModel": "example", "llmTemperature": 1, "outputTypeName": "example", "prompt": "example", "references": [ "example" ], "tools": [ "example" ] }'

Updates a PromptedActionSpec in the world. Only actions in the world’s config/actions directory (not realm-shipped ones) can be edited.

name
required
string

Name of the action to edit, matched exactly against the world’s loaded actions (404 if none). It must be a prompted action whose YAML is at config/actions/<name>.yml in this world; a realm-shipped or non-prompted action is refused with 400

Fields to change on the action; each one omitted or null keeps its current value, and a list given replaces the existing list. The merged spec is written back to the world’s YAML and the world reloads in the background, so the change may not be live when the response arrives

Media typeapplication/json

The body of POST /actions/spec/{name}: changes to a prompted action saved in the world’s config/actions directory. A field left out or null keeps its current value.

object
description

Replacement description of what the action does

string
inputTypeNames

Input type names replacing the whole current set

Array<string>
unique items
llmModel

Replacement model name the action runs on

string
llmTemperature

Replacement sampling temperature the action runs at

number format: double
outputTypeName

Replacement output type name

string
prompt

Replacement Jinja2 prompt template the action runs

string
references

Skill, reference-document or memory names replacing the whole current list

Array<string>
tools

Tool names replacing the whole current list

Array<string>

Example generated

{
"description": "example",
"inputTypeNames": [
"example"
],
"llmModel": "example",
"llmTemperature": 1,
"outputTypeName": "example",
"prompt": "example",
"references": [
"example"
],
"tools": [
"example"
]
}

Action updated

Media type*/*
object
key
additional properties
string

Action is not editable

Media type*/*

A refused action operation: not found, not editable, not deletable, or a compilation that failed

object
message
required

Why, written to be shown, naming the action

string
status
required

Always error

string
Allowed values: error

Action not found

Media type*/*

A refused action operation: not found, not editable, not deletable, or a compilation that failed

object
message
required

Why, written to be shown, naming the action

string
status
required

Always error

string
Allowed values: error