Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 2 min read How-to mediumAdept

Deterministic AI Testing with Session Recording in cagent

cagent's session recording applies the VCR pattern to AI agents. It proxies requests to the model provider, saves each request/response cycle to a YAML cassette, and replays matching requests from that file, so test runs are deterministic, cost nothing in API calls and finish in milliseconds. The --record and --fake flags support CI testing without API keys, cheap prompt iteration against one recording, sharing reproducible bug reports, and capturing multi-agent delegation. Tool call IDs are normalized so replay matching works, and auth headers are stripped so cassettes can be committed to version control.

Assumes: AI agent basicsHTTP mocking

Related posts

  • Build a Multi-Agent System in 5 Minutes with cagent

    Docker mediumAdept

    cagent is an open-source Docker tool that defines multi-agent AI systems declaratively in a single YAML file. Each agent's model (OpenAI, Anthropic, Gemini or local via Docker Model Runner), instructions, MCP toolsets and sub-agents are specified there, and the runtime handles delegation and context passing. A three-agent example (coordinator, researcher with DuckDuckGo MCP, writer) runs with `cagent run` and can be pushed to Docker Hub so teammates run the identical setup. Example use cases include PR triage, research summarization and knowledge routing with PII redaction.

  • Agents are users, so your software needs evals

    Vercel mediumAdept

    Agents act as users of APIs, CLIs, MCP servers and SDKs, so measuring whether they complete tasks correctly requires evals: tests run many times and scored. An agentic testing pyramid groups checks by LLM call count (deterministic tests, one-turn evals, E2E evals), and a worked example builds an end-to-end eval for a hypothetical coffee-ordering CLI using Harbor, covering goal setting, task design with seeded environments, frozen clocks and per-constraint verifiers, and guarding against reward hacking. Metric choice should follow failure cost: a 60% success rate yields 99% pass@5 but only 8% pass^5, so products where users get no retry should optimize for pass^k, while coding agents with test feedback can lead with pass@k.

  • Agentic Testing: Where Agents Fit in the E2E Testing Stack

    Slack Engineering mediumAdept

    Across 200+ agent-driven E2E runs against Slack test workspaces, agents using Playwright MCP were the most reliable (0% failures on a simple thread-reply flow, ~12% on a longer search flow). Playwright CLI agents failed 12–20%, mostly from auth, navigation timing and session instability. Agent-generated Playwright tests ran fastest (~3 min including generation, ~30–45 s raw) but failed ~48% on the complex flow. Agent runs cost $15–30 each, driven by turn count and retransmitted context such as accessibility-tree snapshots rather than model choice; CLI took ~85 turns versus MCP's ~40. The recommendation is to keep deterministic tests for CI and add agentic testing as a top pyramid layer for exploration, debugging and bug reproduction.

  • Scaling Managed Agents with stable interfaces

    Anthropic Engineering mediumAdept

    Claude Managed Agents splits a long-running agent into three virtualized interfaces: an append-only session log, a stateless harness that calls Claude and routes tool calls, and sandboxes reached through a generic `execute(name, input) → string` tool call. Moving off a single coupled container turned sandboxes and harnesses into replaceable cattle. A crashed harness resumes from the durable log via `wake(sessionId)`, and credentials sit in vaults or MCP proxies the sandbox can't reach, which blocks prompt-injection token theft. The session also serves as a queryable context store outside Claude's context window. Provisioning containers lazily, only when a tool needs one, cut p50 time-to-first-token by about 60% and p95 by over 90%.

  • From model to agent: Equipping the Responses API with a computer environment

    OpenAI mediumAdept

    OpenAI's Responses API now pairs with a shell tool and hosted container workspace so models can run multi-step agent workflows. The API orchestrates the loop itself: it streams command output back to the model, runs multiple commands concurrently in separate sessions, and truncates large outputs while keeping their beginning and end. Native compaction carries long-running sessions across context-window limits. The containers stage files and SQLite databases instead of stuffing prompts, route network egress through a sidecar proxy with allowlists and domain-scoped secret injection, and load versioned 'skills' bundles (SKILL.md plus resources) that the model explores via shell commands.

The quest for software engineering knowledge.

Look:
Layout: