convex-eve
Concepts

Threads and Eve sessions

Separate application conversations from Eve execution identities.

An application thread is the product-facing conversation. An Eve session is the durable execution identity. Its turns can call tools and specialist agents. Convex stores the thread and sanitized messages. Eve owns execution and history.

Delete a conversation

The host owns the Eve URL and service credential. It cancels the active turn, clears model history, and calls end() on the exact session. It waits for each control's complete settlement line before it sends the next control. Only then does it call agent.deleteThread(...) to delete the component's records.

A failed control keeps the Convex records available for recovery. A session that is already inactive needs no further retirement. Ending a session does not create a replacement conversation. Create a new application thread for that.

Upgrade an existing conversation

New generations use stream version 27. Generations made with Eve 0.48 have no version marker and remain read-only. Start a new thread to send messages with Eve 1.0.0-rc.7. Keep the original deployment available until its sessions finish. The v1 bridge does not delete bound legacy threads through the new endpoint.

Server binding

import { Agent } from "convex-eve";
import { components } from "./_generated/api";

export const coach = new Agent(components.eve, { agentId: "coach" });

Authenticate callers in host functions before passing a trusted scopeId and subjectId to the binding. The component checks both values for every thread.

React messages

import { useUIMessages } from "convex-eve/react";

const { results, status, loadMore } = useUIMessages(
	api.chat.listMessages,
	{ threadId },
	{ initialNumItems: 20 },
);

Messages use Eve's native text, file, tool, and interaction parts. Reasoning and full tool payloads are removed before persistence. Approval answers use interactionId with the approve or deny option.

On this page