Skip to main content

placeboagent

A fake AG-UI agent backend for testing. Scriptable, deterministic, offline.

Status: pre-release. 0.1.0 is in active development. The full roadmap lives in docs/PLAN.md.

Part of the placebo family of test doubles: placebopay (fake payment gateway) · placeborag (fake RAG stack) · placeboagent (fake agent backend).

Why

If you build AG-UI frontends, clients, or emitters, your test target today is a real agent backend: slow, nondeterministic, token-metered, and incapable of producing the failures that actually break UIs in production. Dropped SSE connections mid-message. Malformed events. Lifecycle events out of order. A tool call that never finishes.

placeboagent speaks the AG-UI protocol with no LLM behind it. Same scenario, same byte stream, every time. All event types come from the official ag-ui-protocol package, so conformance tracks the spec.

Planned for 0.1.0

  • Scriptable fake agent. An ASGI app exposing one AG-UI SSE endpoint. Define a run as an ordered script of events with timing control: instant, fixed delay, or realistic token pacing.
  • Canned scenarios. Plain text reply, streamed tool call, state snapshot + deltas, human-in-the-loop interrupt, run error.
  • Record & replay. Capture the event stream of a real AG-UI backend to JSONL, then serve it back verbatim or at adjusted speed. Recorded sessions become fixtures you commit and replay in CI.
  • Failure injection. Drop the connection after event N, stall mid-stream, emit malformed or unknown events, violate lifecycle ordering, duplicate events.
  • pytest plugin. A placebo_agent fixture plus assertion helpers (assert_valid_run) for testing your own AG-UI emitters.

Runs standalone (placeboagent serve) for frontend developers who never touch Python, or mounts into any FastAPI/Starlette app.

Target API preview

Subject to change until 0.1.0 ships. This is the design being built, not a released interface.

from placeboagent import PlaceboAgent, scenarios

agent = PlaceboAgent(scenario=scenarios.streamed_tool_call())
app.mount("/agent", agent)   # any FastAPI/Starlette app
placeboagent serve --scenario text-reply --port 8199

Non-goals

No LLM calls, ever (that is the point). No hosted service, no UI, no per-framework integrations: the protocol is the interface.

License

MIT

Metadata

Release files for placeboagent 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for placeboagent 0.0.1
File Size Uploaded
placeboagent-0.0.1.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for placeboagent 0.0.1
File Interpreter ABI Platform
placeboagent-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / placeboagent-0.0.1.tar.gz

Download URL placeboagent-0.0.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bdaaccc7346200d7d7b0425e78f17b925dadcbf2987cb0fd42dfc5f04a9f2156
BLAKE2b-256 checksum
How to use checksums
1cdb31c611c5098ecf767484495d71fc89ae2d226412c617c4197cb2af98555b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / placeboagent-0.0.1-py3-none-any.whl

Download URL placeboagent-0.0.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
173e294c26f9046a20248c4cd1b1ff208da97522f6ff5524bb7219990c18e553
BLAKE2b-256 checksum
How to use checksums
28b8241e2cd97753135d29a07d6e013ee98af593c3988efa58daf1179b6da628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page