swarm.at

Settlement protocol that validates agent actions before execution. Guards destructive operations with hash-chained ledger receipts, trust tiers, and 31 workflow blueprints.

swarm.at Public Ledger

Hash-chained public record of verified agent settlements. Append-only, tamper-evident, auditable by anyone.

Every entry in ledger.jsonl is a SHA-256 hash-chained settlement that passed the full verification pipeline: integrity check, confidence threshold, and shadow audit. Modifying any entry breaks all subsequent hashes.

Ledger Format

Each line in ledger.jsonl is a JSON object:

{
  "timestamp": 1770480398.05,
  "task_id": "fingerprint-pg84",
  "parent_hash": "000000...000000",
  "payload": { "type": "text-fingerprint", "title": "Frankenstein", "..." : "..." },
  "current_hash": "453eaa...178b287"
}
  • parent_hash links to the previous entry's current_hash (genesis = 0 x 64)
  • current_hash = SHA-256 of the entry with current_hash set to ""
  • The chain is tamper-evident: modifying any entry breaks all subsequent hashes

Canonical Hash Algorithm

To verify any entry:

  1. Parse the JSON line into a dict
  2. Set current_hash to "" (empty string)
  3. Serialize with json.dumps(entry, sort_keys=True).encode() (UTF-8)
  4. Compute hashlib.sha256(serialized).hexdigest()
  5. Compare against the stored current_hash

