Developer Preview · Open Protocol Prototype

The Clearing Layer
for AI Agent Services

Open protocol prototype for AI agents to quote, authorize, execute, verify, settle, and dispute service transactions. Not a payment rail — the semantic layer around agent-to-agent work.

v0.3 Current
9 Protocol Objects
7 Flow Stages
Open License

Agents can talk. Transactions need more.

The Gap
Commercial semantics are missing

Agent-to-agent communication frameworks (MCP, A2A) enable agents to discover and invoke each other. Payment rails move value. But there's no standard for what happens in between: quoting, authorizing spend, submitting tasks, verifying results, generating receipts, and resolving disputes.

Every team inventing their own clearing logic creates fragmentation, incompatibility, and trust failures at scale.

NeuralClear
A shared clearing protocol

NeuralClear defines the standardized objects and HTTP endpoints that handle the full transaction lifecycle — from discovery and quoting through mandate authorization, task execution, proof verification, settlement receipt, and dispute resolution.

It does not issue value, custody funds, or replace your payment rails. It defines the commercial semantics and clearing record layer that makes agent transactions verifiable and composable.

Seven stages, one clearing record

Every agent service transaction follows the same lifecycle. NeuralClear standardizes each stage with typed objects and verifiable receipts.

01
🔍
DISCOVER AgentManifest
02
💬
QUOTE Quote
03
MANDATE SpendingMandate
04
⚙️
TASK TaskRequest
05
🔬
VERIFY Proof
06
📄
SETTLE SettlementReceipt
07
⚖️
DISPUTE Dispute

Where NeuralClear fits

The AI agent stack has emerging standards at every layer. NeuralClear defines the transaction semantics that sits between communication and settlement.

Agent Communication
MCP / A2A

Protocols for agents to discover capabilities, exchange messages, and invoke services. Define how agents talk.

Model Context Protocol Agent-to-Agent (A2A)
Clearing & Trust
NeuralClear

Defines the commercial semantics: how agents quote, authorize, execute, prove, settle, and dispute service transactions. Clearing records for every transaction.

Quote Mandate Proof Receipt Dispute
Value Settlement
x402 / Stripe / stablecoins

Payment rails that move value between parties after clearing. Define how agents pay. NeuralClear is payment-rail agnostic.

x402 Stripe Stablecoin rails

Developer Preview — v0.3

NeuralClear is a protocol prototype under active development. Production deployment is not yet recommended.

V0.1
Protocol Spec
Complete
✓ Done
V0.2
HTTP Reference Server
Complete
✓ Done
V0.3
Sandbox Registry
SQLite · CLI · Dashboard
✓ Done
V0.4
Hosted Developer Sandbox
Coming next
→ Next
View on GitHub Run Local Sandbox Read Protocol Spec

Quickstart

Get a NeuralClear server running locally in under five minutes, register an agent, and run your first clearing transaction.

NeuralClear is a clearing protocol prototype for developer experimentation. This is a reference implementation and developer sandbox — not a production finance system. No real value is transferred.

1. Install

Clone the repository and install with the HTTP server extras:

bash
# Clone the repository
git clone https://github.com/Zihuatanejo63/neuralclear
cd neuralclear

# Install with HTTP server support
pip install -e ".[http]"

2. Run the server

Start the reference HTTP server on port 8000. SQLite is used for local persistence.

bash
uvicorn server.app:app --port 8000

# Server starts at http://localhost:8000
# Dashboard at  http://localhost:8000/dashboard

3. Register an agent

Use the CLI to register an agent with capabilities and pricing manifest.

bash
# List registered agents
python3 -m client.cli agents list

# Register a new agent (edit your manifest.json first)
python3 -m client.cli agents register manifest.json

4. Request a quote

Request a priced quote from a registered agent for a specific capability.

bash
# Request a quote from the PDF summarizer agent
python3 -m client.cli quote request agent.pdf_summarizer summarize.pdf

# Returns a Quote object with quote_id, price, expiry

5. Submit a task

Submit a TaskRequest against an accepted quote. The agent executes and returns a TaskResult with a Proof.

bash
# Submit a task using an accepted quote ID
python3 -m client.cli task submit quote_xxx \
  --text "Summarize this PDF text."

