Asking an agent and following the work
Last updated October 5, 2026
On this page
You ask an agent for something in plain words. The agent picks one of its skills (a playbook for one kind of work, see Packs and skills), plans the steps, and the kernel (the core of OrchKernel that checks and runs every step) carries them out one at a time under your company's policy. Everything it did comes back to you as a run card in the conversation, and every task and run is listed on the Work page, where you can open the steps, the output and the events behind them.
Each ask creates a task (the piece of work, owned by you) and starts a run (one attempt by an agent at it, with its steps, cost and output). This page covers asking, reading what comes back, answering an agent's question, and following and replaying the work. Threads with several people are in Threads; approvals are in Inbox and approvals.
Before you start#
The examples use the demo company from the
quickstart. In an empty directory run ok demo, then
ok demo serve from the same directory, open the printed workspace address
and sign in by pasting a person's printed token. Each start of the server
prints new tokens and revokes the old ones.
Without a model key, the demo answers with a stub planner: fixed plans
for the walkthrough's asks, not a model. The Model line printed by
ok demo serve says which you have. See Without a model
for what the stub can answer. Steps that need a real model say so.
Asking an agent#
Sign in as maya (support lead).
- Click Threads. Under Talk to an agent you see the agents you work with, grouped by team, your own team first ("Support · your team": Churn-risk watcher, Knowledge-base writer, QA reviewer, Support Agent, Triage).
- Click Support Agent. The page reads New conversation with Support Agent and "Ask Support Agent anything. The reply, its plan, and every step land here." Ask agent is greyed out; hovering it says "Write a message first".
- Type
What is open?and press Ask agent (or ⌘/Ctrl+Enter). - The address changes to the new conversation. Your message shows "to Support Agent", and under it the agent's reply: a table of the four open tickets (T-1042 to T-1045), then a green Done badge and "Done: What is open?".
Clicking the same agent again later reopens your latest conversation with it. To start fresh, press New conversation at the top of the conversation. Each conversation is a private thread between you and that agent; the Support Agent is listed under Participants as a contributor.
Who you can ask:
- Only agents you work with: the agents of your teams, and agents you have delegated to (see Delegations). Alice (sales rep) sees the Sales agents; Maya sees Support's. Asking any other agent is refused: through the API, maya asking the Sales Assistant gets "You have not delegated to Sales Assistant".
- The agent acts for you and only with what you may do. As alice, the Sales
Assistant's answer to
Show my pipelinelists her four leads only; as sam (sales lead) it lists all seven. - An agent whose module an admin paused shows "paused" and cannot be clicked; hovering it says "Paused by an admin".
Asking from the command line#
ok --state orchkernel-demo/state.db --as maya ask --agent support-agent "What is open?"
The answer lands in your conversation with that agent, as in the workspace.
The command line uses a real model or an explicit plan (--plan); the stub
planner answers only inside ok demo serve, so with no key a plain ok ask
fails with "run ... failed: llm: no model provider is configured". Run the
command from the directory where you ran ok demo, and stop the demo server
first (Ctrl+C in its window): a command writes the state file when it exits.
With the plan file the demo ships, it works without a key:
ok --state orchkernel-demo/state.db --as maya ask --agent support-agent --plan orchkernel-demo/plans/tickets.json "What is open?"
It prints "run ... done" and the tickets as JSON.
Reading the run card#
| Part | What it shows |
|---|---|
| The answer | A done or stopped run's output. Text reads as a message; a list of records as a table; a record as a short list of its fields, with amounts as money. |
| State badge | Done, Failed, Stopped, or Declined when an approver said no. A declined card also reads "Rejected by Alice Chen", the time and the approver's note, then "Nothing was done." (or that what the run did before is under Details). |
| Status line | "Done: What is open?", "Failed: ... (the reason)", "Stopped at asks: ...". |
| Details | Opens the steps. The first line is "5 steps · $0.00 · Open the run". |
| Plan | Under Details, only when you supplied an explicit plan: its summary and each operation. A model's plan appears as a step instead: "plan: List the open tickets (2 ops)". |
| Open the run | Opens the run in a drawer over the conversation: who it acted for, cost, tokens, the trace and the output. |
The steps, numbered from 0:
| Step | What it means |
|---|---|
| Skill | "Used the skill Ticket support": the skill the agent chose for your ask. |
| Model | "Planned the next step · 1,049 tokens": a call to the model (or the stub). |
| Note | The plan's summary, a question it asked ("asked alice: Which ICP should I score against?"), or a plan read leniently or repaired. |
| Read data | "Read Tickets: 4 rows". |
| Write data | "Wrote a leads record (version 2)". |
| Tool | A tool call, such as "Billing account", with ok or failed. |
| Round | A loop round: "Round 1 · 2 operations · 1,453 tokens". |
| Approval / Decision | The run asked for approval; the approval was approved or rejected. |
| Answer | "Alice Chen answered" a question the run asked. |
| Refused | An operation the policy refused, with the reason. |
| Hand-off, Message | A task handed to another actor; a message posted in the thread. |
| Memory | "Kept 1 lesson": what the run remembered for next time. |
The cost of each step that cost something shows on the right. With the stub planner every run costs $0.00, though token counts still show.
The run card appears once the run ends (done, failed, stopped or rejected). While a run is running or waiting on a person there is no card in the conversation: an approval shows an approval card, a question shows the question, and the run's state is on the Work page.
Without a model: the stub planner#
The demo's stub planner is not a model and does not read your words beyond a few keywords. With no key set:
| Agent | Ask | What comes back |
|---|---|---|
| Support Agent, Triage | Anything | The open tickets as a table |
| Sales Assistant | Containing "email" or "follow" | Emails the first contacted lead, which parks for the rep's approval (quickstart) |
| Sales Assistant | Anything else | The leads you may read |
| Churn-risk watcher | Containing "refund" | Reads ticket T-1042 and the billing account, then asks to refund 250.00, which waits for an admin |
| Any other agent, or any other ask | Anything | A note: "No model is configured, so the demo's stub planner answered. ..." with how to set a key or paste an explicit plan |
"Draft a reply to T-1044" to the Support Agent therefore lists the tickets
too. To see agents plan for real, set ANTHROPIC_API_KEY (or
OPENAI_API_KEY, GEMINI_API_KEY, OLLAMA_HOST) or an llm.yaml and start
ok demo serve again; see Models.
Single and loop runs#
Each skill runs in one of two modes, set in its playbook.
| Single | Loop | |
|---|---|---|
| How it plans | Once: the whole plan, then the kernel runs it | One round at a time, at most 8 operations a round; the model sees each round's results before planning the next, until it says it is done |
| In the demo | Support Agent, Triage, Sales Assistant, Product Agent, Proposal Writer, Content Writer | Churn-risk watcher, SDR Outreach, Deal Desk, Forecast Analyst, Lead Qualifier, Chief of Staff, Feedback miner and others |
| A refused operation | Fails the run | Becomes a result the model sees, so it can try something else |
| Your ask | Answers when the run ends or parks | Answers at once that the run is running; it carries on in the background |
| Caps | The agent's budget, and 3 questions | max_steps (1 to 50 rounds), max_minutes (time spent running, not waiting), max_handoffs (at most 20), optional max_cost and max_tokens, the agent's budget, and 3 questions |
When a cap is reached the run stops with the Stopped badge, the cap's name ("Stopped at max_steps") and the last output the model chose. A run that waits for an approval or an answer releases its slot; it carries on from the same round once the person responds, even after a restart.
Following a loop run#
As maya:
- Talk to an agent, Churn-risk watcher, type
Northwind wants a refund for the double charge, Ask agent. - The conversation shows an approval card: Issue a refund or credit,
Pending, Amount $250.00, Invoice
inv-2026-09-1042, the rule ("Goodwill credits by agents over the cap of 100.00 ... need an admin") and "Waiting for an admin (Ada Park)." There is no run card yet. - Click Work. The task shows Parked. Click Details: the run's steps so far are Skill, Model, Read data (1 row), Tool (Billing account, ok), Round 1, Model, Approval.
- Once ada approves it (see Inbox and approvals),
the approval card shows Approved and "Approved by Ada Park", and the
run finishes round 2. Maya's conversation now has the run card:
"Refunded after an admin approved it.", Amount $250.00, Refund
re_3Rk0a1Lq, Done, and under Details "12 steps": the steps above, then Decision (Approval Approved), Tool (Issue a refund or credit, ok), Round 2, Model, Memory.
The demo refunds invoice inv-2026-09-1042 only once. Ask the same again
and the refund is refused ("Invoice inv-2026-09-1042 was already refunded"),
with no approval card, yet the stub's run card still says Done and
"Refunded after an admin approved it." with no refund id. Read the
Refused step under Details, not the stub's text.
When an agent asks you a question#
An agent that needs something from you before it can act (a choice, a missing detail) asks instead of guessing. The run parks until someone answers.
- The question goes to the person the run acts for (usually you), else the task's owner, else the people the agent's module acts for, else the agent's manager or team lead.
- It appears in the conversation as a message with a Question badge, "to Alice Chen", the question and its suggested options, and in that person's Inbox as "Sales Assistant asks: Which ICP should I score against?".
- The recipient, anyone the task was escalated to, and admins may answer. Anyone else is refused; a person who cannot see the run (even the recipient's team lead) gets "not found".
- An answer is free text, at most 4,096 bytes, even when options are suggested. A longer one is refused ("answer is 5000 bytes; at most 4096 are accepted"). The run carries on with it, and the step "Alice Chen answered" is added. Answering marks the inbox item read.
- A run may ask 3 questions. A fourth stops it: the card shows Stopped and "Stopped at asks: ...".
You cannot answer in the workspace yet. The question in the conversation has no reply box, and the inbox item does not open anything. Asking again in the conversation does not answer it either: it starts a new run and the first stays parked. Use the command line or the API:
ok --state orchkernel-demo/state.db --as alice answer <run-id> "Enterprise"
When a run parks on a question, ok ask prints "run ... is waiting on
question ... Answer with: ok --as answer """; add
--state orchkernel-demo/state.db as above. The run id is also shown under
the question in the conversation (the line Run).
Try it#
The stub planner never asks a question, so in the demo you make the agent ask with an explicit plan (see For developers). As alice:
-
Open
/threads/new?agent=sales-assistant&dev=1in the workspace. An Explicit plan button appears next to the agent selector. -
Type
Score my new leads, press Explicit plan, and paste:{"summary": "Ask which ICP, then answer", "ops": [ {"op": "ask", "question": "Which ICP should I score against?", "options": ["SMB", "Enterprise"], "bind": "icp"}, {"op": "output", "value": {"answer": "Scoring against {{icp}}"}}]} -
Press Ask agent. The conversation shows the Sales Assistant's message with a Question badge, "to Alice Chen", the question, Options "SMB, Enterprise", and the Question and Run ids. The Inbox count in the sidebar goes up by one, and the task shows Parked under Tasks beside the conversation and on the Work page.
-
Answer through the API with the server running:
curl -X POST http://127.0.0.1:8080/api/runs/<run-id>/answer \ -H "Authorization: Bearer <alice's token>" \ -H "content-type: application/json" -d '{"answer": "Enterprise"}'http://127.0.0.1:8080is the default; use the Workspace addressok demo serveprinted. Or stop the server, answer withok answeras above, and start it again (sign in again with the new tokens). Sam, alice's team lead, gets "not found" for the same call; ada (admin) may answer, and the step then reads "Ada Park answered". -
The conversation gets the run card "Scoring against Enterprise", Done. Its Details show your plan, then the steps Skill, Note (the plan), Note (asked alice), Answer ("Alice Chen answered"), Memory. The answer's text itself is not shown in the conversation, only in the output it led to.
The Work page#
Work lists your tasks and runs, newest first, a page at a time (Load more under the list fetches the next). An admin sees everyone's. A task is created for every ask, so each conversation's asks are listed here too.
Tasks#
The tab reads "Open tasks (1) · 4 done" (your own counts). Three filters:
| Filter | Shows |
|---|---|
| Open | Tasks not done, failed or cancelled. Empty: "No open tasks. 4 done: see All." |
| Mine | Tasks you own or that are assigned to you |
| All | Every task you can see |
Each task card shows its title, state (Assigned, Running, Parked, Done, Failed, Cancelled), who it is assigned to, when it was made, and its owner. Its buttons:
| Button | Shown when | What it does |
|---|---|---|
| Details | Always | Opens the task drawer (below). |
| Run now | The task is assigned to an agent and is open, assigned or escalated | Starts a run at once. A toast gives the outcome, such as "Run done". |
| Mark done | You own the task or it is assigned to you, it is not finished, and it is not assigned to an agent | Marks it done. The toast says "Done". |
| Reassign | You own the task, or you are an admin | Opens Reassign task: pick any agent or person other than the current assignee. "Reassigned to Maya Patel". |
The task drawer (Details) shows the task card, then:
- Plan: an explicit plan given with the task, operation by operation;
or Inputs when the task has other inputs (a task made by an ask
shows
{}). - Outputs: the result of the last run.
- Runs: every run of the task with its state, agent, cost, time and steps.
- Events: the task's events from the log, such as
task_created,run_started,policy_evaluated,tool_called,approval_requested,run_parked.
New task#
- Press New task.
- Give it a Title ("Call Northwind about the refund") and pick Assign to: Nobody yet, an agent ("Support Agent (agent)") or a person.
- Press Create task. The toast says "Task created for Tom Becker", and about a second later the task is in the list, Assigned, with Details, Mark done and Reassign.
A task assigned to a person waits for them; they see it on their Work page and mark it done. A task assigned to an agent starts by itself on the next clock tick (within half a minute in the demo) and acts for you; Run now starts it at once. Its result is on the task and in its Details, not in a conversation. Assign tasks only to agents you work with (those under Talk to an agent).
Runs#
The Runs tab is a table: State, Agent, Task, Steps, Cost, Tokens, Started. On a phone the table scrolls sideways. Click a row to open the run drawer:
- the agent, who it acted for ("Churn-risk watcher acting for Maya Patel"), cost, tokens and start time, and the reason if it failed;
- Trace: the steps, as in the run card;
- Output;
- for admins, Replay (raw events): the run rebuilt from the event log,
one line per event (
run_started,policy_evaluated,llm_called,tool_called,approval_requested,run_parked, ...).
From the command line#
Stop the demo server first, then name the state file and a person. These
commands read the whole state file: they list every task and run, whoever
--as names.
| Command | What it does |
|---|---|
ok ask --agent <id> "<text>" |
Asks an agent in your latest conversation with it, as in the workspace. --plan <file or JSON> runs an explicit plan. Prints the run's state and output, or how to answer its question. |
ok tasks |
One line per task: id, state, priority, title, assignee. --archived lists finished tasks archived out of memory. |
ok runs |
One line per run: id, state, agent, steps, cost. --archived as above. |
ok replay --run <id> |
The run's events from the log. --task <id> and --thread <id> replay a task or a thread; with none, the whole log. |
ok answer <run> "<text>" |
Answers the question the run waits on, as --as. |
ok tick |
Advances the clock once: due triggers, SLA escalations, stalled threads, expired knowledge, and runs of tasks waiting for an agent. Prints fired=0 escalated=0 stalled=0 expired_knowledge=0 ran=0. --now <time> ticks as if at that time. The server ticks by itself every 30 seconds. |
ok --state orchkernel-demo/state.db --as maya tasks
ok --state orchkernel-demo/state.db --as ada replay --run <run-id>
ok tasks and ok runs list in id order, not newest first as their help
says.
Not possible yet#
- Answering an agent's question in the workspace (see above).
- Seeing a run card while a run is running or waiting on a question.
- Cancelling a running or parked run from the workspace.
- An explicit plan for an agent in loop mode: it is ignored (see below).
- Replay in the workspace for anyone but an admin.
For developers#
Explicit plans#
In developer mode you can give the exact plan instead of letting the model
write it. Add ?dev=1 to a conversation's or thread's address (the Threads
list itself does not switch it on); the setting stays in that browser until
you open a conversation or thread with ?dev=0. Signing in with ok demo serve --dev-auth
also shows it.
- The Explicit plan button opens a second box for the JSON plan, used with the next Ask agent.
- An explicit plan is held to your own rights: a plan that reads or writes a collection you may not is refused ("You cannot read leads, so you cannot ask an agent to").
- Text that is not JSON is refused before sending, with the browser's error
(for
{: "SyntaxError: Expected property name or '}' in JSON at position 1 ..."); an unknown operation fails the run ("plan invalid: unknown variantfrobnicate, expected one of ..."). - The demo directory has three ready plans in
orchkernel-demo/plans/:follow-up.json,leads.json,tickets.json. - An agent whose skill runs in loop mode (the Churn-risk watcher, for example) ignores the explicit plan and plans with the model, or the stub, while its run card still shows your plan under Plan. Use a single-mode agent.
A plan is {"summary": "...", "ops": [...]}. Values an operation produces
are kept under its bind name and used later as $name, $name.0.id,
$name.length or {{name.path}} inside text; $me, $today and $now
are always there. The operations (fields in plans.md):
| Operation | What it does |
|---|---|
query |
Read the records of a collection you may see, filtered and ordered |
aggregate |
Count, sum, average, min or max over records, grouped |
search |
Keyword search over records and knowledge you may read |
upsert |
Create or update a record, as a new version |
rollback |
Restore an earlier version of a record |
tool |
Call a tool; external effects may need approval |
llm |
A governed model call |
post |
A message in the run's thread |
artifact |
Create or version a thread artifact |
decide |
Log a decision (thread approvers only) |
task |
Hand a task to another actor |
delegate |
Give another actor a narrower delegation |
find |
Find skills or people in the directory |
remember, recall |
Propose knowledge; read knowledge you may see |
ask |
Ask a person and park until they answer |
traces |
Read summaries of past runs, decisions and approvals (skills allowed to) |
propose_playbook |
Propose a change to the skill's playbook (last operation only) |
output |
The run's result |
API#
All under /api, with Authorization: Bearer <token>.
| Method and path | Body | Notes |
|---|---|---|
GET /me/agents |
The agents you may ask, your teams first. | |
POST /ask |
{ agent, text, plan?, new_thread? } |
Asks in your conversation with the agent; new_thread: true starts a new one. 200 with the outcome (done, parked, asked, stopped, failed) and the run, task and thread; 202 running for a loop. 403 denied when you may not ask the agent. |
GET /tasks, GET /tasks/:id |
Tasks you may see, paged; one task with its runs and events. | |
POST /tasks |
{ title, assign_to?, inputs?, description?, priority?, thread? } |
You are the owner. |
POST /tasks/:id/assign |
{ to } |
Reassign. |
POST /tasks/:id/run |
{ agent? } |
Run now. |
POST /tasks/:id/complete |
Mark done. | |
GET /runs, GET /runs/:id |
Runs you may see, paged with x-next-cursor; one run with its events and replay transcript. |
|
POST /runs/:id/answer |
{ answer } |
409 not_waiting when the run is not waiting on a question; 409 module_paused; 422 for an answer over 4,096 bytes; 404 for a run you cannot see. |
The run events (run_started, run_parked, run_finished,
question_asked, question_answered and others) are on the Events page
under Runs; see Events and the audit log.