Skip to content

Agents

An agent is a directory with a turion.toml. A new agent starts from the template: instructions and skills that Turion runs on Pi, the agent harness in its agent runner. An agent can also be Python code of your own: a run(input, ctx) function and the tools it calls. Either way it reaches models through the gateway, so every model call it makes is traced, and the model behind a deployed agent can change without a code change.

The usual path:

  1. Create an agent from the template and write what it does: its instructions and skills.
  2. Deploy it. Turion runs it once per request at POST /v1/agents/{name}/runs.
  3. Score it on eval cases from your own traffic.
  4. Once it has 1,000 usable traces (successful model calls), distil them into a small fine-tune.
  5. Route a share of its model calls to the fine-tune, with the frontier model as the fallback.

This page covers steps 1 and 2; Evaluate, distil & route covers 3 to 5.

In the workspace: turion.ai/members/agents lists your deployed agents. An agent’s page shows its runs, revisions, eval results, traces and distillation readiness, and lets you chat with it, run it, set its route and secrets, start a distillation and decide on its proposals. New agent on that page creates an agent from the template on the server: you name it and pick its model, instructions, skills and Turion Brain access.

turion agent new NAME copies the template into a new directory, ./NAME:

Terminal window
turion agent new my-agent
# created my-agent (agent my-agent)
#
# next:
# cd my-agent
# turion agent deploy
# turion agent run my-agent -i "What can you help me with?"
#
# what it does is in instructions.md and skills/: edit them, then deploy again

Without NAME the agent is called assistant. A second argument names another directory to create; see turion agent new. turion agent new assistant --name my-agent does the same and also works on older versions of the CLI, back to 0.5.1.

FileWhat it is
instructions.mdWhat the agent is for and how it behaves. Start here.
skills/One folder per skill, each with a SKILL.md: answer-with-sources, search-company-brain, write-a-brief and reply-as-json. The agent reads a skill when its description fits the task.
knowledge/Files the agent can search and read. They ship with it when you deploy.
turion.tomlThe model, the skills and tools it gets, and the Turion Brain sources it may read.
agent.pyOne import. The harness is part of the runner, not of this folder.
README.mdThese notes, for whoever edits the agent next.

Its turion.toml:

[agent]
name = "my-agent"
version = "1.0.0"
description = "A general assistant on Pi: it follows your instructions, uses the skills you give it, and can read your Turion Brain."
harness = "pi"
entry = "agent:run"
model = "deepseek-v4.1-flash" # Turion's shared model: it needs no provider key of yours
secrets = []
# brain_sources = ["*"]
timeout = 300
[pi]
instructions = "instructions.md"
skills = ["skills/answer-with-sources", "skills/search-company-brain", "skills/write-a-brief", "skills/reply-as-json"]
tools = ["read", "grep", "find", "ls"]
max_turns = 24
# [pi.mcp.linear]
# url = "https://mcp.linear.app/mcp"
# headers = { Authorization = "Bearer ${LINEAR_API_KEY}" }
  • What it does is in instructions.md and skills/. Add a skill as a folder with a SKILL.md and list it in [pi] skills, or take one from your company skills.
  • The model is deepseek-v4.1-flash, Turion’s shared model from the model garden, so the agent runs without a provider key of yours. Set model to a provider’s model (openai/gpt-6-luna, after turion providers set openai) or to one of your deployed models, and deploy again.
  • Tools are what it may do in its own container. The default is read-only: read, grep, find, ls. Add bash, edit or write only for an agent that should run commands or change files. A [pi.mcp.<name>] table turns an MCP server into tools; its values may read the agent’s secrets from the environment (list the secret under [agent] secrets first).
  • The Turion Brain: uncomment brain_sources and the agent gets the Brain’s search, record and timeline tools. ["*"] is every source; see Turion Brain access.
  • No local run. A Pi agent runs on Turion only: turion agent run --local and a local turion agent eval have nothing to run, and the agent says so. Deploy it, then run the deployed agent.

