adp-agent
Python / FastAPI reference implementation of the Agent Deliberation Protocol. Sister project to the TypeScript @ai-manifests/adp-agent and the C# Adp.Agent runtimes — same wire format, same cross-language signing interop.
Install
pip install adp-agent
Packages are published to the Gitea PyPI feed. Configure pip once:
# pyproject.toml
[tool.pip]
extra-index-url = "https://git.marketally.com/api/packages/ai-manifests/pypi/simple"
Or with uv:
# pyproject.toml
[[tool.uv.index]]
name = "ai-manifests"
url = "https://git.marketally.com/api/packages/ai-manifests/pypi/simple"
Minimal use
from adp_agent import AgentConfig, AdpAgentHost, JournalBackend
from adp_manifest import StakeMagnitude, Vote
config = AgentConfig(
agent_id="did:adp:my-agent-v1",
port=3000,
domain="my-agent.example.com",
decision_classes=("code.correctness",),
authorities={"code.correctness": 0.7},
stake_magnitude=StakeMagnitude.MEDIUM,
default_vote=Vote.APPROVE,
default_confidence=0.65,
dissent_conditions=("if any test marked critical regresses",),
journal_dir="./journal",
)
host = AdpAgentHost(config)
await host.run()
The AdpAgentHost class serves:
GET /healthzGET /.well-known/adp-manifest.jsonGET /.well-known/adp-calibration.json(signed, ADJ §7.4)POST /api/proposePOST /api/respond-falsificationPOST /api/deliberatePOST /api/record-outcomeGET /adj/v0/calibrationGET /adj/v0/deliberation/{id}GET /adj/v0/deliberationsGET /adj/v0/outcome/{id}GET /adj/v0/entriesPOST /api/budget
The adopter implements an Evaluator (the function that produces votes) and hands it to the host. See adp-agent-template-python for the full starter pattern.
With optional chain anchoring
from adp_agent_anchor import BlockchainStoreFactory, CalibrationAnchorScheduler
host = AdpAgentHost(config)
if config.calibration_anchor and config.calibration_anchor.enabled:
store = BlockchainStoreFactory.create(config.calibration_anchor)
if store:
scheduler = CalibrationAnchorScheduler(config, host.journal, store)
host.after_start(scheduler.start)
host.before_stop(scheduler.stop)
await host.run()
Targets: mock, neo-express, neo-custom, neo-testnet, neo-mainnet. Same code, same smart contract, only the RPC URL, contract hash, and signing wallet differ.
Feature parity vs TypeScript @ai-manifests/adp-agent@0.3.0
See CHANGELOG.md for the full feature parity matrix. Short version: everything except distributed deliberation, MCP tool server, and the Neo3 RPC client itself ships in 0.1.0. Those three are v0.2.0 deliverables, stubbed with 501 responses / NotImplementedError so adopters get honest errors instead of silent failures.
License
Apache-2.0 — see LICENSE for the full license text and NOTICE for attribution.
Metadata
Release files for adp-agent 0.7.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 |
|---|---|---|---|---|
| adp_agent-0.7.0.tar.gz | 51.6 kB | Without provenance | Details for adp_agent-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adp_agent-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for adp_agent-0.7.0-py3-none-any.whl |
Total release size: 105.9 kB
Release files / adp_agent-0.7.0.tar.gz
| Download URL | adp_agent-0.7.0.tar.gz |
|---|---|
| Size | 51.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8048c81a22e1115f3da4168ed30c972d3152081e67c1f1f65388f4ae232dc8d7
|
|
BLAKE2b-256 checksum How to use checksums |
f9db0d73e377e10dbc6d69b5bd0b8ef0df27f5b14b2ba05508042c2ae5eb25b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Release files / adp_agent-0.7.0-py3-none-any.whl
| Download URL | adp_agent-0.7.0-py3-none-any.whl |
|---|---|
| Size | 54.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fc2727a8fc38540feb0f2b722b86d72a20b074a27a7d222d39a8c0765a13d75
|
|
BLAKE2b-256 checksum How to use checksums |
8052bbca3794260598154ec3cf8d2ebea0614c791b03cfefb7afcef4e898c7a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Security for adp-agent 0.7.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.