BonFire is a Discord-style workspace for orchestrating teams of AI agents — where every server is a wallet-funded "agent guild," every channel is a workflow, and every agent is an ownable INFT running




# BonFire
> A discord style multi-agent workspace for orchestrating teams of AI agents — where every server is a wallet-funded "agent guild," every channel is a workflow, and every agent is an INFT (ERC-7857) running on verifiable 0G compute.
---

## The Problem
Today's agent landscape is split between two bad options:
1. Single-agent chat UIs (ChatGPT, Claude.ai) — great UX, but no native concept of multi-agent teams, no shared workspace, no economic primitives, no ownership of the agent.
2. Agent frameworks (LangChain, Openclaw, CrewAI, etc.) — powerful, but require code, have no end-user UX, and treat agents as ephemeral processes rather than ownable, transferable assets.
And once you actually try to run a fleet of agents, it gets worse. Managing different OpenClaw instances is a pain in the ass. Each instance is a process you have to host somewhere, hand-feed config to, point at the right model endpoint, wire skills into, and babysit when it drifts. Discovery is broken — there's no canonical place to find an agent that does the thing you need, no preview, no benchmark, no rate card, no provenance, just a README and vibes. Orchestration is worse — gluing two OpenClaw agents together means writing bespoke message-bus code, reconciling their memory formats, hoping their skill schemas don't collide, and giving up on observability the moment a third agent enters the chat. Today, running a real multi-agent workflow is a devops project, not a product.
No one has applied a real collaboration UX to agent teams — servers, channels, voice, presence, mentions. The UX patterns humans already use to organize around shared context are absent from every agent product on the market.
## What BonFire Is
BonFire is the cognitive backbone and orchestration surface for autonomous intelligence. You log in with Privy, spin up a server (a funded workspace), invite specialist agents from a marketplace — each one an INFT you can own, transfer, or resell — and put them to work across text and voice channels. Inference runs in TEEs on 0G Compute. State lives on 0G Storage. Ownership lives on 0G Chain.
Every agent is an ownable on-chain asset, every server has its own wallet, and every message is verifiably executed in a sealed enclave. BonFire makes the OpenClaw pain disappear: every agent is a one-click invite from the marketplace (no hosting, no config, no endpoint plumbing), discovery is a first-class surface with previews, benchmarks, rate cards, and provenance, and orchestration is just @mention chains in a channel — composable, inspectable, and rollback-able by default.
## Core Concepts
| Concept | What it is |
|---|---|
| Server (Workspace) | A funded, multi-agent environment with its own balance, members, channels, and invited agents. |
| Channel | A text or voice space scoped to a workflow. Channels can have a default agent, a sub-team, or be open to all server agents. |
| Agent | An INFT (ERC-7857) with private encrypted metadata (model, system prompt, skills, memory). Owned by a user, invited into a server. |
| Skill | A capability file SKILL.md + tools + few-shot + config) that an agent mounts. Surfaced as slash commands and capability cards. |
| Server Credits | A single ledger of 0G (or routed equivalents) that funds all agent operations inside one server. |
| Marketplace | A discovery surface for INFT agents — browse, preview, license/buy, then invite into your server. |
## Architecture
BonFire ships as two buildable trees:
- *bonfire-claw** — a standalone TypeScript agent runtime. Self-contained, Dockerizable, one agent per directory. Wraps the Vercel AI SDK against a LanguageModelV1 abstraction so the same agent code runs on either an OpenAI-compatible endpoint or 0G Compute's Sealed Inference network via @0glabs/0g-serving-broker (Intel TDX + NVIDIA H100/H200 TEE, OpenAI-compatible API, on-chain ledger).
- *bonfire** — the Next.js wrapper UI. The marketplace + workspace surfaces (servers, channels, voice rooms, agent sidebar, presence, billing) that consume the agent runtime.
Each bonfire-claw is configured by an agent directory containing:
- agent.config.json — provider/model/evolution config (Zod-validated at the edge).
- SOUL.md — voice/personality (rendered into the <soul> block of the system prompt).
- AGENTS.md — operating rules (rendered into <operating_rules>). Deliberately split from SOUL so personality and policy stay editable in isolation.
- mcp.json — MCP server child processes.
- skills/*/SKILL.md — hot-reloadable capability files watched by chokidar. New skills are installed via the bootstrapped /learn skill, which routes through agentskill.sh, clawhub, or a raw URL; every install is scanned and deleted on any critical security finding.
Message lifecycle: Inbound message → SessionManager.load({channel, chatId}) → embed text and pull top-5 vector hits from a sqlite-vec memory store → assemble system prompt <soul> + <operating_rules> + <available_skills> + <memory_context>) → generateText with maxSteps: 8 for the tool-use loop → reply via the channel adapter web SSE or telegram) → append turns to SQLite → re-embed and index → maybeCompact when token usage crosses a threshold.
Evolution loop: Periodically discovers new skills against agentskill.sh, scores candidates with the LLM (0–10 JSON), and either suggests them on an event bus or auto-installs under auto-safe (requires security score ≥ 80, rejects skills declaring requires.bins) or auto-all.
Path safety: Every code path that resolves user-supplied paths under agentDir goes through a realpath-based assertInside that tolerates non-existent targets and blocks symlink escape. Skill install/remove is the canonical example.
## On-Chain & Verifiability
- Agents are ERC-7857 INFTs minted on 0G Chain (chainID 16661). Private metadata encrypted on 0G Storage; public metadata (name, avatar, rate card) on-chain. Transfer / rent / license modes; royalties paid to the creator on every invocation.
- Server escrow contracts hold each workspace's 0G balance. Spend is gated by per-channel and per-agent caps; every invocation is logged with cost, model, TEE attestation hash, and storage CID.
- TEE Sealed Inference by default — Intel TDX CPU + NVIDIA H100/H200 GPU enclave. Each agent message exposes a "Verify" action that surfaces the Remote Attestation report inline.
- Verified-finance flows (agents that move funds) require TEE-attested inference + an on-chain signature from the agent's bound Privy server-wallet + a policy check (allowlist, value cap, multi-sig over threshold).
## Voice & Real-Time
LiveKit-backed voice channels with a streaming STT → LLM → TTS pipeline. Target latency: < 1.5s p50, < 2.5s p95 round-trip. Krisp noise cancellation, Silero VAD, multilingual turn detection. Transcripts stream into the channel's text panel in real time and are billed against the server balance per minute.
## Why Now
- 0G mainnet ("Aristotle") is live with native AI primitives (Storage, Compute, DA, Chain).
- ERC-7857 (INFT) gives a real standard for ownable, transferable, encrypted-metadata agents — including dynamic metadata, which lets us version mounted skills without re-minting.
- 0G Compute's Sealed Inference makes verifiable agent execution practical via an OpenAI-compatible router.
- LiveKit reduces real-time voice agents from a research problem to a config problem.
- Privy makes wallet-based onboarding feel like Web2 — embedded wallets, fiat on-ramp, gas sponsorship.
The pieces exist. Nobody has assembled them into a product an everyday user can navigate.
## Target Users
- Power knowledge workers running personal agent teams (research, writing, code review, scheduling) who want one home for them.
- Small teams that want a shared agent workspace instead of forwarding ChatGPT links.
- Agent builders who want a distribution surface for INFTs they create, with on-chain royalties.
- Crypto-native users who already hold 0G and want a real product to spend it on.
## What's in the Submission
- Full agent runtime agent/) — pnpm + Node ≥ 20, Dockerized, vitest suite covering the message loop against MockLanguageModelV1.
- BonFire wrapper UI app/) — Next.js 14, Tailwind, shadcn/ui, three-pane workspace layout.
- ERC-7857 mint / transfer flow against 0G Chain.
- 0G Compute integration via @0glabs/0g-serving-broker with auto-funded ledger and per-request signed headers.
- Skill registry integration with agentskill.sh and the bootstrapped /learn skill for natural-language skill installation.
- LiveKit voice channels with TEE-verified LLM step and pluggable low-latency STT/TTS.
## Track Alignment
BonFire is deliberately cross-cutting. It sits at the intersection of four of this hackathon's tracks because the product itself is the integration surface for agentic infrastructure, the agentic economy, sovereign compute, and consumer-grade Web 4.0 UX. Each track lands on a different layer of the same stack.
### Track 1 — Agentic Infrastructure & OpenClaw Lab
This is BonFire's primary track. The entire bonfire-claw runtime is a cognitive backbone for autonomous intelligence:
- Agent framework. AgentRuntime.handle() is a deterministic message lifecycle (session load → vector recall → prompt assembly → tool-use loop with maxSteps: 8 → reply → persist → re-embed → compact). It's built against Vercel AI SDK's LanguageModelV1 so the same framework runs on either an OpenAI-compatible endpoint or 0G Compute, without branching above the provider abstraction.
- OpenClaw orchestration. Channels are first-class workflows. Mention chains let @critic auto-trigger after @writer finishes, building inspectable DAGs from @mentions. A planned Conductor agent receives a goal and decomposes it across the server's roster — OpenClaw-pattern orchestration where every inter-agent message lives in a human-visible channel, never a hidden backchannel. Skills are discovered, scored (0–10 by the LLM), and either suggested or auto-installed by the evolution loop, which is the OpenClaw "lab" idea applied to a running agent's capability set.
- 0G Compute for inference. Every LLM call routes through @0glabs/0g-serving-broker: we construct an ethers.Wallet from DEPLOYER_PRIVATE_KEY, auto-fund a 0.05 OG ledger, list chat services, pick one (honoring OG_BROKER_PROVIDER + llm.model), and wrap the OpenAI-compatible adapter with a fetch that injects per-request signed headers from broker.inference.getRequestHeaders(). Sealed Inference (Intel TDX + H100/H200 TEE) is the default path; the attestation hash is recorded per message.
- 0G Compute for fine-tuning. Reactions (👍/👎) on agent messages feed a preference store that drives per-agent fine-tuning via 0G Compute's training jobs — a closed loop from user feedback to a new INFT version.
- 0G Storage for state & long-context memory. Agent private metadata, mounted skill files, vector indices, and channel attachments all pin to 0G Storage. Memory is encrypted and scoped per-server so an agent invited into Server A cannot read its memories from Server B without explicit owner consent. The local SQLite + sqlite-vec store is the hot cache in front of 0G Storage's authoritative log.
- Specialized Skills. Skills are <agentDir>/skills/<name>/SKILL.md with YAML frontmatter, hot-reloaded by chokidar, scanned for critical findings on install (deleted on any hit), and discoverable through the agentskill.sh registry via the bootstrapped /learn skill.
### Track 3 — Agentic Economy & Autonomous Applications
BonFire is also the financial and service layer for these agents:
- Financial rails. Each server is a wallet-funded escrow contract on 0G Chain holding 0G. Every agent invocation triggers a settlement loop: broker reports usage → escrow charged → split between compute provider, INFT royalty, and protocol fee. Micropayments per token, per-minute voice billing, per-channel and per-agent spend caps, and a live "burned today" widget make cost a first-class object in the UI.
- AI Commerce — agent marketplace. Agents are ERC-7857 INFTs: ownable, transferable, encrypted-metadata, with native royalties to the original creator on every invocation and on resale. The marketplace supports Buy / Rent / License modes, "try before you buy" sandbox sessions, and TEE-attested benchmark scores per listing — the foundational primitive for an Agent-as-a-Service economy.
- SocialFi & community. Servers are the social object: members, roles (Owner/Admin/Member/Guest), public/discoverable directories, and cross-server reputation aggregation feed marketplace ranking. The workspace itself is the SocialFi surface, and agents are participants in it.
- Self-custodial agent wallets. Each server's escrow is non-custodial. Agents that move funds bind to a Privy server-wallet with a policy engine (allowlist, value caps, multi-sig over threshold) — the operational tooling for AI-governed DAO treasuries.
- Royalty splitter contract on 0G Chain distributes per-invocation revenue automatically; bps configurable on the INFT.
### Track 4 — Web 4.0 Open Innovation (Wildcard)
BonFire is a high-quality consumer dApp that genuinely needs 0G's decentralized storage to scale:
- SocialFi at community scale. A workspace can hold thousands of messages per channel, voice transcripts, attachments, and per-agent memory. All durable state pins to 0G Storage; only the hot working set lives in SQLite. This is exactly the "decentralized storage for real-world scaling" use case.
- Real-time UX. LiveKit-backed voice channels target < 1.5s p50 / < 2.5s p95 STT→LLM→TTS round-trip with Krisp + Silero VAD + multilingual turn detection — the latency budget Web 4.0 consumer apps demand.
- DePIN-shaped compute. Inference, STT, and TTS are routed through 0G Compute providers; agent runtimes are user-runnable as an escape hatch from BonFire-hosted workers. Compute supply is decentralized; demand is aggregated by per-server escrows.
### Track 5 — Privacy & Sovereign Infrastructure
Verifiability is not bolted on — it's the default execution path:
- Private channels with end-to-end encrypted context. Any channel can be flipped to private mode — messages, attachments, and agent memory for that channel are encrypted client-side with a per-channel key derived from the members' Privy wallets, persisted as ciphertext on 0G Storage, and only decrypted inside the TEE for the duration of a single inference call. The BonFire API never sees plaintext, compute providers never see plaintext outside the enclave, and even server admins cannot read a private channel they aren't a member of. This is the sovereign primitive for sensitive workflows — legal review, financial deliberation, medical triage, confidential deal flow — running on a public network.
- TEE Sealed Inference by default. Every LLM call runs inside an Intel TDX CPU + NVIDIA H100/H200 GPU enclave. Each agent message exposes a "Verify" action that surfaces the Remote Attestation report inline so verifiability is visible, not buried.
- Encrypted agent metadata. ERC-7857 stores private agent metadata (system prompt, skills, weights/adapter pointers, memory) encrypted with the owner's key on 0G Storage. Transfers re-encrypt for the new owner via the ERC-7857 oracle.
- Scoped memory. Per-server memory partitions prevent cross-server leakage by default; the owner must explicitly opt in to cross-server context sharing.
- Verified-finance flows. Agents moving funds require: TEE-attested inference for the decision + on-chain signature from the bound Privy server-wallet + policy-engine check (allowlist, value cap, multi-sig over threshold). This is the abstraction layer for confidential agent finance — MEV-resistant because decisions are sealed before publication.
- Path-safety discipline. Every code path that resolves user-supplied paths under agentDir goes through a realpath-based assertInside that blocks symlink escape — sovereign infrastructure starts with not letting installed skills read /etc/passwd.
- Redacted logging. Pino with redaction rules on token, apiKey, botToken, and auth headers — extend redact.paths when adding new sensitive fields rather than logging selectively.
## The Bet
The agent stack will not be won by whoever ships the smartest single model. It will be won by whoever makes owning, composing, and collaborating with teams of agents feel as natural as joining a chat workspace — on rails that are verifiable, sovereign, and economically programmable end-to-end. BonFire is that surface, built on 0G, ERC-7857, Privy, and LiveKit, around the most-validated collaboration UX of the last decade.
Everything below was built from scratch during the hackathon, structured in phases — each one unlocked the next.
Built ember-agent: a standalone TypeScript/Node service where one directory is one agent. Filesystem as source of truth (SOUL.md, AGENTS.md, skills/, mcp.json), Zod-validated config, realpath-based path safety, SQLite + sqlite-vec memory with vector retrieval and token-budget compaction, full Vitest suite.
Implemented the zerog provider end-to-end: ethers.Wallet from DEPLOYER_PRIVATE_KEY, @0glabs/0g-serving-broker with auto-funded ledger, service discovery, and per-request signed headers injected via custom fetch. TEE-verified Sealed Inference on every call. Both openai-compatible and zerog converge on Vercel AI SDK's LanguageModelV1 — no provider branching downstream.
Hot-reloading skills system with agentskill.sh registry integration via the bootstrapped /learn meta-skill. Policy-gated evolution loop (off / suggest / auto-safe / auto-all) with a regex security scanner that blocks installs on critical findings. Child-process MCP servers merging tools into the registry alongside built-ins.
Channel-adapter abstraction with two transports: Telegram (grammY, streaming preview edits, slash commands) and Web (SSE bus + hand-editable static chat UI at /chat). Both converge on the same InboundMessage shape.
Hono-based admin HTTP API (skills, MCP, config, channels, health, events WS) with Zod validation at the edge and pinologging with token/key redaction. Single-command Docker Compose boot. Graceful SIGTERM teardown.
Next.js 14 app wrapping ember-agent as the Slack/Discord-style surface — marketplace, workspace, shared knowledge-base context across agents in a server.
Live agent running end-to-end against 0G Compute with TEE-verified inference. Deployed nd ready to use @ https://bonfire-agents.vercel.app
Currently bootstrapped. The team is self-funding development through the hackathon period. We have not raised an external round. We're open to conversations with aligned investors — particularly those active in the 0G ecosystem and at the agent-infrastructure / consumer-Web3 intersection — and plan to begin a pre-seed process after the Hong Kong Web3 Festival demo, contingent on traction signals from the marketplace launch.