Collective Intelligence Overlay
Evidence is shared; admission is local.
A Python overlay for teams that want agents to exchange reusable tools and procedures without treating every generated result as verified. Each participant keeps its own keys, database, acceptance policy and budget. A receiver can inspect a candidate, request more checking, reject it, or reuse it under a specific contract.
The package connects Microsoft Agent Framework (MAF), A2A and MCP. It is not an agent runtime or a central manager. Existing SDKs run tools and compose workflows; the overlay records evidence, qualifies reuse and stops known-invalid dependencies.
日本語 · Tutorial · Architecture
The 0.2.1 release candidate returns execution allowance after a refusal or cancellation only when the database proves no dispatch and fences further dispatch. Inspection costs remain recorded; uncertain effects and old reservations stay held. See upgrade/recovery and release state.
What works
- Signed, versioned capability and evidence records, including PASS / FAIL / UNKNOWN.
- Receiver-specific OPA decisions: ACCEPT / REQUALIFY / REJECT / UNKNOWN.
- PostgreSQL persistence, duplicate/conflict detection, budgets and fenced result commits.
- Real A2A HTTP exchange, MAF function middleware/workflow composition and MCP HTTP calls.
- A three-process demo: register CSV tools, independently check their outputs and imported A2A bindings, reuse an HTML report workflow, then revoke its dependency.
- Typed costs and an explicitly limited deterministic comparison.
Version 0.2.0 adds typed local/MCP/A2A bindings, durable invocations, paged synchronization/history and observed formation receipts. An external document application demonstrates three peers building and checking C3, using it to construct C4, restarting and stopping both descendants after withdrawal. See the tutorial and current validation scope.
A signature establishes origin, not truth. Sample checks do not prove correctness on all future data. Distinct local identities are not independent organizations or statistically independent evidence. This software does not prove intelligence growth.
Run from source
Python 3.12, uv, PostgreSQL 16 and the OPA binary are required for the reference path. No model API key is needed. There is no broker, vector database, mandatory cloud service or always-running OPA server.
git clone https://github.com/kadubon/collective-intelligence-overlay.git
cd collective-intelligence-overlay
uv sync --all-extras --frozen
uv run python scripts/fetch_opa.py
Start a dedicated development PostgreSQL instance. The setup account must be able to create roles and databases. See the tutorial for Docker, Linux and PowerShell commands. Then:
export CIO_TEST_DATABASE_URL='postgresql+pg8000://postgres:development-only@127.0.0.1:5432/postgres'
export CIO_OPA="$PWD/.local/bin/opa"
uv run collective-intelligence-overlay demo --directory .local/demo
Expected fields: processes: 3, admission: ACCEPT, report total 117.00,
changed_environment: REQUALIFY, after_dependency_revocation: REJECT.
Timings vary. The command preserves owner-local artifacts and databases and stops
its child processes. Use a new output directory for another run.
Version 0.2.0 is published on PyPI. To install into an activated Python 3.12 environment:
uv pip install 'collective-intelligence-overlay[agents]==0.2.0'
collective-intelligence-overlay --version
PostgreSQL and OPA are still required for the reference demo. Actual publication status, hashes and clean-install verification are recorded in releasing. For 0.1.0 upgrades, follow migration and recovery.
Add to an existing agent
Importing the core never opens a database or runs a migration. The host supplies
an Overlay, explicitly installed Registry bindings and a persistent Executor:
registry.register_local(binding, operation, assess)
invocation = await executor.invoke(
"caller-stable-operation-id", binding.id, binding.digest, arguments, context
)
Here the host supplies the pinned binding, installed function, input assessment,
execution context and executor connected to that registry. Publish the corresponding
candidate and obtain independent evidence before ordinary reuse.
The executor checks the binding and actual inputs at execution, reserves the owner's
budget and retains the result under the caller's stable ID. Completion is not an
independent PASS. A previous ACCEPT is not a permanent permission. The lower-level
Overlay.execute callback API remains available for compatibility.
Integration shows registration, MAF
middleware and the real, opt-in model example. See API and CLI for
configuration, exceptions, cancellation and the operator/agent boundary.
For example, a verifier's PASS for csv-sum@1 in environment reference=1 does not
admit it in reference=2. The receiver requests requalification. A valid in-scope
counterexample is retained alongside the PASS and takes precedence in the standard policy.
Trust and operation
Peers authenticate with distinct pinned Ed25519 identities. Local Rego policy, keys and budgets must be protected from the agent process. Evidence sharing is disabled by default; the demonstration enables it for its configured peers. The DB/host operator is trusted. A malicious infrastructure administrator is outside this model. See security and deployment.
uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run pytest
uv build
uv run twine check --strict dist/*
uv run python scripts/check_package.py
Integration/E2E tests require PostgreSQL and OPA; missing services are explicit skips, not production validation. Paid model calls are off by default. Current checks and unverified boundaries are in validation. Windows and Linux are the initial target platforms; the network reference deployment is Linux-oriented.
New code is Apache-2.0. See LICENSE, NOTICE, dependency compatibility/licensing, research mapping, and contributing.
Metadata
Release files for collective-intelligence-overlay 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| collective_intelligence_overlay-0.2.1.tar.gz | 72.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| collective_intelligence_overlay-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 168.5 kB
Release files / collective_intelligence_overlay-0.2.1.tar.gz
| Download URL | collective_intelligence_overlay-0.2.1.tar.gz |
|---|---|
| Size | 72.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
988c71482d60430e5cc57bd48eba0f269528d3a1ba2a41b473d1e23fc4a62750
|
|
BLAKE2b-256 checksum How to use checksums |
8a1872b63b7e6ed392cf9c35a5646c039c4c545408049af6d1d0bb80db626685
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 28, 2026.
Transparency logRelease files / collective_intelligence_overlay-0.2.1-py3-none-any.whl
| Download URL | collective_intelligence_overlay-0.2.1-py3-none-any.whl |
|---|---|
| Size | 96.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d5c35188aaee07c25731d096f05e424ea59cdeb15b19f721dc13be0d98336a7
|
|
BLAKE2b-256 checksum How to use checksums |
4fedcd9f93590fba9d0e90f666387a060c06c573aa7cf9d7bd73b4f3c73d6e02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 28, 2026.
Transparency log