Set the conductor
Gives a v2 avatar's conversations an agenda: a graph of steps, each with instructions for the avatar and edges that say when to move on. It replaces any earlier conductor, including one the avatar's own configuration carries, and applies from the next session. Nothing is rebuilt.
- How it runs: after each turn, a judge model scores each edge's
whencondition. Edges without a condition share the chance that none holds, byweight. The step takes its likeliest edge, or draws one whenrandom. A step without edges is the end. Aspeakedge lets the avatar go on without waiting for the user,speakAfterSseconds later. - Validation: the graph is checked before it is saved.
400 invalid_conductornames the field (e.g./graph/nodes/2/edges/0/weight); a value of the wrong JSON type is422. Per-field limits are on the schema. - Limits: at most 100 nodes and 100 edges, and 150,000 characters of
graph JSON (non-ASCII characters count as their
\uXXXXescapes). The request body may be up to 512 KiB. A session whose whole configuration would be too large starts without the conductor. - v1 avatars are refused (
409 not_v2_avatar).
X-Api-Key<token>Your secret API key (sk_atmee_...; older keys start sk_live_),
sent as X-Api-Key. Keep it on your server and never send it to a
browser.
avatarId*stringuuidapplication/json- body
graph*The steps of the conversation (nodes) and the one it starts in
(start). Every node must be reachable from start. Only start,
nodes and reasoning are accepted.
speakAfterS?numberSeconds after an avatar turn before it speaks again along a speak
edge, if the user has not spoken. 0.1 to 10; absent or null uses the
default, 0.5.
double0.1 <= value <= 10Saved; returns the conductor.
application/json- response
avatarId*stringuuidgraph*The steps of the conversation (nodes) and the one it starts in
(start). Every node must be reachable from start. Only start,
nodes and reasoning are accepted.
speakAfterS?numberAs set; absent when it was not (the default, 0.5, applies).
doublenodes*integerThe graph's node count.
edges*integerThe graph's edge count, all nodes together.
curl -X PUT 'https://api.atmanity.us/v1/avatars/497f6eca-6276-4993-bfeb-53cbbbba6f08/conductor' \ -H 'Content-Type: application/json' \ -d '{ "graph": { "start": "string", "nodes": [ { "id": "string" } ] }}'{ "avatarId": "ac572b6e-802b-4b9e-a602-0786d4441e67", "graph": { "start": "string", "nodes": [ { "id": "string", "instructions": "string", "edges": [ { "to": "string", "when": "string", "weight": 0.1, "speak": true } ], "random": true, "emotion": "string", "role_play": true, "languages": [ "string" ], "replan": true } ], "reasoning": null }, "speakAfterS": 0.1, "nodes": 0, "edges": 0}
