agentic-platform-standin
A small FastAPI imitation of the platform's /open/v1 API: me, chat completions, models and model aliases,
knowledge bases, ontologies, image-classification training, datasets, toolchains and their tasks, A2A agents
(card and JSON-RPC with SSE) and the OpenAPI document. Every operation of the platform's OpenAPI contract is served under
the platform's operationId, except createA2ATaskFlat (retired); tests in the source repository keep it so. Apps develop against it, and the SDK's conformance runner tests
against it. It is not the platform: it checks tokens the way the platform does (RS256 via JWKS, iss, aud, azp)
but keeps its own SQLite (or Postgres) state.
The platform backend never imports it.
Install and test
From PyPI: pip install agentic-platform-standin (add [embedder] for the bge embedder, [pdf] to index PDF files), then
python -m agentic_platform_standin. From a checkout:
python3.11 -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/pytest -q # deselects the torch tests by default
Extras:
[embedder]:sentence-transformers(pulls in torch), for the BAAI/bge embedder. Without it, setSTANDIN_EMBEDDER=hash.[pdf]: PyMuPDF, to index PDF files in a knowledge base. PyMuPDF is AGPL-3.0 (or a commercial licence from its vendor), so it is not a hard dependency of this Apache-2.0 package. Without it a PDF upload endsfailed(knowledge_base.index_failed) and the log names the extra.[vision-torch]:torchandtorchvision, for image-classification training. Run those tests withpytest -m torch.
Run
STANDIN_ISSUER=... STANDIN_JWKS_URL=... STANDIN_EMBEDDER=hash .venv/bin/python -m agentic_platform_standin
Serves on STANDIN_HOST:STANDIN_PORT (default 0.0.0.0:8013).
| Variable | Default | |
|---|---|---|
STANDIN_ISSUER, STANDIN_JWKS_URL |
required | token issuer and its JWKS |
STANDIN_AUDIENCE |
agentic-platform |
aud |
STANDIN_APP_CLIENT |
example-app |
comma-separated allowed azp values; the first is the owner_app of what is created |
STANDIN_MEMBERS |
alice@example.test:admin,bob@example.test:member |
email:role pairs |
STANDIN_WORKSPACE_ID, STANDIN_WORKSPACE_NAME |
a fixed UUID (DEFAULT_WORKSPACE_ID in agentic_platform_standin/settings.py), Example workspace |
the one workspace; the platform's ids are UUIDs (OpenMe.workspace_id) |
STANDIN_DATABASE_URL |
sqlite:///./var/standin.db |
|
STANDIN_OLLAMA_URL, STANDIN_DEFAULT_MODEL, STANDIN_ALIASES |
see agentic_platform_standin/settings.py |
chat backend and model aliases |
STANDIN_EMBEDDER |
bge |
hash for a dependency-free embedder |
STANDIN_VISION_DIR |
./var/vision |
datasets and trained models |
STANDIN_VISION_TRAINER |
scripted |
scripted or torch, see "Training" |
STANDIN_VISION_SCRIPTED_S |
0 |
seconds a scripted job takes |
STANDIN_API_KEYS |
empty | agk_...=email[@app][!dpop] pairs, comma-separated, see "API keys and DPoP" |
STANDIN_DPOP_NONCE |
off | 1: a proof without a server nonce is challenged once |
STANDIN_DPOP_REQUIRED |
off | 1: an unbound key is refused (gateway.dpop_binding_required) |
STANDIN_PUBLIC_URL |
empty | the origin a DPoP htu and an A2A card URL use (default: the request's own) |
STANDIN_CONTROL |
off | 1: serve the /_standin/ control API and record requests |
STANDIN_OPENAPI_PATH |
the packaged agentic_platform_standin/openapi.json |
the file GET /open/v1/openapi.json serves; the package carries a copy of the platform's OpenAPI contract |
STANDIN_HOST |
0.0.0.0 |
the interface python -m agentic_platform_standin binds; the image and compose need every interface. run_standin() sets 127.0.0.1 (its env can override it) |
STANDIN_PORT |
8013 |
The full list is in agentic_platform_standin/settings.py.
Owner app
The owner app of what a caller creates is the token's azp, or an API key's app. Another app can read an
ontology or a knowledge base, and gets 403 ontology.owned_by_other_app / knowledge_base.owned_by_other_app when
it writes to it.
API keys and DPoP
STANDIN_API_KEYS="agk_x=alice@example.test,agk_y=bob@example.test@other-app!dpop". The email must be a member
(STANDIN_MEMBERS). An optional second @app segment is the key's app (default: the first STANDIN_APP_CLIENT);
a !dpop suffix binds the key to a DPoP proof key, set by the first proof it sends. Authorization: Bearer agk_...
and DPoP agk_... are both accepted, next to the JWT path. /me for a key answers client_id set, user null,
workspaces empty.
A proof is checked as the platform checks it: typ, ES256, the signature by the header jwk, htm / htu, iat
within 60 s, a jti not seen in 5 minutes, ath of the key. Every refusal is 401: gateway.dpop_proof_required,
gateway.dpop_proof_invalid, gateway.dpop_binding_required, gateway.dpop_nonce_required (with a DPoP-Nonce
header, and on every 401 in nonce mode).
Datasets, toolchains, A2A
All three live in memory and start empty: seed them with the control API. The stand-in runs nothing.
- A seeded toolchain has a
behavior:succeed(default, the task isqueuedwhen filed andcompletedfrom its first read on),fail(endsfailedwithtoolchain_task.shard_failed; a retry completes) orhold(runninguntil cancelled). Acallback_urlis validated (https) and echoed, never delivered. - The A2A agent (seed
{"kind": "agent", "name": "agent-echo"}) echoes the text it is sent. JSON-RPC is the 1.0 wire only: a missing, empty or 0.3A2A-Versionanswers -32601 to the 1.0 method names, as the platform does, but the 0.3 wire itself is not imitated; the card route serves the 1.0 card for every supported version. Not imitated: push notifications, history, tenants, task continuation (taskIdis -32004). With the chat-events extension the scripted run streams its answer asanswerchunks (the first replaces, the next append, an empty closing chunk is logged) and ends with the derivedresponseartifact and terminal status. A task sent withreturnImmediatelystays working until its firstGetTask(completes) or aCancelTask.
Training
scripted (default) completes a job after STANDIN_VISION_SCRIPTED_S seconds with a fixed tiny ONNX model (a
per-channel mean and a fixed linear map, built with onnx at run time) and perfect scripted metrics. It needs no
torch and no weights. torch trains for real, as before (the image has torch; tests that fake runner._train use it).
Control API
Only with STANDIN_CONTROL=1, and never under /open/. Without the flag the routes do not exist (404).
| Call | |
|---|---|
POST /_standin/reset |
every row, in-memory object, stub and recorded request is dropped |
POST /_standin/seed {"kind", "name", ...} |
returns {"id"} |
POST /_standin/stubs {"match": {"operation"}, "times", "response": {"status", "headers", "body"}} |
answers that operation instead of handling it |
POST /_standin/redirect {"operation", "times"} |
answers that operation with a 302 |
GET /_standin/requests?since=<seq> |
{seq, operation, method, path, headers, body} of each /open/ request |
Seed kinds: knowledge_base, ontology (name, description?, owner_app?); dataset (name, format?,
num_samples?, size_bytes?, tags?, description?; answers {"id", "version_id"}, the version is what a
toolchain task takes as input); toolchain (name, id?, behavior?, params_schema?, version?, category?,
scenario?, applies_to?, shardable?); agent (name?, description?, published?).
Stubs match by operationId. The stubs of one operation are consumed in the order they were registered, each
times times, then normal handling resumes. A stub answers before authentication. A string body is sent as text
(text/plain unless headers gives a content type), anything else as JSON, no body as an empty one.
Recorded requests have lower-case header names; the authorization and dpop values are "<present>". body is
the parsed JSON body of a JSON request; a multipart or other body is recorded as null. Each record also has query.
Image
docker build -t agentic-platform-standin:dev .
(run from a source checkout of this package). Installs CPU torch from the PyTorch index, then the package with [embedder,pdf] (which carries the OpenAPI
snapshot), and bakes the bge model and the ImageNet weights, so the container needs no network at runtime. Build args: PIP_INDEX_URL, PIP_TRUSTED_HOST, TORCH_INDEX_URL, HF_ENDPOINT.
Metadata
Release files for agentic-platform-standin 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentic_platform_standin-0.1.0.tar.gz | 75.1 kB | Without provenance | Details for agentic_platform_standin-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentic_platform_standin-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentic_platform_standin-0.1.0-py3-none-any.whl |
Total release size: 166.0 kB
Release files / agentic_platform_standin-0.1.0.tar.gz
| Download URL | agentic_platform_standin-0.1.0.tar.gz |
|---|---|
| Size | 75.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a706554a0c9a0b5675f73fc868e091c77238cf0521eb61a6e062be0d6e25fb6
|
|
BLAKE2b-256 checksum How to use checksums |
9e4134ef82e5c8dc519d296d1bc8bcfa21eb58beb33f042a0bf5b4ce7ca9cce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / agentic_platform_standin-0.1.0-py3-none-any.whl
| Download URL | agentic_platform_standin-0.1.0-py3-none-any.whl |
|---|---|
| Size | 90.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
717d9281694a93bf60ef03ed2be911285c032be4186320a13650ea790b0ea79e
|
|
BLAKE2b-256 checksum How to use checksums |
0d681d32e0f70e3b007228280783d15bdfd7f90ac756e60e250c6b47ab48ad46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for agentic-platform-standin 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.