A .NET 10 reference implementation of the Agent Deliberation Protocol (ADP) specification — the consensus protocol that multi-agent systems use to reach calibrated, falsifiable decisions together. ADP defines proposals, weights, tallies, falsification, termination, and reversibility tiers.
This library is one of several reference implementations (TypeScript, Python) of the same spec. The spec itself is at adp-manifest.dev and is the source of truth; this library implements what the spec says.
Zero runtime dependencies beyond System.Collections.Immutable.
Looking for a runnable agent? This library is the protocol core — data types, weighting math, and an in-memory orchestrator. For a full federation-ready agent runtime with HTTP endpoints, journal persistence, Ed25519 signing, signed calibration snapshots, ACB pricing, and MCP integration, install
Adp.Agentinstead.
dotnet add package Adp.ManifestPackages are published to the Gitea NuGet feed at https://git.marketally.com/api/packages/ai-manifests/nuget/index.json. Configure once in your project's nuget.config:
<configuration>
<packageSources>
<add key="ai-manifests" value="https://git.marketally.com/api/packages/ai-manifests/nuget/index.json" />
</packageSources>
</configuration>Or clone and build from source:
git clone https://github.com/ai-manifests/adp-ref-lib-csharp.git
cd adp-ref-lib-csharp
dotnet buildusing Adp.Manifest;
var proposal = new Proposal(
AgentId: "did:adp:test-runner-v1",
Domain: "code.correctness",
Vote: Vote.Approve,
Confidence: 0.82,
Stake: new Stake(Magnitude: StakeMagnitude.Medium, Domain: "code.correctness"),
Justification: new Justification(Rationale: "all tests pass", EvidenceRefs: []),
DissentConditions: []
);
var calibration = new CalibrationScore(Value: 0.78, SampleSize: 42);
double weight = WeightingFunction.ComputeWeight(proposal, calibration);
// weight ≈ 0.82 × 0.78 × StakeFactor(Medium) × ApplySampleSizeDiscount(42)All public types live in the Adp.Manifest namespace.
Vote, ReversibilityTier, DissentConditionStatus, TerminationState, StakeMagnitude
Amendment, DissentCondition, VoteRevision, ProposalAction, BlastRadius, DomainClaim, Justification, Stake, Proposal, TallyResult
WeightingFunction — static class with:
ComputeWeight(proposal, calibration)— canonical proposal weight per ADP §4.2ComputeDecay(age, halfLife)— time decay of calibration evidenceStakeFactor(magnitude)— mapsStakeMagnitudeto its numeric factorApplySampleSizeDiscount(value, sampleSize)— Wilson-interval sample-size discount
DeliberationConfig— record describing a deliberation's rules (thresholds, participants, tiers)AgentRegistration— record for a participating agentDeliberationSnapshot— record for a point-in-time state of a running deliberationDeliberationOrchestrator— in-memory state machine that runs a deliberation through proposal → tally → falsification → termination. Intended for prototypes, tests, and embedded-in-process use. For production distributed deliberation, seeAdp.Agent.
ICalibrationSource— interface the orchestrator uses to look up per-agent calibration scores. Implementations can back this with in-memory state, a local journal, or a remote registry.
dotnet testThis library implements the Agent Deliberation Protocol specification. Read the spec at adp-manifest.dev. If the spec and this library disagree, the spec is correct and this is a bug.
Apache-2.0 — see LICENSE for the full license text and NOTICE for attribution.