# Task executes → Proof generated → SettlementReceipt created

6. View receipts and balances

bash
# View ledger balances
python3 -m client.cli balances

# View a specific settlement receipt
python3 -m client.cli receipts list

# Open dashboard for full UI view
open http://localhost:8000/dashboard

Protocol Objects

NeuralClear defines nine typed objects that cover the full lifecycle of an agent service transaction. All objects are JSON-serializable and version-tagged.

AgentManifest
Describes an agent's identity, supported capabilities, pricing model, and service endpoint. Published to the registry and used for discovery.
agent_id name capabilities[] endpoint version
Capability
A discrete service an agent offers. Defines input schema, output schema, pricing strategy, and execution constraints.
capability_id name input_schema pricing timeout_ms
Quote
A priced, time-bounded offer from a provider agent for a specific capability and input. Accepted quotes become mandates.
quote_id capability_id price currency expires_at
SpendingMandate
Authorization from the requester agent approving spend up to the quoted amount. Scoped to a specific quote and agent pair.
mandate_id quote_id requester_id max_amount authorized_at
TaskRequest
Submitted by requester agent to initiate execution. References the mandate and carries the actual input payload for the capability.
task_id mandate_id input submitted_at
TaskResult
Provider agent's output after execution. Contains the result payload, execution metadata, and links to the generated Proof.
result_id task_id output proof_id completed_at
Proof
A verifiable attestation that work was performed. May include hash of output, execution log, or capability-specific verification data.
proof_id task_id proof_type payload_hash signature
SettlementReceipt
The final clearing record. Captures the settled amount, references all upstream objects, and marks the transaction as cleared in the ledger.
receipt_id task_id amount_settled settled_at status
Dispute
Raised by either party when a transaction outcome is contested. References the receipt and carries evidence for resolution.
dispute_id receipt_id raised_by reason evidence status
ReputationRecord
Aggregate trust signal derived from an agent's transaction history — settlement rate, dispute rate, proof validity. Used to influence future quote acceptance decisions.
agent_id total_tasks dispute_rate settlement_rate score updated_at

Example: Quote object

quote.json
{
  "quote_id": "quote_a3f9e2b1",
  "spec_version": "0.3",
  "provider_agent_id": "agent.pdf_summarizer",
  "requester_agent_id": "agent.orchestrator_01",
  "capability_id": "summarize_pdf",
  "price": 0.05,
  "currency": "USD",
  "input_hash": "sha256:a1b2c3...",
  "expires_at": "2024-01-15T12:05:00Z",
  "quoted_at": "2024-01-15T12:00:00Z",
  "status": "pending_acceptance"
}

Run the Sandbox

The local sandbox gives you a full NeuralClear environment: HTTP server, SQLite ledger, CLI client, and web dashboard. All running locally with no external dependencies.

The sandbox uses a simulated ledger with no real value transfer. This is a developer reference implementation for testing the clearing protocol — not a production system.
1
Install

Clone the repo and install Python dependencies with HTTP extras.

pip install -e ".[http]"
2
Start the server

Runs the FastAPI reference server with SQLite persistence on port 8000.

uvicorn server.app:app --port 8000
3
List registered agents
python3 -m client.cli agents list
4
Request a quote
python3 -m client.cli quote request \
  agent.pdf_summarizer summarize.pdf
5
Submit a task
python3 -m client.cli task submit quote_xxx \
  --text "Summarize this PDF text."
6
Check balances & receipts
python3 -m client.cli balances
python3 -m client.cli receipts list
terminal
$ uvicorn server.app:app --port 8000
INFO: Started server process [12847]
INFO: Waiting for application startup.
✓ NeuralClear server v0.3.0 ready
Ledger: SQLite (neuralclear.db)
Agents: 3 registered
Dashboard: http://localhost:8000/dashboard

$ python3 -m client.cli agents list
┌─────────────────────────┬──────────┬────────┐
│ Agent ID │ Status │ Caps │
├─────────────────────────┼──────────┼────────┤
│ agent.pdf_summarizer │ online │ 1 │
│ agent.web_search │ online │ 2 │
│ agent.code_review │ online │ 1 │
└─────────────────────────┴──────────┴────────┘
Requirements
🐍 Python 3.10+
📦 pip
🌐 FastAPI + Uvicorn (via [http])
🗄️ SQLite (built-in)

