eve on Supabase
Run eve agents on Supabase with the Workflow World on Postgres, Supabase sign-in on eve routes, tools that run as the user, approvals, queue schedules, MCP and OpenAPI connections, memory, sessions in the chat tables and the inbox as a channel.
AI chat tables, memory in the memory and knowledge blocks, tokens in a credential provider, and the durable runs in the Supabase World.
pnpm add eve @workflow/world @workflow/world-postgres pg
pnpm better-supabase add workflow-sdk ai-chat memory knowledge credentials inbox
# for tools behind approvals and for schedules
pnpm better-supabase add approvals queueeve is an optional peer (>=1.3.0 <2). The entry types eve structurally
and imports nothing from it at load time; the memory provider loads
eve/tools the first time it builds its tools. eve runs on Node, so the
entry is Node-only, like the World. The inbox channel also needs chat
(see Chat SDK).
| Export | Plugs into | Does |
|---|---|---|
supabaseAuth | eveChannel({ auth }) and other channel auth | verifies the Supabase session locally and maps the user to an eve principal |
supabaseJwtAuth | mcpChannel({ auth }) and other channel auth | the same for a bearer access token only, with an RFC 6750 Bearer challenge |
supabaseTool | defineTool() | runs the tool's execute as the session's user, under row-level security |
eveContext | server.forContext() | builds the user's request context with the agent's act claim |
approvalPolicy | a tool's approval | files each call as an approvals block request and settles it per decision |
tenantToolApproval | a tool's approval | applies the tenants' auto, ask and deny tool policies |
strictestApproval | a tool's approval | combines approval policies: the strictest request wins, all responses allow |
queueSchedules | defineSchedule({ run }) | enqueues the queue block's due schedules and starts a session for each job |
scheduleAgent | the queue block | writes a schedule that sends a prompt to a channel target, per tenant |
agentJobHandler | drain() or a queue route | starts a session for one eve queue job, as the job's user |
jobAuth | to(...).send(..., { auth }) | the session auth for a job: its user as a Supabase principal, else the app's |
eveAgentJob | createQueue({ queues }) | the Standard Schema of an eve queue job |
queueScheduleProvider | defineDynamicSchedules({ provider }) | stores eve's dynamic schedules in a queue block scheduler |
queueDynamicSchedules | defineSchedule({ run }) | fires the due dynamic schedules into their definition's auth and run |
eveScheduleRun | createQueue({ queues }) | the Standard Schema of an eve_schedules queue job |
credentialAuth | defineMcpClientConnection({ auth }) | reads connection tokens from Vault, Vercel Connect or your provider |
openApiAuth | defineOpenAPIConnection({ auth }) | the same tokens for an OpenAPI service, sent as a bearer token |
tenantArgument | a connection's toolCall.providedArguments | fills one argument with the session's organization, hidden from the model |
supabaseMemory | defineMemory({ provider }) | recalls core and archival memory and tenant documents per turn |
supabaseDocumentBackend | fileMemory({ backend }) | stores eve's file memory in the memory module's memory_documents table |
supabaseSkillScopes | customSkills({ scopes }) | keeps custom skills inside the tenant: personal, persona, channel and organization scopes |
persistSessions | defineHook({ events }) | wakes the session sync when eve records an event (wake-only) |
createSessionSync | the eve_session_sync queue | projects sessions into ai_chats, ai_messages and ai_runs from a cursor |
sweepSessions | an eve schedule | queues the sync for sessions the triggers missed |
sessionHistory | a session on a new eve version | returns a synced session's messages in eve's history shape |
openSessions, endStrandedSessions | a deploy script | lists and ends sessions a new eve version can't resume |
routeInbox | chatSdkChannel() over inboxAdapter | hands inbox conversations in bot mode to eve, with the contact as principal |
inboxConnectionWebhook | a route per channel connection | verifies each request with its connection's credential and stores the event |
inboxHandoff | a schedule or waitUntil | stores the message and sends bot-mode conversations to eve, keyed by message |
inboxRunAs | supabaseTool({ runAs }) | runs an inbox session's tools as a service user in the conversation's tenant |
inboxReplies | createSessionSync({ reply }) | sends each reply as a bot message, or stores it as an ai draft |
Guide
| Page | Covers |
|---|---|
| The World | delivery modes, vercel-queue, connection modes, the key ring, purge, versions |
| Sign-in | supabaseAuth, bearer tokens and the memberships claim |
| Tools | supabaseTool under row-level security and permission scopes |
| Approvals | approvalPolicy, strictestApproval and approval scopes |
| Schedules | queue schedules, dynamic schedules, the ai-schedules mirror |
| Connections | MCP and OpenAPI tokens |
| Memory | recall and file memory |
| Sessions | the projection, sync, sweep, history and upgrades |
| Inbox | the inbox as an eve channel |
The eve example wires all of them into a Next.js app. The breaking changes of this line are in the 0.79 to 0.80 guide.
Limitations
- A
turn.startedthat eve redelivers after itsturn.settledopens a second run row. Redeliveries before the turn ends are idempotent. - The adapter keeps no eve session id or stream index of its own: the chat id comes from the session id, and a resumed session reads from stream index 0.
- Recall and capture records sit in
memory_documentsunder the scopeeve-opsand expire after 7 days;memory.documents.purge()deletes them. - A decision made in the approvals block's own UI doesn't reach eve's open prompt. The prompt settles when someone answers it in eve, and a replayed call reads the request's final status.
queueSchedulesstarts the sessions from the eve schedule's own task, so a drain is bounded bybudgetMs(50 seconds by default). Jobs left over wait for the next minute.- The tested range starts at eve 1.2.0, which peers on
@vercel/connect2.9 and bundles Workflow 5.7 (ADRs 1023 and 1097). vercel-queuedelivery, the Vercel build and the live inbox channel have not run against real services (seedocs/agents/eve.mdin the repository).
Last updated on
Identities
Run bot jobs as the chat author's linked user, decide approval buttons through the authorization provider, and link approval prompts to the app.
The World under eve
Select the Supabase World for eve, choose how deliveries reach the flow route (poll, pg_net or vercel-queue), the connection mode, the encryption key ring and the purge, and see which eve versions are supported.