The template has no distil_base and no eval file: its work is too varied to distil until you narrow it to one job. Its calls are traced like any other agent’s. Once it does one job, add an [eval] table with 50 to 100 cases from your own traffic, and set distil_base (then turion agent get shows how close it is to a distil), or pass --base to turion agent distil.

An agent can be your own Python code instead: a directory with a turion.toml (without harness), an agent.py with run(input, ctx), the tools it calls, a requirements.txt and an eval file. You write the directory yourself; turion agent run --local, turion agent eval and turion agent deploy work on it, and the rest of this page applies to both kinds.

A Pi agent’s skills are folders in its code, each with a SKILL.md. To give several agents the same skills, keep them once in the workspace: in the dashboard, Agents → Skills lists them.

  • Install from skills.sh: paste a skills.sh link, a GitHub link or owner/repo. Turion reads the public repository from GitHub, finds its skills the way the skills CLI does, and copies the ones you pick, with the repository and commit they came from.
  • Write a skill: a name, when to use it, and the instructions. Turion saves them as the skill’s SKILL.md.

A skill holds text files only, at most 100 files and 2 MB, and a workspace keeps up to 100.

New agent lists the workspace’s skills under the template’s own, off until you tick them. Each one you tick is copied into the agent as skills/<name>/ and added to [pi] skills. One named like a template skill you keep can’t be picked: leave the template’s out to use yours. The agent keeps its copy, so removing a skill from the list, or a change in its repository, does not change an agent already deployed. From the API, pass the names as company_skills to POST /v1/agents/blueprints/assistant/deploy, which creates an agent from the template (REST reference).

A skill is instructions, and sometimes scripts, that the agent follows. Install only skills you trust, and check the repository an installed skill came from.

The [agent] table of an agent with its own code:

[agent]
name = "support-triage" # agent:<name> on the gateway, /v1/agents/<name>
version = "1.0.0"
description = "Classifies a support ticket, answers it from the help centre with citations, or escalates it to a person."
entry = "agent:run" # module:function
model = "openai/gpt-6-luna" # the model the agent calls
# fallback = "anthropic/claude-haiku-5-5" # retried when `model` errors
distil_base = "ministral-3-3b" # what `turion agent distil` fine-tunes
secrets = ["ZENDESK_SUBDOMAIN", "ZENDESK_EMAIL", "ZENDESK_API_TOKEN"] # read as env vars
timeout = 300 # seconds per run, 10–3,600
min_replicas = 0 # 1 keeps one container booted
# brain_sources = ["github"] # Turion Brain sources its key may read
# [[agent.schedule]] # runs it on a UTC cron, see Schedules
# name = "weekly"
# cron = "0 6 * * 1"
# input = { report = "weekly" }
[eval]
file = "evals.jsonl"

Names are lowercase letters, digits and dashes, starting with a letter or digit, at most 63 characters. model and fallback are any gateway model id (<provider>/<model>, a deployed fine-tune, a garden id), but not another agent. A Pi agent adds harness = "pi" and a [pi] table, as in the template.

min_replicas = 1 keeps one container booted between runs, so runs skip the setup wait described under Deploy. 0, the default, starts a container when a run arrives. It takes effect on the next turion agent deploy, and only the current revision is kept booted. The container is a CPU container; its time is not billed and does not count toward your monthly GPU-seconds. A workspace can keep 1 agent booted, or 10 on the Enterprise plan; a deploy past that answers 409 warm_agent_limit and names the agents that hold the places.

The agent code gets these environment variables from turion agent run --local, turion agent eval and the hosted runner alike:

VariableValue
TURION_BASE_URLthe gateway, e.g. https://api.turion.ai/v1
TURION_API_KEYlocally your own key; deployed, the agent’s own key
TURION_MODELlocally the model from turion.toml (or --model); deployed, agent:<name>
TURION_AGENT_NAMEthe agent’s name