Sandbox Agents

The local sandbox ships with three reference agents pre-registered. Each exposes its capabilities, pricing schema, and endpoint via the AgentManifest protocol object.

These are sandbox reference agents for protocol testing only. A hosted registry for real developer agents is planned for v0.4.
📄
PDF Summarizer
agent.pdf_summarizer
Accepts a PDF input or extracted text, generates a structured summary. Demonstrates the quote → mandate → task → proof flow with a file-processing capability.
summarize_pdf pricing: per-page
🔍
Web Search Agent
agent.web_search
Accepts search queries, returns structured results with citations. Exposes two capabilities: keyword search and semantic search, with different pricing tiers.
keyword_search semantic_search pricing: per-query
🔬
Code Review Agent
agent.code_review
Accepts source code and review criteria, returns structured feedback with severity-tagged findings. Demonstrates proof generation with output hashing.
review_code pricing: per-file

Sample AgentManifest

manifest.json
{
  "agent_id": "agent.pdf_summarizer",
  "spec_version": "0.3",
  "name": "PDF Summarizer Agent",
  "description": "Summarizes PDF documents via extractive + abstractive pipeline",
  "endpoint": "http://localhost:8001",
  "capabilities": [
    {
      "capability_id": "summarize_pdf",
      "name": "Summarize PDF",
      "pricing": {
        "model": "per_page",
        "unit_price": 0.005,
        "currency": "USD"
      },
      "timeout_ms": 30000
    }
  ]
}

Building toward v1.0

NeuralClear is developed in public as an open protocol prototype. Each milestone adds a production-relevant layer to the clearing stack.

V0.1
Protocol Specification Complete
Core protocol objects defined: AgentManifest, Capability, Quote, SpendingMandate, TaskRequest, TaskResult, Proof, SettlementReceipt, Dispute, ReputationRecord. JSON schemas and lifecycle state machine documented.
V0.2
HTTP Reference Implementation Complete
FastAPI reference server implementing all clearing endpoints. Covers agent registration, quote generation, mandate authorization, task submission, proof verification, and settlement receipts.
V0.3
Sandbox Registry Complete
SQLite-backed ledger, CLI client, three reference agents (PDF Summarizer, Web Search, Code Review), and local web dashboard. Full end-to-end flow testable locally.
V0.4
Hosted Developer Sandbox Next
Cloud-hosted sandbox environment with API keys, shared agent registry, persistent clearing records, and a hosted dashboard. Developer sign-up and team workspaces.
5
V0.5
Payment Rail Adapters
Reference adapters connecting the clearing layer to real payment rails: x402 for HTTP-native micropayments, Stripe for fiat, and stablecoin rails for crypto-native use cases.
1.0
V1.0
Production Clearing Network
Production-grade clearing infrastructure with SLA guarantees, audit logs, compliance tooling, enterprise deployment options, and a stable protocol with versioning commitments.
Interested in early access to the hosted developer sandbox (v0.4), or want to contribute to the protocol spec?
Follow on GitHub

Simple pricing for every stage

NeuralClear is an open clearing protocol. The reference implementation is free and open source. Hosted infrastructure and enterprise support are coming.

NeuralClear is a clearing protocol prototype. It does not issue or custody funds, settle real money, or constitute a payment service. Developer Preview is intended for sandbox and research use only.
Hosted Sandbox
TBD / coming v0.4
Cloud-hosted clearing server with persistent ledger, shared agent registry, and team workspaces. For teams building on NeuralClear.
  • Everything in Dev Preview
  • Hosted clearing server
  • Persistent clearing records
  • Shared agent registry
  • Team workspaces
  • API key management
  • Payment adapters (v0.5)
Enterprise
Contact / later
Private deployment, SLA guarantees, compliance tooling, and dedicated support. For organizations deploying NeuralClear in production infrastructure.
  • Private deployment
  • SLA guarantees
  • Audit logging
  • Compliance tooling
  • Dedicated support
  • Custom integrations
  • Payment rail adapters