The genesis (first entry's parent_hash) is always "0" * 64 (64 zero characters).

Data Provenance

Entries in this ledger are synthetic seed data generated from public domain sources (Project Gutenberg texts, scientific constants, geographic facts). They demonstrate the settlement protocol's hash-chaining and verification pipeline. They are not records of real agent interactions.

Verification

Three ways to verify the chain:

Standalone (zero dependencies, Python 3.8+):

python verify.py
# OK: 490 entries, chain intact

SDK:

from swarm_at.settler import Ledger
ledger = Ledger(path="ledger.jsonl")
print(ledger.verify_chain())  # True

API:

curl https://api.swarm.at/public/ledger/verify
# {"intact": true, "entry_count": 490}

Settlement Receipts

Every settled entry produces a receipt that any agent can look up by hash. No authentication required.

curl https://api.swarm.at/public/receipts/{hash}
# {"status": "SETTLED", "hash": "...", "task_id": "...", "timestamp": ..., "parent_hash": "..."}

Receipts let third parties verify that a specific settlement happened, when it happened, and where it sits in the chain.

Trust Verification

Check an agent's trust level without authentication:

# Does this agent meet a trust threshold?
curl "https://api.swarm.at/public/verify-trust?agent_id=X&min_trust=trusted"
# {"agent_id": "X", "meets_requirement": true, "trust_level": "trusted", "reputation_score": 0.95}

# How many agents at each trust level?
curl https://api.swarm.at/public/trust-summary
# {"total_agents": 5, "by_trust_level": {"untrusted": 0, "provisional": 0, "trusted": 4, "senior": 1}}

Trust Badges

Embeddable SVG badges show an agent's trust level at a glance. No authentication required.

https://api.swarm.at/badge/{agent_id}

Colors: untrusted (red), provisional (yellow), trusted (green), senior (blue).

MCP Server

11 tools available via the Model Context Protocol:

mcp add swarm-at -- python -m swarm_at.mcp
ToolDescription
settle_actionValidate an action against institutional rules
check_settlementQuery ledger status for a task or hash
ledger_statusCurrent chain state (latest hash, entry count, integrity)
guard_actionSettle before acting — propose + settle + receipt in one call
list_blueprintsBrowse workflow blueprints by tag
get_blueprintFull blueprint detail with steps and credit cost
get_creditsCheck an agent's credit balance
topup_creditsAdd credits to an agent
fork_blueprintFork a blueprint into an executable workflow
verify_receiptLook up a settlement receipt by hash
check_trustCheck if an agent meets a minimum trust threshold

Framework Adapters

Seven adapters settle agent outputs with zero hard dependencies on the framework:

FrameworkAdapterEntry Point
LangGraphSwarmNodeWrapperWraps node functions
CrewAISwarmTaskCallbackTask completion callback
AutoGenSwarmReplyCallbackAgent reply observer
OpenAI AssistantsSwarmRunHandlerRun and step settlement
OpenAI Agents SDKSwarmAgentHookRunner result and tool call settlement
Strands (AWS)SwarmStrandsCallbackTool and agent completion callbacks
HaystackSwarmSettlementComponentPipeline component returning receipts

Install adapters via optional extras:

pip install swarm-at-sdk[langgraph]
pip install swarm-at-sdk[openai-agents]
pip install swarm-at-sdk[strands]
pip install swarm-at-sdk[haystack]

Blueprint Catalog

31 pre-validated blueprints across 6 categories:

CategoryCountExamples
Procurement & Supply Chain5vendor-negotiation, purchase-approval, delivery-confirmation
Software Development5code-review-pipeline, pr-merge-audit, incident-escalation
Finance & Compliance5invoice-matching, kyc-verification, financial-close
Content & Knowledge5research-workflow, fact-checking, translation-verification
Customer Operations5escalation-routing, refund-approval, sla-compliance
Specialty6audit-chain, healthcare-referral, insurance-adjudication

Browse: api.swarm.at/public/blueprints

Each blueprint defines 2-4 steps with role assignments (worker, auditor, specialist, orchestrator, validator), dependency chains, and credit costs (2.0-8.0 per settlement).

Settlement Types

Knowledge Verification

TypeDescription
text-fingerprintPublic domain text ingestion + hashing
qa-verificationFactual Q&A with multi-agent consensus
fact-extractionStructured entity extraction from text
classificationGenre/topic/tone multi-label tagging
summarizationText condensation with cross-verification
translation-auditCross-language verification
data-validationMath constants + periodic table verification
code-reviewAlgorithm correctness + complexity analysis
sentiment-analysisDimensional sentiment scoring
logical-reasoningSyllogism and formal logic verification
unit-conversionMetric/imperial/scientific unit verification
geo-validationGeographic fact verification
timeline-orderingChronological event ordering
regex-verificationPattern matching correctness
schema-validationData schema conformance checking

Agent Behaviors

TypeDescription
code-generationNew code creation with language + framework metadata
code-editModifications to existing code with diff tracking
code-refactorStructural improvements preserving behavior
bug-fixDefect resolution with root cause analysis
test-authoringTest creation with coverage and assertion tracking
codebase-searchCode search operations with match scoring
web-researchWeb research with source verification
planningTask decomposition and execution planning
debuggingDiagnostic investigation with hypothesis tracking
shell-executionShell command execution with safety classification
file-operationFile system operations with change tracking
git-operationGit operations with ref and diff metadata
dependency-managementPackage and dependency management
agent-handoffTask delegation between agents
consensus-voteMulti-agent consensus participation
task-delegationWork distribution to sub-agents
documentationDocumentation creation and updates
api-integrationExternal API calls with endpoint tracking
deploymentBuild, deploy, and release operations
conversation-turnConversational exchange settlement

Protocol Operations

TypeDescription
blueprint-forkBlueprint forked into executable workflow
guard-actionPre-action settlement check (settle before you act)
trust-checkAgent trust level verification against threshold
credit-topupCredits added to agent balance
receipt-verifySettlement receipt lookup by hash
badge-requestTrust badge SVG generation
adapter-settlementFramework adapter settling agent output

Lexicon

TermDefinition
SettlementA verified, hash-chained record of an agent action. One credit = one settlement.
LedgerAppend-only JSONL file where settlements are recorded. Each entry's hash chains to the previous.
ProposalAn agent's request to settle an action. Contains a header (task ID, parent hash) and payload (data, confidence score).
ReceiptProof that a settlement occurred. Contains hash, task ID, timestamp, and parent hash. Publicly verifiable.
BlueprintA pre-validated workflow template with ordered steps, role assignments, and credit cost. Forkable by any agent.
WorkflowAn executable instance of a blueprint. Created by forking. Each step maps to one settlement.
Trust LevelAgent reputation tier: untrusted, provisional, trusted, senior. Computed via Bayesian credible intervals.
CreditUnit of settlement currency. 1 credit = 1 settlement. New agents get 100 free.
Guard ActionPattern: settle before you act. Propose, settle, get receipt in one call. Raises error on rejection.
Shadow AuditCross-model verification where a second model independently checks the primary's output.
DivergenceWhen a shadow audit disagrees with the primary. Penalizes the agent's trust score.
AdapterFramework integration that settles agent outputs without hard-importing the framework. Uses duck typing.
Agent CardA2A discovery document at /.well-known/agent-card.json describing the protocol's capabilities.
TierSettlement strictness level: sandbox (log-only), staging (writes, no chain enforcement), production (full).

Links


© 2026 Mediaeater. All rights reserved.

Related Servers