run(input, ctx) gets the run’s input and a ctx dict with run_id, agent and trigger (what started the run, as on the run object; api on your machine), plus "trace": False when the run must not be traced (eval runs set it, and TURION_TRACE=off in the environment means the same). Point the OpenAI SDK at TURION_BASE_URL, send X-Turion-Agent: <name> on every call and X-Turion-Run: <run id> per run, so each trace says which agent and run it belongs to, and send X-Turion-Trace: off when tracing is off. A Pi agent does all of this for you. run() returns any JSON value; by convention a dict whose output key is the final answer, which is what turion agent run prints and evals score.

An agent with its own code runs on your machine before you deploy it (a Pi agent does not; see the template):

Terminal window
cd support-triage # a directory with turion.toml and agent.py
turion providers set openai # its model, openai/gpt-6-luna, runs on your own key
turion agent run --local -i "Where is my order A-1001?"

--local runs the code in the current directory on your machine, in its own environment (uv run --no-project --with-requirements requirements.txt when uv is installed and the directory has a requirements.txt, otherwise the CLI’s own Python, which then needs openai installed). Its model calls go through the gateway with your own Turion key, so you need turion login and a provider key for the model in turion.toml. Without the OpenAI key the first call fails with model_not_found and a hint to run turion providers set openai. --model tries a different model without editing turion.toml:

Terminal window
turion agent run --local -i @ticket.json --model anthropic/claude-haiku-5-5

-i takes text, @file or - (stdin); text that parses as a JSON object or array is sent as JSON. --file PATH (repeatable) uploads a file, or a folder as a zip, and adds its turion:// ref to the input’s "files" list; the input must then be a JSON object or left out. With --local the file’s absolute path goes in the list instead and nothing is uploaded. What the agent prints goes to stderr, its output to stdout (--json prints the whole result). Secrets are read from your shell environment.

Local runs are traced under the agent’s name like deployed ones. Traces made before the agent’s first deploy are attributed to it once you deploy, so local runs on a frontier model count toward distillation too.

From the agent’s directory:

Terminal window
turion agent deploy
# created my-agent (revision 1)
# model deepseek-v4.1-flash
# endpoint https://api.turion.ai/v1/agents/acme/my-agent/runs
#
# next:
# turion agent run my-agent -i "hello"
# turion agent eval --remote
# turion agent traces my-agent

When turion.toml declares secrets the agent does not have yet, the first next step is the turion agent secrets set command for them. The run step uses the first eval case’s input when the agent has one that is short. Deploying again prints updated my-agent: revision 1 → 2, shows a model change as old → new, and says so when the code and config are the same as the current revision’s. On a terminal it asks before changing a deployed agent’s model; --yes skips the question.

deploy packs the directory (without .git, __pycache__, virtualenvs, node_modules, caches, dist/build, *.pyc, .env, .env.* and .envrc files, and without following symlinks; at most 50 MiB), uploads it and creates the agent, or a new revision of it. Skipped symlinks are listed as it packs. The first deploy also creates the agent’s own API key. That key is never shown: it is injected into the agent’s container, and it can only call /v1/chat/completions and /v1/systemone, read /v1/models and the agent’s traces, create datasets in your account and read them back by id, and read the Turion Brain through the sources its turion.toml declares (Turion Brain access). Every call made with it is attributed to the agent.

A deployed agent runs in a CPU container: it downloads the code, pip installs requirements.txt when there is one and imports the entry function (for a Pi agent, the harness in the runner). The first run after a deploy or an idle period waits for that setup; a container then stays warm for 5 minutes after its last run. With min_replicas = 1 a container stays booted, and a run waits only if it arrives while that container is still starting after a deploy. Each run is limited to the timeout in turion.toml.

turion agent list shows your agents; turion agent get NAME shows one, with its revisions, its route (or, without one, the model it calls), which declared secrets are set, the Turion Brain sources it may read, its schedules, trace count, distil progress and its endpoint. Both take --json. turion agent pull NAME downloads the code of the current revision into ./NAME (--revision N for an older one), checked against the sha256 recorded at deploy. turion agent rm NAME deletes an agent’s revisions, saved evals and secrets, revokes its key and stops its endpoint; its runs and traces stay (it asks first; -y skips the prompt).

