ALACTIC

Verifiable AI support agents on 0G: private TEE answers with on-chain-verified proof receipts

ALACTIC

Created At

ETHGlobal Mumbai

Project Description

Alactic lets any business create an AI customer-support agent from its own knowledge (FAQs, documents, website pages) and deploy it as a public chat page, an embeddable website widget, or on Telegram, WhatsApp, Slack and Discord, all powered by one shared runtime.

What makes it different is verifiability. Every customer-facing answer is generated on the 0G Compute Network in "Private" trust mode, meaning the model runs inside a hardware enclave (Intel TDX), and the request never silently falls back to a less private provider. For each answer, Alactic independently verifies the enclave's signature: it looks up the provider's service record on 0G Chain, fetches the signature for that chat, and recovers the signer, which must match the TEE signer registered and acknowledged on-chain. The result is shown as a badge and as a public proof receipt that anyone can re-check, with the model, provider address, TEE signer, cost, latency and an answer fingerprint.

We're explicit about what is and isn't proven. Verification shows where and by which model an answer was produced, not that it's correct, so every answer cites the knowledge passages it used and falls back to a business-defined answer when the knowledge doesn't cover a question.

Businesses sign in with their wallet (Sign-In with Ethereum). Customers chat with no wallet at all. Each agent has a planned public identity under alactic.eth on ENS. Extra features: knowledge-gap inbox, human handoff, agent test cases, voice notes and screenshots, and a daily owner briefing.

How it's Made

Stack: Next.js 16 (App Router, Cache Components) + TypeScript, Tailwind + shadcn/ui, wagmi + viem for wallet auth (SIWE with single-use nonces, domain binding and DB-backed sessions), PostgreSQL + pgvector (Supabase) with Drizzle ORM, Inngest for background ingestion, deployed on Vercel.

0G Compute (core): all customer-facing answers go through the 0G Compute Router's OpenAI-compatible API. We always pin the trust mode with the X-0G-Provider-Trust-Mode header (default "private" = TeeML providers) and request verify_tee. Embeddings for the knowledge base also run on 0G (qwen3-embedding-0.6b, private mode, 1024-dim vectors), and the default chat model is 0gm-1.0-35b-a3b (TeeML). Model choices are validated against 0G's live model and provider catalog, which also shows real-time provider health per trust mode.

Notable hack: in live testing on mainnet, the Router didn't return its documented tee_verified field, so we implemented 0G's verification procedure ourselves (mirroring the official SDK's processResponse): read the provider's Service record from the InferenceServing contract on 0G Chain (chain 16661) with viem, take the acknowledged TEE signer (honouring TargetSeparated), fetch {service.url}/v1/proxy/signature/{chatID} using the ZG-Res-Key header as chatID, and recover the EIP-191 signer. We also found that the signed payload is a hash of the end-to-end-encrypted exchange, so our UI states precisely that the proof covers the exchange, not the displayed words. Other live findings we handled: billing in USD micro-units, thinking models that need chat_template_kwargs to avoid spending tokens on reasoning (and leaked <think> text, which we strip), undocumented model_overloaded and trust_mode_mismatch errors, and a key restricted to private mode as defence in depth.

Security: tenant isolation is enforced in the database with composite foreign keys (org, agent) from sources → documents → chunks → conversations → inferences; published agent versions are immutable via a Postgres trigger; prompt-injection-resistant prompts (platform policy first, knowledge escaped as untrusted data, no tools); rate limits per visitor, IP and agent; a widget CSP frame-ancestors allowlist; webhook signature checks for every channel; connector credentials encrypted with AES-256-GCM. 199 automated tests.

background image mobile

Join the mailing list

Get the latest news and updates