Problem
POST /v1/agents/run returns the execution transcript in the response body but never persists it. Once the response is gone, the transcript is unrecoverable:
run_agent_handler (src/app/endpoints/agents.py) builds the result dict and returns it — no TranscriptStore save, no filesystem write, no DB row.
- The workflow path (
step_runner) saves every step transcript to PostgreSQL (step_transcripts, keyed by (workflow_id, step_name)), readable later via GET /v1/workflows/{workflow_id}/transcripts.
- The query path persists transcripts as filesystem JSON per conversation (
store_transcript in src/utils/transcripts.py).
So transcripts have three different fates depending on entrypoint: PG (workflows), files (query), nowhere (agents/run).
Why it matters
- Demos and audits of single-shot agent runs (e.g. the
agent-ephemeral Landlock demo) have no server-side record to revisit.
- Consumers must implement their own capture (tee the response) — easy to forget, and inconsistent with the workflow experience.
Design question
There is no natural storage key: step_transcripts is keyed by (workflow_id, step_name) and an ad-hoc agent run has neither. Options:
- PostgreSQL, new table (e.g.
agent_run_transcripts keyed by a generated run id returned in the response) — queryable, consistent with workflows; needs schema + fetch API.
- Filesystem, mirroring the query-transcript store — cheaper, but a third transcript location with no read API.
- By design, won't fix — single-shot runs are the caller's to keep; document that the transcript is response-only.
Acceptance
Problem
POST /v1/agents/runreturns the executiontranscriptin the response body but never persists it. Once the response is gone, the transcript is unrecoverable:run_agent_handler(src/app/endpoints/agents.py) builds the result dict and returns it — noTranscriptStoresave, no filesystem write, no DB row.step_runner) saves every step transcript to PostgreSQL (step_transcripts, keyed by(workflow_id, step_name)), readable later viaGET /v1/workflows/{workflow_id}/transcripts.store_transcriptinsrc/utils/transcripts.py).So transcripts have three different fates depending on entrypoint: PG (workflows), files (query), nowhere (agents/run).
Why it matters
agent-ephemeralLandlock demo) have no server-side record to revisit.Design question
There is no natural storage key:
step_transcriptsis keyed by(workflow_id, step_name)and an ad-hoc agent run has neither. Options:agent_run_transcriptskeyed by a generated run id returned in the response) — queryable, consistent with workflows; needs schema + fetch API.Acceptance
docs/cloud-agents-demo-curl.sh— e.g. tee the response to a file).