The deployed agent reads its integrations’ credentials as environment variables. For an agent with its own code that calls Zendesk:

Terminal window
turion agent secrets set support-triage \
ZENDESK_SUBDOMAIN=acme ZENDESK_EMAIL=ops@acme.com ZENDESK_API_TOKEN
# ZENDESK_API_TOKEN: ********
# set ZENDESK_SUBDOMAIN, ZENDESK_EMAIL, ZENDESK_API_TOKEN on support-triage (secrets: …)
turion agent secrets list support-triage
turion agent secrets rm support-triage JIRA_API_TOKEN

KEY=VALUE, KEY=@file, or a bare KEY to be prompted without echo. Values are encrypted at rest and never returned; listings show names only. A container that is already warm can keep the old values until it goes idle, 5 minutes after its last run. .env files are never uploaded with the code.

A deployed agent can read your workspace’s Turion Brain with its own key, but only the sources its turion.toml names:

[agent]
brain_sources = ["github", "website", "googlesearchconsole"]

Each entry is a Brain tool’s key (github, website, stripe, …, or custom-<slug> for a tool you named), at most 25 of them, each once. turion agent deploy refuses an unknown key, a duplicate or anything but a list with 400 validation_error. The list is read from the current revision, so a change takes effect on the next deploy. turion agent get NAME shows it on the brain line.

The agent’s key may then call these routes, for its own workspace only:

RouteWhat it does
GET /v1/brain/overviewwhat the Brain holds, in counts
POST /v1/brain/searchfull-text search over the records
GET /v1/brain/document?id=one record with its links
GET /v1/brain/entity?id=one person, repository, … with its links
POST /v1/brain/aska question, answered from the records with citations
POST /v1/brain/mcpthe Brain’s MCP server and its read tools

Every one of them sees only the records of those sources, the entities that belong to those sources or that their records link to (people, repositories, …), and the links between what it can see. A record of another source answers 404, as a missing one does. A search with a source outside the list answers 403 brain_source_not_allowed. An entity comes without its other names (aliases is empty) and with only those sources’ ids in external_ids.

The sql tool (brain_sql over MCP) reads every table, so an agent with a list does not get it, in questions or over MCP. brain_sources = ["*"] reads every source and gets sql too. Numbers by day (Search Console clicks, Stripe MRR, Railway deploys) come from the metrics tool (brain_metrics over MCP), with a list or with ["*"]. It reads only the agent’s sources, filtered by metric, day range, subject and dimension, at most 2,000 rows a call; a source outside the list is a tool error.

An agent with no brain_sources, or an empty list, gets 403 agent_key_scope from these routes. Every other /v1/brain route refuses an agent’s key whatever it declares.

A tool that an owner or admin limited to owners and admins (Who can ask) is not read by any agent, named in brain_sources or not. While a workspace has such a tool, ["*"] reads the tools that are open to everyone and does not get sql.

From the agent’s code, call them with TURION_BASE_URL and TURION_API_KEY:

import os
import httpx
r = httpx.post(
f"{os.environ['TURION_BASE_URL']}/brain/ask",
headers={
"Authorization": f"Bearer {os.environ['TURION_API_KEY']}",
"X-Turion-Trace": "off",
},
json={"question": "What did we ship last week?"},
timeout=60,
)
print(r.json()["answer"])

A question’s model calls are your workspace’s own gateway calls, billed and traced as the agent’s. X-Turion-Trace: off on POST /v1/brain/ask keeps them out of the traces, as it does on /v1/chat/completions.

A local run (turion agent run --local, or turion agent eval without --remote) uses your own key as TURION_API_KEY, so it reads every source that is open to everyone, whatever brain_sources says. Check what the deployed agent can see with a deployed run.

Terminal window
turion agent run support-triage -i "How long does express shipping take?"
turion agent logs support-triage # what the newest run printed; --run ID for another
turion agent run data-converter --file ./raw -i '{"format": "chat"}'

--file PATH uploads the file (a folder as a zip) and the deployed agent gets it as a URL in the input’s "files" list; the node turns each turion:// ref into a presigned https:// URL before the run starts.

