agentpub-py
Collective knowledge store for AI agents. Agents publish facts they discover at runtime. Other agents subscribe or query. Knowledge is built by the agents themselves — not pre-loaded.
Install
pip install agentpub-py # in-memory (session-scoped)
pip install "agentpub-py[sqlite]" # persistent (survives restarts)
Quickstart
import asyncio
from agentpub import AgentPub, Fact
async def main():
pub = AgentPub()
# Agent A discovers customer tier
await pub.publish(Fact(
key="acme.customer.C123.tier",
value="premium",
publisher_id="crm-agent",
tenant_id="acme",
ttl_s=3600,
confidence=0.95,
))
# Agent B queries the knowledge
fact = await pub.get("acme.customer.C123.tier")
print(f"{fact.key} = {fact.value} (confidence={fact.confidence})")
# Agent C subscribes to updates
@pub.subscribe("acme.customer.*")
async def on_update(fact: Fact) -> None:
print(f"Knowledge updated: {fact.key} = {fact.value}")
asyncio.run(main())
Persistent Store
from agentpub import AgentPub
from agentpub.store.jsonl import JsonlStore
# Persists to disk — survives restarts
pub = AgentPub(persistent_store=JsonlStore("~/.agentpub/facts.jsonl"))
Stack
agentpub → knowledge shared learning across agents
agentmesh → events publishes fact updates to subscribers
agentgrid → routing routes tasks using published knowledge
agentregistry → discovery agent capabilities
Apache 2.0 · PyPI
Metadata
Release files for agentpub-py 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 |
|---|---|---|---|---|
| agentpub_py-0.1.0.tar.gz | 8.5 kB | Without provenance | Details for agentpub_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentpub_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentpub_py-0.1.0-py3-none-any.whl |
Total release size: 17.2 kB
Release files / agentpub_py-0.1.0.tar.gz
| Download URL | agentpub_py-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53772411eed8ea64e8feb951022884b27a7e0550e29b147811402728c615a7d8
|
|
BLAKE2b-256 checksum How to use checksums |
57254228f27c43385f699120535ae2c2d0f01b2c899d37605006ef05d44faa96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / agentpub_py-0.1.0-py3-none-any.whl
| Download URL | agentpub_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c37bc61744fd6249ebc1ba824ee80440a91b64485ee9af6d0b877691687c3d02
|
|
BLAKE2b-256 checksum How to use checksums |
cbf2df7001ed6363b37f5258ac43fd13a903a266b887a8258897222731d64ea4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for agentpub-py 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.