Monoid Agent Kernel
A durable agent runtime for embedding tools, model calls, and recoverable workflows in your product.
Monoid owns the agent loop, tool execution, permissions, checkpoints, and observation contracts. Your product supplies the model adapter, workspace, storage, and execution host. Start in one Python process, then use the same contracts with your backend, gateways, and durable workers.
Quickstart (no servers)
Run a typed tool and inspect the result delivered to the model. From this checkout's root, use a Python 3.11+ virtual environment:
python -m pip install .
python examples/custom_tool_quickstart.py
This documentation describes version 0.25.0.
Install this revision or its matching wheel for these examples. The examples/ scripts come
from the repository. For editable development, see
Contributing.
Expected output:
status : completed
final_text : Prepared Ada's weekly report.
tool_result: {'ok': True, 'result': {'customer': 'Ada', 'title': 'Weekly report'}}
The complete example
defines nested Pydantic input and a typed result, decorates summarize_report with @tool, and
calls AgentLoop.from_tools(spec, adapter, [summarize_report]).run_once(...). Its scripted
FakeModelAdapter invokes the tool and receives the serialized result in the next request.
The example asserts that result and runs offline without credentials.
Choose the next integration step:
| Task | Run after installing this checkout | What to inspect |
|---|---|---|
| Tools and host resources | python examples/custom_tool_quickstart.py |
Validated model inputs and the tool result |
| Streaming and Stop | python examples/termination_budget.py |
Early break, exit progress, final receipt and reported usage |
| Background observation | python examples/observe_background_run.py |
Reader disconnect, peer progress, replay/reset and explicit cancel |
| Approval and recovery | python -m monoid_agent_kernel.reference.host_tool_report --phase prepare --root ./report-state |
Parked approval and original run/task IDs for resume |
The approval guide supplies the second command for a new process. The packaged report recipe
also runs directly from an installed wheel. For a local session with builtin tools, run
python examples/embedding_local_product.py; inspect its file output, checked checkpoint, and
completed run. The embedding handbook
connects these paths to product topology and hosted storage.
Install
After version 0.25.0 is published on PyPI, install it with:
python -m pip install monoid-agent-kernel==0.25.0
Before publication, use the same-revision quickstart or its qualified wheel.
Optional extras work with either package installation or a checkout, for example
python -m pip install ".[http-async]".
| Extra | Use |
|---|---|
http-async |
Async gateway streaming, including Studio's live output |
openai |
Direct OpenAI adapter for local smoke tests |
postgres |
PostgreSQL persistence |
object-store-s3 |
S3-compatible content-addressed blobs |
temporal |
Temporal orchestration |
durable-host |
PostgreSQL, ObjectStore, and Temporal composition |
Core keeps provider and platform SDKs optional. Follow the hosted composition and operations guide when installing production adapters.
Model Provider Boundary
Replace the quickstart's fake adapter at the AgentLoop.from_tools or from_config call.
The custom adapter example
implements next_turn(request) -> ModelTurn and injects an EchoModelAdapter through from_config.
For hosted runs, GatewayModelAdapter sends model turns to the gateway you operate using a scoped
token; provider credentials stay at that gateway. The
model adapter contract
covers streaming, usage, and cancellation.
Architecture: Contract / Conformance Test / Core Helper Kit / Reference
- Contract: import supported specs and protocols from
monoid_agent_kernel.contractsor the package root. See the contract index. - Conformance Test: qualify your adapters and runtime through the existing profiles.
- Core Helper Kit: use the supported helpers for workspace, providers, tools, recording, and other contract implementations.
- Reference: learn from the runnable services
under
monoid_agent_kernel.reference, including backend, gateways, Studio, and conformance harnesses.
Stability
Monoid is pre-1.0: minor versions may change public behavior. The changelog and compatibility ledger record source and durable-format changes. The contract stability categories distinguish stable APIs, evolving extensions, helpers, and Reference examples.
For persistent runs, read Upgrade from v0.24 to v0.25.
The released v0.24 reader rejects the new invocation/ledger v2 records. The
release audit
records source and artifact qualification and publication status. Documentation and image links
target v0.25.0; until that tag is created, use the corresponding files in this checkout.
Running agents from the CLI
The CLI guide
covers monoid run, runtime configuration, workspace modes, proposals, jobs, and streaming JSON.
The default propose mode stages file changes for review. Configure path permissions explicitly
for your workspace; defaults permit paths. See the
workspace threat model.
Hosted backend and gateways
Use the backend walkthrough for authenticated submission, run tokens, status/result/events, and proposal retrieval. The full-stack example connects the Reference backend and gateway; its fake mode exercises the flow offline. Production hosts own tenant isolation, external effects, storage, and transport lifecycle.
Observability
Read model-call receipts for termination facts and usage evidence, and termination_budget()
for current Stop progress. Numeric usage remains the accounting input. The
streaming guide
shows the observation points and cleanup limits.
The observability reference describes events, metrics, tracing, and the optional private content, model-call, and replay artifacts. It defines their access and content boundaries. Use the operations guide for readiness, migration, drain, backup/restore, and incident handling.
Memory and default tools
Bind tools explicitly through runtime configuration. The tool surface reference covers builtin bundles, exposure, authorization, scope, and quotas. Optional memory providers supply ordinary tools and context; the memory example shows explicit attachment. Delegation and skills have their own design guides.
Defaults
AgentRunSpec selects workspace, limits, and permissions. AgentRuntimeConfig selects the model,
prompt, and tool bindings and can change at a turn boundary. See the
configuration contract
and builtin configuration example
for current defaults and explicit configuration.
See it run
The bundled Agent Studio (monoid studio serve) runs the kernel through its Python API and
provides profile editing, chat, approval, and proposal review. Its precompiled UI ships in the
package. See the Reference guide
for setup.
The agent reads a sample CSV, requests approval, and stages a report and chart for review.
Documentation
Use the documentation index to choose a guide, look up a contract, operate a deployment, or upgrade retained runs.
Contributing
Follow Contributing for setup, test selection, review, and CI. The operational rule coverage connects contract guarantees to their checks.
License
Licensed under the Apache License 2.0.
Metadata
Release files for monoid-agent-kernel 0.25.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 |
|---|---|---|---|---|
| monoid_agent_kernel-0.25.0.tar.gz | 4.1 MB | With provenance | Details for monoid_agent_kernel-0.25.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| monoid_agent_kernel-0.25.0-py3-none-any.whl | Python 3 | none | any | Details for monoid_agent_kernel-0.25.0-py3-none-any.whl |
Total release size: 5.9 MB
Release files / monoid_agent_kernel-0.25.0.tar.gz
| Download URL | monoid_agent_kernel-0.25.0.tar.gz |
|---|---|
| Size | 4.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b3a0088167143cefedd1384cf8a3644b01e4f0d1fafdd3812155dbf38d63f25
|
|
BLAKE2b-256 checksum How to use checksums |
11e364a15cb90092938d9a673a9739e82a099cc7afa7c1d110d00f7f53747b0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / monoid_agent_kernel-0.25.0-py3-none-any.whl
| Download URL | monoid_agent_kernel-0.25.0-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
018b3abdfdd98f0690522dbab99a0b99a503b6b28a8f1a585e9c5649318662f5
|
|
BLAKE2b-256 checksum How to use checksums |
283c00facd0c8cae55c17dcc2dfb2deaddd152ec2e23cc8942a64b35ead3cf6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logSecurity for monoid-agent-kernel 0.25.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for monoid_agent_kernel-0.25.0.tar.gz
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 Oct 28, 2026.
Transparency logA 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.