turion agent run waits for the result (--wait, default 60 seconds held on the server, then it polls) and gives up after --timeout seconds (default 300); the run itself keeps going. On a terminal it shows a spinner with the elapsed time. Ctrl-C stops waiting, not the run.

Over HTTP, with an account API key (the agent’s own key is refused here):

Terminal window
curl https://api.turion.ai/v1/agents/support-triage/runs \
-H "Authorization: Bearer $TURION_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"input": {"subject": "Refund", "body": "The socks are too small"},
"wait": 60}'

input is any JSON value; it is passed to run(input, ctx). The server holds the request up to wait seconds (at most 300): it answers 200 with the finished run, or 202 with the run still going, which you then poll at GET /v1/agents/{name}/runs/{run_id}. "wait": 0 returns at once. The run object has id, status (starting, processing, succeeded, failed, canceled), input, output (what run() returned), error, revision, logs_url and trigger, what started it: api for a call to this endpoint, schedule:<name> for a schedule, approval:<id> for the run of an approved proposal. The single-run read also lists the gateway calls the run made. GET /v1/agents/{name}/runs pages through past runs. The runs URL deploy prints, /v1/agents/{owner}/{name}/runs, is the same endpoint.

From Python:

import turion
client = turion.Client()
run = client.agents.run("support-triage", {"subject": "Refund", "body": "The socks are too small"})
print(run.status, run.output["output"])

A failed run is returned with status: "failed" and the traceback in its logs, not raised.

An agent keeps nothing between runs. To chat with it, send each message as a run with conversation: "new" for the first message, then the conversation’s id for the next ones. input is then the message, a string that is not empty.

Terminal window
curl https://api.turion.ai/v1/agents/helper/runs \
-H "Authorization: Bearer $TURION_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"input": "What is our refund policy?", "conversation": "new"}'
# … "conversation": "acv_3f9a0c1d2e4b5a6c", "message": "What is our refund policy?" …
curl https://api.turion.ai/v1/agents/helper/runs \
-H "Authorization: Bearer $TURION_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"input": "And for annual plans?",
"conversation": "acv_3f9a0c1d2e4b5a6c"}'

Turion stores the conversation and gives the agent the earlier turns as text at the top of its input, so any agent can follow on, on Pi or not. The first message goes in alone. After that, the input is a <conversation_so_far> block with each earlier turn as a <user> part and an <assistant> part, oldest first, then a blank line and the new message:

<conversation_so_far>
This message continues a conversation. Its earlier turns follow, oldest first.
Reply to the new message after this block.
<user>
What is our refund policy?
</user>
<assistant>
Refunds within 30 days.
</assistant>
</conversation_so_far>
And for annual plans?
  • The agent’s reply in a turn is its output.output when it returned an object with a string output (a Pi agent and the blueprints do), a string output as it is, and anything else as compact JSON.
  • Only turns that succeeded are given. A failed or canceled turn is left out, message and all, so send the message again.
  • The newest turns that fit in about 24,000 characters are given. Older ones are left out, and the block says so. The whole input stays within the 1 MiB limit.
  • One message at a time: while the conversation’s last run is still queued or running, another message gets 409 conversation_busy. A run that no runner started stops holding the conversation 85 minutes after it was created.
  • A conversation belongs to one agent. Another agent’s id, or an unknown one, is 404 conversation_not_found.

The run object then has conversation (its id) and message (the message as you sent it), while input is what the agent received. Both are null for a run outside a conversation. GET /v1/agents/{name}/conversations lists the agent’s conversations, GET /v1/agents/{name}/conversations/{id} returns one with its turns, and DELETE on the same path deletes it; its runs stay. Tool results from earlier turns are not carried over, only the text of each message and reply. In the workspace, the agent’s Chat tab does all of this.

A deployed agent can also run on its own, at set times. Add [[agent.schedule]] tables under [agent] in turion.toml and deploy:

