Developer playground

Your sandbox awaits

Agent-friendly CLI, 31 public primitives, Swagger at runtime, and a library layer designed so new rails and providers don't rewrite the world. Early access for people who will actually call the API.

Quickstart

Run the protocol locally

Starts with zero credentials (memory ledger, deterministic settlement). Add .env keys to unlock Plaid, Coinbase CDP, Base mainnet, and Sheets.

# clone & install
git clone https://github.com/enkayxyz/k-0.git && cd k-0
python3 -m pip install -r modules/protocol/requirements.txt

# API
python3 -m uvicorn src.main:app --app-dir modules/protocol \
  --host 127.0.0.1 --port 8000

# Swagger · readiness
open http://127.0.0.1:8000/docs
open http://127.0.0.1:8000/uat/readiness
# k0 CLI — every primitive is a subcommand
python3 modules/protocol/cli/k0.py onboard \
  --email [email protected]
python3 modules/protocol/cli/k0.py link-bank
python3 modules/protocol/cli/k0.py pay \
  --to [email protected] --amount 10
python3 modules/protocol/cli/k0.py corridor-pay \
  --to [email protected] --amount 10 --corridor us-us

# agent-friendly JSON on every command
python3 modules/protocol/cli/k0.py status --json
Demo ./scripts/launch_demo.sh Probe ./scripts/chain_probe.sh Tests 237 passing (unit/contract/library)

S-primitives

31 public endpoints by domain

Each S-primitive is a thin orchestration layer: validate → authorize → compose W-libraries → return. One file per endpoint under modules/protocol/src/api/.

Auth & onboarding

  • S1 authenticate
  • S15 validate-otp
  • S23 recover-account
  • S28 onboard
  • S29 bootstrap-app

Bank & KYC

  • S3 link-bank
  • S4 submit-kyc
  • S10 verify-payee

Payments

  • S5 fee-estimate
  • S6 check-fee-balance
  • S7 approve-fees
  • S8 send-payment
  • S30 initiate-payment
  • S31 corridor-payment
  • S25 bulk-send

Payees & accounts

  • S9 create-payee
  • S13 block-payee
  • S19 payees
  • S2 create-account
  • S17 balance
  • S18 history
  • S26 set-default
  • S27 list-accounts

Compliance & audit

  • S11 attach-evidence
  • S12 anchor-contract
  • S14 stop-journey
  • S16 audit-sync
  • S20 logs
  • S21 idempotency
  • S22 compliance-note

Design note

Centralized processor endpoints that imply K0 holds funds or issues stablecoins (e.g. mint treasury APIs) are not part of the protocol surface — they conflict with the no-intermediary principle. Compare against Circle/M0-style models only as conceptual contrast.

CLI & agents

k0 — the agent interface

Every primitive as a subcommand with --json, plus a REPL. Built for humans and coding agents in the same loop.

User flows

onboard · auth · link-bank · accounts · balance · payee · quote · send · pay · claims

Money edges

onramp · offramp · corridor-pay · ledger · logs · status · chains

Admin

verify-payee · reverse · sweep-expired — KYC gate and escrow ops for pilots

Repository map

Where things live

Path What it is
modules/protocol/src/api/ S-primitives — one file per public endpoint
modules/protocol/src/library/ W-libraries — W1 through W25
modules/protocol/src/service.py Fee engine, idempotency, escrow state machine
modules/protocol/cli/k0.py CLI + REPL
modules/protocol/tests/ Unit + contract + library tests
docs/ARCHITECTURE.md Protocol design, payment flows, seams
docs/requirements/01-Current/ Product & engineering requirements SSOT
modules/marketing/ Launch sites (this folder is launch v002)

Build on K0

Ship a P2P transfer path

Start with onboard → fee estimate → initiate-payment. For corridor experiments, use S31 with us-us or us-in. Readiness endpoint shows which integrations are live in your environment.

Integration checklist

  • Run API with zero credentials
  • Hit /docs and /uat/readiness
  • Onboard two emails via CLI
  • Pay between them (ledger path)
  • Add Plaid / EVM keys for live rails
  • Corridor pilot with claim/escrow path