Skip to main content
reopt Handbook
reopt Handbook
Enterprise Eve Agent Development

Core Architecture

Ch1. Eve Mental ModelCh2. Source Code AtlasCh3. Project Layout and DiscoveryCh4. Compiler and Runtime Graph

Agent Quality Design

Ch5. agent.ts, Models, CompactionCh6. Context, Skills, Dynamic CapabilitiesCh7. Tools, Approval, ConnectionsCh8. Sandbox Secure Runtime

Operational Runtime

Ch9. Channels, Auth, StreamingCh10. Subagents, Workflows, Remote AgentsCh11. Schedules, State, HooksCh12. Evals and Quality Gates

Production Operations

Ch13. Observability and DeploymentCh14. Enterprise PatternsCh15. Migration and Governance

Appendix

Official Docs CrosswalkVerification ReportUpdates
Handbook›엔터프라이즈 Eve 에이전트›Ch9. Channels, Auth, Streaming
한국어English

Ch9. Channels, Auth, Streaming

How Eve channels own session creation, continuation tokens, route auth, NDJSON streams, and frontend/client integration.

Key takeaways

  • A channel is the agent's front door: auth, input normalization, session cursor ownership, and delivery.
  • Route auth fails closed, but session ownership ACLs are still the application/channel's responsibility.
  • A continuation token is not a queue; ordering and burst handling belong in the channel/app layer.

If a channel is wrong, model quality and tool safety cannot save the system. Channels decide who can enter, which session they resume, and where results or human prompts are delivered.

Channel Responsibilities

ResponsibilityDescription
input normalizationturn Slack, HTTP, GitHub, etc. into user messages
continuation ownershipmap a thread/conversation/job to a continuation token
deliverysend responses, failures, approvals, and auth prompts

The default Eve HTTP channel exposes POST /eve/v1/session, POST /eve/v1/session/:sessionId, and GET /eve/v1/session/:sessionId/stream.

Default Eve HTTP Channel

If you do not author agent/channels/eve.ts, Eve provides a framework default. You usually author the file to customize route auth.

agent/channels/eve.ts
import { eveChannel } from "eve/channels/eve";
import { localDev, vercelOidc } from "eve/channels/auth";

export default eveChannel({
  auth: [localDev(), vercelOidc()],
});

Official Auth & Route Protection distinguishes framework default from scaffolded auth:

CaseAuthMeaning
no authored eve.ts[localDev(), vercelOidc()]localhost and Vercel OIDC callers only
eve init scaffold[localDev(), vercelOidc(), placeholderAuth()]structured production 401 until real auth is configured

placeholderAuth() is a guardrail, not a production auth policy.

Route Auth Fails Closed

AuthFn resultMeaning
returns SessionAuthContextsuccess, stop the walk
returns null/undefinedcontinue to next AuthFn
throwsreject with 401/403
all skipreject with 401

Anonymous access requires explicit none().

Route Auth Is Not Session Ownership

If multiple users can call the same Eve route, you still need a session ownership check.

Danger:

any signed-in user -> Eve route
knows sessionId or continuationToken
can follow up or stream another tenant session

Recommended structure:

LayerStandard
route authauthenticate user or service
session mappingstore sessionId -> owner/tenant/channel
follow-up guardprincipal must own or participate in session
stream guardstream endpoint enforces the same ownership

Continuation Token Is Not A Queue

continuationToken resumes the current session hook. It is not a FIFO queue. If many messages arrive concurrently, ordering must be handled outside Eve.

Operating patterns:

  • send the next user turn after session.waiting
  • use per-session queues for bursty chat platforms
  • separate approval responses from new messages
  • persist the latest session cursor and reject stale usage

NDJSON Stream

GET /eve/v1/session/:sessionId/stream returns newline-delimited JSON events.

EventMeaning
session.starteddurable session created
turn.starteduser turn started
step.startedmodel step started
actions.requestedtool/subagent calls requested
action.resultaction result
input.requestedapproval, question, or OAuth needed
subagent.calledchild session available
message.appendedassistant text delta
message.completedassistant message completed
result.completedstructured output completed
step.failed/turn.failed/session.failedfailure boundary
session.waitingwaiting for next input

Reasoning events and tool results may need privacy and retention controls.

Event Dispatch Order

  1. Channel handler runs and updates adapter state.
  2. Stream event is durably recorded.
  3. Hooks run.
  4. Dynamic tool/skill/instruction resolvers run.

This lets dynamic resolvers depend on channel metadata projected by channel handlers.

Custom Channels

agent/channels/internal-webhook.ts
import { defineChannel, POST } from "eve/channels";

export default defineChannel({
  routes: [
    POST("/incident", async (req, args) => {
      const incident = await req.json();
      args.waitUntil(
        args.send(`Investigate incident ${incident.id}`, {
          auth: {
            authenticator: "incident-service",
            principalType: "service",
            principalId: incident.actorId,
            attributes: { incidentId: incident.id },
          },
          continuationToken: `incident:${incident.id}`,
        }),
      );
      return new Response("ok");
    }),
  ],
});

Review:

  • HMAC/JWT/OIDC raw request authentication
  • never trust body-supplied principals
  • constant-time signature comparison
  • continuation token stability
  • file upload fetch policy
  • failure delivery

Official Channel Integrations

ChannelOfficial docsEnterprise point
Eve HTTPevesession and stream routes
CustomCustom ChannelsHTTP/WS, metadata, cross-channel hand-off
SlackSlackthread anchoring and private auth challenges
DiscordDiscordslash commands, components, modals
GitHubGitHubPR diff context and sandbox checkout
LinearLinearAgent Sessions and Agent Activities
TeamsMicrosoft TeamsBot Framework and Adaptive Cards
TelegramTelegraminline-keyboard HITL
TwilioTwilioSMS/voice compliance review

Client And Frontend

Use TypeScript SDK for scripts, tests, and server-to-server calls. Use frontend helpers for browser chat or agent UI.

TopicStandard
resumable sessionspersist the full cursor: sessionId, continuationToken, streamIndex
clientContextper-turn ephemeral context, not durable session history
HITL responseanswer input.requested with inputResponses on the same session
framework integrationNext.js withEve, Nuxt module, SvelteKit plugin

Checklist

ItemStandard
route authno placeholder in production
session ACLprincipal and tenant mapping
stream ACLstream endpoint protected
continuationlatest cursor persisted; stale rejected
orderingper-session queue if needed
metadataproject only safe values
signaturesconstant-time verification
eval401, 403, and valid stream cases

Related docs

Ch1. Eve Mental Model

Understand Eve as filesystem authoring, durable workflow execution, runtime harness, and channel protocol.

Ch15. Migration and Governance

Migrate existing agents into Eve and establish enterprise governance for agent portfolios.

Next.js Patterns

Enterprise Project Architecture · Use App Router, server boundaries, data fetching, and route ownership consistently.

Ch8. Sandbox Secure Runtime

Turn Eve sandbox trust boundaries, backends, network policy, credential brokering, and workspace lifecycle into operating standards.

Ch10. Subagents, Workflows, Remote Agents

Use Eve built-in agent tool, declared subagents, remote agents, and experimental Workflow for multi-agent design.

On this page

Channel ResponsibilitiesDefault Eve HTTP ChannelRoute Auth Fails ClosedRoute Auth Is Not Session OwnershipContinuation Token Is Not A QueueNDJSON StreamEvent Dispatch OrderCustom ChannelsOfficial Channel IntegrationsClient And FrontendChecklist