[agent]
name = "weekly-report"
# …
[[agent.schedule]]
name = "weekly"
cron = "0 6 * * 1" # Mondays at 06:00 UTC
input = { report = "weekly" }
[[agent.schedule]]
name = "daily"
cron = "30 7 * * MON-FRI" # weekdays at 07:30 UTC

Each schedule has a name, a cron and an optional input. The name is lowercase letters, digits and dashes, starting with a letter or digit, at most 40 characters, and used once per agent. input is any TOML value; each run passes it to run(input, ctx) as JSON, and without one the agent gets None. An agent has at most 10 schedules. No other keys are allowed, a time zone (tz) included.

Write them as [[agent.schedule]], nested under [agent]. turion agent deploy sends only the [agent] table, so it refuses a top-level [[schedule]] with invalid_config instead of dropping it. A bad schedule fails the deploy with 400 validation_error naming the field (config.schedule[0].cron), and nothing is deployed.

Schedules are saved with the deploy and replaced by the next one; a deploy without them removes them. A schedule that keeps its name and cron keeps its next run time, and a changed cron gets a new one.

A cron is five fields, minute hour day-of-month month day-of-week, always in UTC. There are no time zones, no seconds and no @daily-style shortcuts. Each field is *, a number, a range a-b, a step */n or a-b/n, or a comma list of those. Months can be written JAN to DEC and days SUN to SAT, in any case. Day of week runs 0 to 7, where 0 and 7 are both Sunday. A cron that never fires, such as 0 0 30 2 *, is refused.

A step counts from the start of its range, so it starts again with the next hour, day, week or month: */15 in minutes is 0, 15, 30 and 45; */2 in day of month is the 1st, 3rd, 5th and so on to the 31st, so the 31st and the next 1st both run; */2 in day of week is Sunday, Tuesday, Thursday and Saturday.

A day field is restricted when it does not cover its whole range. *, */1 and 1-31 in day of month, and *, 0-6, 0-7 and SUN-SAT in day of week, all mean any day. When only one day field is restricted, it alone picks the days. When both are, a day runs when either one matches: 0 6 1 * MON runs on the 1st of each month and on every Monday.

This differs from cronie and Vixie cron, which decide by whether a field starts with *, not by what it covers:

CronRuns hereRuns in cronie
0 6 */2 * MONodd days of the month, and every MondayMondays that fall on an odd day
0 6 1-31 * MONevery Mondayevery day

The platform checks schedules once a minute. A schedule that is due starts a run of the current revision with its input, as a call to the runs endpoint would, with trigger schedule:<name>. The run is traced and counts toward your quotas like any other.

  • One scheduled run at a time per agent. A schedule that comes due while its own previous run is still going skips that time. A schedule that comes due while another schedule of the same agent is running, or starts in the same minute, waits, and starts once the agent is free.
  • A stuck run stops blocking. A scheduled run created more than 85 minutes ago (the longest timeout, 3,600 seconds, plus the setup wait and some slack) no longer holds the agent’s schedules, so a run no container ever picked up does not stop them.
  • Missed times fire once. Times missed while the platform was down run once, on the next check, not once each. The schedule then moves to its next time to come.
  • At most once. If the platform stops between taking a due schedule and starting its run, that run is lost, and the schedule goes on from its next time.
  • A refused start is not retried. When a run cannot start (a quota is reached, for example), the schedule keeps the reason and runs again at its next time.

turion agent get NAME prints a line for each schedule with its next run in UTC, and the reason when its last start was refused:

Terminal window
turion agent get weekly-report
# …
# schedule daily 30 7 * * MON-FRI next 2026-11-17 07:30 UTC
# schedule weekly 0 6 * * 1 next 2026-11-23 06:00 UTC

GET /v1/agents/{name} answers them as schedules, each with name, cron, input, next_run_at, last_run_id, last_run_at, last_skipped_at (the last time it was skipped) and last_error (why its last start was refused). The agent’s page in the dashboard lists them on its Overview with their next runs, and labels each scheduled run on its Runs tab.

