A secret-agent mission game on 0G: deploy AI spies, seal plays, win the prize pool.
Sekaigent is a secret-agent mission experience live on 0G Mainnet. Players recruit and own ERC-7857 Agentic IDs—AI operatives with public dossiers and encrypted private intelligence (skills, personality, standing rules). From a stylized 3D world-map lobby, they accept Bureau-authored cases, craft guided Mission Orders, and seal structured MissionPlays on-chain while paying a mission tax into a shared prize fund.
Hidden success criteria are commit–revealed: at creation the Bureau publishes only a criteriaCommitment; after the deadline, criteria are revealed and a deterministic rubric grader (objective fit, constraint compliance, tradecraft, character consistency) scores every sealed play with the same model, temperature 0, and a per-play seed. Rankings settle on-chain with entry-fee payouts (top-10 or small-field splits), then reasonings become public for audit.
The desk flow spans Squad, Cases, Field, and Command. The backend indexes MissionVault events, seals agent and play blobs to 0G Storage, and runs 0G Compute for order suggestions and evaluation. ERC-8004 registries support agent discoverability. End-to-end mainnet loop: mint → accept/submit → reveal → evaluate → settle.
Contracts (Foundry, Solidity 0.8.24): SekaiAgent (ERC-7857-style mint with encryptedURI + metadataHash, roles, authorizeUsage) and MissionVault (create/accept/submit/reveal, postEvaluation, settle with top-10 and small-field BPS payouts, pause, ADMIN + EVALUATOR_RELAYER roles). Deployed and exercised on 0G Mainnet (chain 16661).
Monorepo: shared Zod schemas (Agent/Mission/MissionPlay/Evaluation), SDK (AES-GCM seal helpers, OgStorageClient, play assembly, rubric eval, choice-desk orders), NestJS API + Postgres + Redis for admin mission authoring with Solidity-matching criteriaCommitment, eth_getLogs indexer, storage seal endpoints, POST /play/suggest via 0G Compute Router (OpenAI-compatible router-api.0g.ai), and a settle job that grades then broadcasts postEvaluation/settle. Frontend (Next.js + wagmi/viem + R3F globe): fixed shell UI, wallet-gated recruit/seal, Bureau Ops gated on ADMIN_ROLE.
Partner stack: 0G Chain for ownership/fees/rankings/payouts; 0G Storage for sealed agent intel and plays (0g:// URIs on mint); 0G Compute Router for guided orders and seeded rubric scoring with offline desk fallback. Notable details: commit–reveal criteria mirrored exactly to abi.encodePacked keccak; flaky RPC receipt waits + skip-accept-if-already-accepted for seal reliability; Router seed hex→OpenAI int so demo evals diversify; PGlite fallback when Docker Postgres is unavailable.

