Skip to Content
PlatformTutorialsAsk the agent

Ask the agent

In this tutorial we run the local platform from Get started, open the console inside program trv-101, ask one evidence question and accept what the agent proposes. It takes about fifteen minutes on top of the first tutorial. At the end we have a private thread, a plan we approved, a streamed comparison with numbered citations, two findings with origin = agent that we accepted, and audit rows that name the agent, the run, the interrupt and the person who approved.

The console is designed. Locally the agent runtime is a fake: its streamed text, its single citation and its one knowledge.search_europe_pmc call (which returns no results) are canned, and every source, finding and citation you see is labelled “Illustrative”; no literature source is read. The exchange, the gates and the records are the designed behaviour; the science is not.

What you will build

A thread in the console with one question, one approved plan, one agent turn streamed into the conversation, a finding_set artifact on the canvas, and two accepted findings under Evidence › Findings that link back to the thread.

Step 1: Start the platform and the worker

Follow Get started through step 4, then start the worker in a second shell:

cd api make worker # two lanes: interactive (console turns) and background (jobs)

The migration is 0002 now (50 tables); make db-up starts the local database with the role split, and make dsn-check confirms the application role cannot update, delete or truncate audit or signature rows.

Step 2: Open the console

In the rail choose Console (/p/trv-101/console); it appears because the program_owner persona holds program.threads.read_own and program.threads.read. Choose New thread. The composer shows “Private to you. Quality reviewers and program leads can read this thread for review.” and the run mode selector reads “Run with automatic reads and gated writes” (the default; PATCH /me/settings remembers a change).

Step 3: Ask the question

Type:

What is known about liver findings for compounds hitting TARGET-X in rodents? Prefer primary sources from the last five years.

Press Enter. The message is echoed at once, the thread shows the working indicator (the state event is written in the same transaction as your message), and the worker’s interactive lane claims the console_turn run.

Step 4: Approve the plan

A plan card arrives first: search the literature sources, fetch open-access full text where the licence allows, compare against the findings already on the question, propose findings and gaps, and “no record writes until approved”. Press Enter (Approve). Reads now run without further gates; the run rail lists each knowledge.search_* call with its budget and then “N documents fetched into the program corpus” (with the fake runtime: one knowledge.search_europe_pmc call that returns no results and fetches nothing).

Step 5: Follow the streamed answer

Text streams into the conversation in sentence chunks with markers [1] to [n]. The header above the answer reads “All N claims carry a citation” (or “1 claim without a citation”): a count of claim-shaped sentences without a marker, not a judgement that the source supports the claim. Click a marker: the source viewer on the canvas shows the title, provenance, licence code, retrieved_at, the cited span and “Open at publisher”.

Step 6: Accept two findings

The canvas shows a finding_set: observations with chunk_refs and one suggestion (a gap). With focus on the first item press a; repeat for the second. Each acceptance is an approval card for a write: it names the record, its citations, the consequence and the permission exercised (evidence.findings.manage). Press Enter. Decline the gap with Esc and a short reason; the reason is stored as evaluation data.

Step 7: Read the records

  • Evidence › Findings: two new findings with the label “Agent-generated, for review”, origin = agent, agent_run_id set, and the link “From thread T-1” (a colleague without rights on your thread would read “From a private thread”).
  • Setup › Agent runs: the console_turn run with mode = interactive, its agent version, plan_hash, the tool calls (approved, approved_by you, permission_exercised = evidence.findings.manage, proposal_hash), the interrupts and the snapshot with model_check.outcome.
  • Setup › Audit: rows finding.create with actor_kind = agent, actor_agent_id = agent:evidence@<org id>, approved_by_user_id you, interrupt_id, proposal_hash, approved_hash, entry_seq and row_hash set by the database; document.ingest rows with actor_kind = system.

What you have done

You started a private thread, approved a plan before anything ran, watched reads stream with citations, accepted two proposals with your own permission and declined one with a reason. The agent wrote nothing on its own: every record carries the run, the agent version, the model configuration record and your decision.

Next steps