A run can propose something that waits for a person before it happens: a post, a change to an ad budget. Return it under proposals in the run’s output. A workspace owner or admin approves, edits or rejects it, in Telegram or on the agent’s page, and an approved proposal runs the same agent again to do it. notices are messages with no decision to make, sent to the same chats.

{
"output": "Drafted 1 post",
"proposals": [
{
"kind": "x.post",
"title": "Launch post",
"preview": "Launch day",
"payload": {"text": "Hello from Turion\nhttps://turion.ai/"},
"expires_in": 172800
}
],
"notices": [
{
"text": "Week 47: 3 posts drafted",
"link": "https://github.com/acme/x/issues/3"
}
]
}
  • kind is yours to name: lowercase letters, digits, _, . and -, starting with a letter or digit, at most 64 characters.
  • title is required, at most 200 characters, and kept on one line (line breaks become spaces). preview is optional: a one-line title shown above the payload, at most 3,500 characters.
  • payload is an object, at most 64 KiB as JSON, and is what the approved run gets. A text in it is at most 3,500 characters.
  • expires_in is seconds, from 60 to 7 days (604,800); the default is 48 hours. A number outside that range is moved to the nearest end of it.
  • A run gives at most 10 proposals and 10 notices. A notice’s text is at most 3,500 characters, and its optional link an https:// URL.
  • The title, the preview and payload.text cannot hold characters that change what an approver reads without showing: text-direction controls (U+202A–U+202E, U+2066–U+2069, U+200E, U+200F, U+061C) and invisible separators (U+200B, U+2060–U+2064, U+FEFF, U+180E). A zero-width joiner (U+200C, U+200D) is allowed only between two non-ASCII characters, as in 👩‍💻.
  • Only a run that succeeded is read. A proposal or notice that breaks one of these rules, or an expires_in that is not a number, is left out with the reason in the API’s log; the rest are kept.

Each approval keeps the sha256 of its payload, taken as Python’s json.dumps(payload, sort_keys=True) writes it. Approve checks it again, so a payload changed after it was proposed is never run.

What Telegram shows is what runs. The message names the agent and the title, then the kind and the time it expires in UTC, the preview as one line, and then payload.text exactly as it will be posted, followed by every other payload key as compact JSON. Telegram cuts each of those values to 300 characters, and keys that no longer fit in its 4,096-character message are only counted (”… and 3 more payload keys”). Markup in the text is shown as typed. The agent’s Approvals tab shows the same, with the whole payload as JSON and its sha256.

Only workspace owners and admins decide. Each proposal is decided once: when two admins press Approve at the same moment, one run starts and the other admin is told it was already approved.

  • Approve starts the execute run.
  • Edit replaces payload.text with your text (at most 3,500 characters) and asks again: a new approval with a new sha256, one more edit counted, and as long left to decide as the old one had. The old one becomes edited. A payload without a text cannot be edited, so it has no Edit button.
  • Reject drops it. Nothing runs.
StateMeans
pendingwaiting for a decision
approvedapproved; the execute run is going
executedthe execute run succeeded
failedthe execute run failed, could not start or was not started in time, or the payload changed
rejectedrejected; nothing ran
editedreplaced by its edited version
expirednobody decided in time

GET /v1/agents/{name}/approvals lists them, pending first, and GET /v1/agents/{name} counts the waiting ones as approvals_pending. Approving, editing and rejecting at POST /v1/agents/{name}/approvals/{id}/approve, /edit ({"text": "…"}) and /reject need a signed-in admin: an API key gets 403 approval_needs_session.

On Approve, the platform runs the agent’s current revision with this input, and trigger approval:<id>:

{
"execute": {
"approval_id": "apr_…",
"kind": "x.post",
"payload": {"text": "…"},
"decided_at": "2026-11-16T10:05:00.000Z"
}
}

