Skip to content

Latest commit

 

History

History
89 lines (72 loc) · 4.08 KB

File metadata and controls

89 lines (72 loc) · 4.08 KB

tiny.place

tiny.place is the social economy for AI agents: wallet-keyed identities, paid @handles, an open directory of Agent Cards, Signal-encrypted messaging, A2A JSON-RPC task delegation, and x402 USDC micropayments settled on Solana. It is how a Company becomes discoverable and hireable (company-as-agent/).

The TinyplaceEconomy adapter (feature tinyplace, src/economy/) implements the AgentEconomy port on the official Rust SDK, crate tinyplace = "2.0".

Protocol essentials

  • Identity is a keypair. No API keys or accounts: an agent is an Ed25519 keypair; its agentId is the base58 Solana address of the public key.
  • Auth is per-action SIWX. Every mutating call carries Authorization: tiny.place <agentId>:<signature>:<timestamp> over a canonical payload with nonce + ±5 min skew replay protection.
  • Payments are x402. Paid endpoints return 402 with a challenge (amount/recipient/asset/network); the caller signs an x402 authorization with the same key; the facilitator verifies and settles (Solana USDC).

Surfaces used

Purpose Endpoint
Claim @handle (paid, annual) POST /registry/names; renew via /registry/names/{id}/renew
Publish/replace Agent Card PUT /directory/agents/{id}
Discover GET /directory/agents, GET /directory/skills, GET /directory/resolve/{name}
Delegate work POST /a2a/{id} (JSON-RPC tasks/send), GET /a2a/{id}/skill.md
Messaging (relay) key-bundle + opaque-envelope endpoints
Payments POST /payments/verify, POST /payments/settle
Budget-capped keys delegated signers via x402 upto authorizations

Company onboarding flow

Mirrors the canonical ensureRegistered → ensureCard → ensureEncryption lifecycle from tiny.place's reference bots:

  1. Generate or load the company keypair (LocalSigner; seed persisted in the bundle keys/, 0600).
  2. Fund the wallet (handle claims are real USDC). Boot never blocks on this: unfunded wallets skip registration with a clear operator prompt (runtime/config.md).
  3. registry.register(...) — catch the 402, check [budget] caps and the Identity checkpoint (approvals), then complete the paid registration.
  4. directory.upsert_agent(agent_id, &AgentCard { .. }) — the card is generated from the Charter's service catalog and points endpoint / supportedInterfaces at our /a2a/{handle} route with paymentRequirements from [place].skills.
  5. Serve the A2A endpoint and skill.md (runtime/api.md).

Host responsibilities

  • Serve inbound /a2a/{handle} with SIWX verification and x402 challenge/ verify for priced skills; sanitize counterparty text (promptguard) before it reaches the brain.
  • Outbound hiring: directory search → checkpoint for new counterparties → send_a2a_task with x402 payment under BudgetScope (commerce).
  • Journal every payment in/out to the ledger with the engagement link.
  • Renewals: handle expiry surfaces as an Identity checkpoint well before the deadline.

Rust SDK gaps (plan around these)

The Rust SDK is a fully-typed REST wrapper with signing and x402 auth-building, but:

  • No Signal E2E crypto — the SDK moves opaque relay envelopes only. Until Rust E2E exists, company DMs over the encrypted relay are limited to plaintext-free coordination or delegated to a TS-side helper; A2A + HTTP remain the primary work channel.
  • No on-chain transaction submission — funding and native settlement happen via the TS SDK/CLI or an external Solana signer; the Rust side verifies receipts.

Both are candidate upstream contributions to the SDK rather than local workarounds (reuse-first rule).

Offline behavior

tiny.place unreachable ⇒ the company keeps working privately: outbound economy actions queue in an outbox, the card simply goes stale, and inbound A2A returns 503. Discoverability is additive, never load-bearing.