Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/agents-v1-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Factorize Agents v1

A user or authorized MCP client can launch, inspect and cancel an unattended, permission-scoped run. Each launch creates one MCP Task. Each checklist item remains open until its evidence is recorded.

- [ ] Launch the same service from REST, MCP, the Run Agent button and scheduled or other Events. Retry one occurrence and observe one run. Verify team-managed roles and immutable skill version pins alongside the fixed prompt, OpenAI connection and model.
- [ ] Interrupt PiHarness execution in a Durable Object. Observe recovery without repeating a completed write and an explicit uncertain outcome for an in-flight ambiguous write. Verify cancellation prevents further dispatch and runtime, token, concurrency and child limits hold.
- [ ] At dispatch, intersect current tenant, tool, operation and connection grants with the launch ceiling. Test revocation, later additions, cross-tenant visibility, child-role assignment and separate cancellation authority. Exclude shell and arbitrary network operations.
- [ ] Exercise negotiated native MCP Task start, get, cancel and terminal result after reconnect. Compare authorized list/detail output across REST, MCP and UI, including prompt, versions, messages, tool summaries and outcome. Exclude private reasoning.
- [ ] Verify encrypted server-only OpenAI credentials, opt-in Arize export, run/model/tool durations, errors, usage and cost provenance. Inspect redacted bounded previews and truncation markers. Fail export and verify the run completes without replay.
- [ ] In an isolated Worker, trace a scheduled harmless fixture action through UI, REST, MCP and a test Arize destination. Record interruption, cancellation, revocation, isolation and reconnect evidence. Run repository validation on Fly.io and confirm final machine state. Record missing live checks in the PR.

## Verification log

- Four targeted Vitest tests passed locally. Three exercised grant intersection and child-role containment. The fourth terminated a Node process after a second fixture write but before its receipt. A fresh process reopened the same Pi Durable SQLite database, retrieved the original submission, retained the first receipt and found an interrupted diagnostic for the second write. The effect log contained each entry once.
- Product entry points, Durable Object eviction, live authorization, external telemetry, Fly validation and the isolated deployed Worker remain unverified.

## Integration references

- [Cloudflare PiHarness](https://developers.cloudflare.com/agents/harnesses/pi/) provides the lifecycle and SQLite storage. Its submission operation ID must survive retries.
- [MCP Tasks](https://modelcontextprotocol.io/extensions/tasks/overview) uses per-request extension capabilities, server discovery and a terminal result on tasks/get.
- [OpenInference attributes](https://arize-ai.github.io/openinference/spec/semantic_conventions.html) define AGENT, LLM and TOOL spans and prompt/completion token fields.

- Seven targeted tests now pass across four files. The additional tests rebuilt an Agents SDK skill source from serialized bytes with a retired catalog URI, rejected altered bytes, observed one local OTLP POST after a partial-success response, and contained a transport exception. Product storage and exporter wiring are still open.
- Use the authenticated Worker route with the official v2 requester to verify per-request opt-in, Mcp-Name task routing and terminal inline results after reconnect. [July 2026 Tasks specification](https://tasks.extensions.modelcontextprotocol.io/specification/2026-07-28/tasks)
- Configure model prices before checking cost at the test destination. Record measured preview sizes and ingestion results separately from service-wide limits. [Arize AX OpenTelemetry setup](https://arize.com/docs/ax/observe/tracing-integrations-auto/opentelemetry-integrations-for-arize/opentelemetry-arize-otel)
Loading