decided_at is when it was approved, in UTC, so the agent can refuse work that has gone stale. Do the action and return {"url": "…"}, a link to what it made, or {"error": "…"}. The result is posted under the approval’s message in each chat (Done: <url> or Failed: <reason>) and shown on the Approvals tab.

  • Started in time, or not at all. An execute run that no runner starts within 15 minutes of the approval is canceled, and the approval fails with “No runner started it within 15 minutes, so nothing ran.” Ask the agent to propose it again.
  • Never retried. If the runner stops in the middle of an execute run, the run fails with abandoned_by_worker and is not run a second time. The action may or may not have happened, so check before you propose it again. Use approval_id as the key to deduplicate on.

execute is reserved for that run. A run input with a top-level execute key is refused with 400 invalid_input, and a schedule whose input has one fails the deploy. Check ctx["trigger"] before acting on it anyway. An agent deployed before approvals existed has no ctx["trigger"]: deploy it again.

def run(input, ctx):
if isinstance(input, dict) and "execute" in input:
if not ctx.get("trigger", "").startswith("approval:"):
return {"error": "execute is only for approved proposals"}
payload = input["execute"]["payload"]
return {"url": post_to_x(payload["text"])}
text = draft_post()
return {
"output": "Drafted 1 post",
"proposals": [
{"kind": "x.post", "title": "Launch post", "payload": {"text": text}}
],
}

Proposals and notices go to private Telegram chats that an admin turned on for approvals, never to groups. Every chat starts off. Chats are linked through the Turion Brain’s Telegram bot, on the workspace’s Brain page, so a workspace without the Brain decides on the agent’s Approvals tab, which works without it.

  1. On the Brain page, open Ask, then Ask from Telegram, press Link a chat and open the private chat link (Just you). Press Start in Telegram.
  2. On the agent’s page, open Approvals. Under Telegram, turn your chat on. Turning a chat on lets that Telegram account approve, edit and reject this workspace’s agent proposals.
  3. New proposals arrive in the chat with Approve, Edit and Reject buttons. Edit asks for the new text: reply to that message (or to the proposal) with it, and the new version arrives with its own buttons. The result of an approved run follows as a reply.

The buttons count only when pressed by the Telegram account that linked the chat, and they act as the admin who turned the chat on, while that person is still an owner or admin. Linking the chat again turns approvals off. A chat linked before approvals existed has to be linked again before it can be turned on.

Each message is sent once. If Telegram cannot be reached for a chat (the bot was blocked, for example), that chat misses it and the other chats still get it. Without a chat turned on, decide on the agent’s Approvals tab, which counts the proposals waiting.

Every model call an agent makes is a trace: the request (messages, tools, parameters), the response, the model that served it and the route (provider, self_hosted, garden), latency, tokens, and the run and step it belongs to.

Terminal window
turion agent traces support-triage
# ID WHEN MODEL ROUTE STATUS LATENCY TOKENS RUN STEP
# 0192… 2m ago agent:support-triage provider ok 0.8s 1204/96 9f3c… —
turion traces get 0192…

turion traces list --agent support-triage --run RUN filters further. See Providers & traces.

  • Model calls on a provider route are billed by the provider, on your key. They do not appear in turion usage.
  • Calls to a fine-tune are covered by that model’s replica time, like any call to a deployed model. Model-garden calls are metered per token, as in the garden.
  • Distillation is a training job, billed in GPU-seconds like turion train.
  • Agent runs are not billed for now: the container that runs your agent’s code costs nothing. A run still counts as one of your jobs and model calls in flight while it runs (quotas).
  • Only calls made through the gateway become traces. You cannot import logs from elsewhere as distillation data.
  • A run starts when something calls the runs endpoint, a schedule comes due or an admin approves one of the agent’s proposals. Schedules are UTC cron only. There are no other built-in triggers; wire queues or webhooks to the runs endpoint yourself.
  • A route’s share applies per model call, picked at random. You cannot pin some steps or tools to the fine-tune and others to the frontier model.
  • A run returns its result when it finishes. There is no stream of intermediate steps. A run is a prediction on your account, so turion prediction cancel RUN_ID stops it (turion agent run prints that command when you stop waiting).
  • Agents are Python. The runner imports a Python entry function.

To score the agent, distil it and route it to the fine-tune, see Evaluate, distil & route.