Skip to content

vbkotecha/AgentCourt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

AgentCourt

The policy-driven dispute resolution protocol for agent commerce.

AgentCourt provides instant, deterministic dispute rulings for AI agent transactions. Define your dispute policies, submit evidence, and get binding rulings in under 200ms.

Live API

  • Base URL: https://api.agentcourt.to
  • Interactive Docs: https://api.agentcourt.to/docs
  • Health: https://api.agentcourt.to/health

Quick Start

Submit a Dispute

curl -X POST https://api.agentcourt.to/v1/disputes \
  -H "Content-Type: application/json" \
  -d '{
    "claimant": "customer@example.com",
    "respondent": "freelancer@example.com",
    "contract": {
      "parties": ["customer@example.com", "freelancer@example.com"],
      "obligations": ["Build website by June 1"],
      "payment_terms": "$5,000 USD"
    },
    "claim": "Non-delivery of website",
    "desired_remedy": "Full refund of $5,000",
    "policy": "freelance-delivery",
    "evidence": [
      {
        "id": "e1",
        "type": "log",
        "source": "github",
        "timestamp": "2026-06-01T00:00:00Z",
        "claimed_fact": "No commits in repository for 30 days"
      }
    ]
  }'

Response

{
  "case_id": "9081d683-08e...",
  "status": "ruled",
  "ruling": "The respondent failed to deliver...",
  "matched_rule": "non_delivery",
  "evidence_scores": [{"id": "e1", "score": 0.85}],
  "facts_established": ["No delivery within agreed timeframe"]
}

Policy Templates

Policy Description Rules
freelance-delivery Freelance work contracts — deadlines, deliverables, quality 6
milestone-payment Milestone-based contracts — staged deliverables 5
bug-bounty Bug bounty programs — severity, reproducibility, disclosure 5
sla-monitoring SLA violations — uptime, latency, availability 5
api-quality API quality disputes — wrong data, schema mismatch, errors 7
physical-commerce Physical product disputes — damage, non-delivery, returns 6

Python SDK

from agentcourt import AgentCourt

court = AgentCourt()  # Uses https://api.agentcourt.to by default

ruling = court.resolve_dispute(
    claimant="customer@example.com",
    respondent="freelancer@example.com",
    policy="freelance-delivery",
    claim="Non-delivery",
    desired_remedy="Full refund",
    evidence=[{
        "id": "e1",
        "type": "log",
        "source": "github",
        "claimed_fact": "No commits for 30 days"
    }]
)

print(ruling["status"])  # "ruled"
print(ruling["ruling"])  # "The respondent failed to deliver..."

npm Package

npm install @agentcourt/sdk
import { AgentCourt } from '@agentcourt/sdk';

const court = new AgentCourt();
const ruling = await court.resolveDispute({
  claimant: 'customer@example.com',
  respondent: 'freelancer@example.com',
  policy: 'freelance-delivery',
  claim: 'Non-delivery',
  desiredRemedy: 'Full refund',
  evidence: [{ id: 'e1', type: 'log', source: 'github', claimedFact: 'No commits' }]
});

console.log(ruling.status); // "ruled"

Architecture

AgentCourt uses a deterministic policy engine — not an LLM — to produce rulings. This means:

  • Consistency: Same evidence always produces the same ruling
  • Speed: Average response time < 200ms
  • Transparency: Every ruling cites the specific rule matched and evidence scored
  • No hallucination: Rulings are template-based, not generated

How It Works

  1. Submit: POST your dispute with contract, claim, and evidence
  2. Match: Engine identifies which policy applies based on the policy field
  3. Score: Evidence is scored 0.0–1.0 based on source reliability and content hashing
  4. Rule: The matched policy rule fires and produces a structured ruling
  5. Persist: Case is stored with full ruling for future retrieval and precedent

API Reference

Endpoint Method Description
/v1/disputes POST Submit a dispute for ruling
/v1/cases GET List all cases
/v1/cases/{id} GET Get a specific case
/v1/policies GET List all available policies
/v1/policies/{name} GET Get policy details
/v1/policies/{name}/preview POST Preview a ruling for given evidence
/v1/verdicts GET List recent verdicts
/health GET Service health check
/docs GET Interactive Swagger documentation

Pricing

  • Pay per ruling: $0.50 USDC (via x402 payment protocol on Base network)
  • Volume pricing: Available for platforms processing >1,000 disputes/month
  • Self-host: Open source — deploy your own instance for free

Legal Entity

Yappa Ventures, Inc.
EIN: 33-4359267
San Francisco, CA

License

MIT License — see LICENSE

Links

About

Court for Agents to Be Able to Sue Each Other

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors