Skip to content

Build mock-vendor example (L1 HTTP service emitting events) #2

Description

@Faux16

Context

The examples README lists this as coming:

mock-vendor/ — Minimal HTTP service emitting AGP events to a configurable plane endpoint (L1)

This is the missing visual proof that AGP is "a real protocol over the wire," not just a library. The Acme walkthrough demonstrates the crypto end-to-end in-process; mock-vendor demonstrates it over HTTP.

Goal

A self-contained example under examples/mock-vendor/ that:

  1. Runs as a FastAPI HTTP service.
  2. On startup, generates a keypair and prints the public key + a registry-entry skeleton.
  3. Has a small set of demo "actions" the operator can trigger via curl (e.g., POST /demo/tool-call).
  4. For each action, emits a signed AGP event to the plane endpoint (AGP_PLANE_URL env var).
  5. Logs the signed event JSON for inspection.

Acceptance

  • make demo from examples/mock-vendor/ boots the service on a known port, points it at a dummy plane URL, and the operator can curl a demo action to produce a signed event in the logs.
  • agp-cts validate-vendor --endpoint http://localhost:PORT (once that command lands — tracked in cts) returns "conformant L1".
  • Smoke test in tests/ boots the service, posts a demo action, asserts the event hits the plane mock.
  • README states clearly: L1 only, no policy / no Flow C.

Scope

  • Built on the Python SDK HTTP scaffold (related issue).
  • Single file main.py ideal; resist over-structuring.
  • Docker optional; not required for the demo.

Why this is a good first issue

Constrained surface, lots of supporting infrastructure already in place (SDK does the crypto; spec defines the wire format), and an immediate visual demo when finished.


🚀 Start here

What: a minimal HTTP service that emits signed AGP events to a configurable plane URL (L1). Mirror the structure of acme-walkthrough but over HTTP.

Files: examples/mock-vendor/README.md, a Makefile with a demo target, and the service (Python + the openagp SDK; FastAPI is fine).

How to build it:

from openagp.events import sign            # pip install openagp
# build event dict -> sign(event, private_key_b64=..., key_id=...) -> POST to $PLANE_URL/agp/v0/events

Acceptance criteria:

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood entry point for a new contributorstatus:needs-triageNewly opened, not yet assessed by a maintainertype:featureAdditive change — new functionality

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions