Zap mounts a Next.js app withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gratitude5dee/Zap/llms.txt
Use this file to discover all available pages before exploring further.
withEve — Eve handles agent routing, tool dispatch, and channel management on top of the Next.js request lifecycle. All agent code lives under the agent/ directory. When a user message arrives, Eve loads agent/agent.ts for the model configuration, resolves the active skills, dispatches tool calls to the matching agent/tools/ implementations, and streams the response back through the configured channel.
Project Layout
Agent Configuration
agent/agent.ts is the Eve agent config entry point. It declares the model and reasoning level used for all agent turns:
model field accepts any provider-prefixed model string supported by Eve’s model router. The reasoning field controls chain-of-thought depth — use "medium" for the standard Zap agent and "high" only when debugging complex multi-step recipe authoring.
Root Instructions
agent/instructions.md defines the agent’s identity, contract, and pipeline grammar. The key sections are:
- Identity — Zap Operator, an Eve-native content agent for authoring, running, and compiling one-click generative video recipes
- Contract — rules for the creator path (deterministic
run_zap) vs. the dev/agent path (creative primitive tools, thensave_zap) - Zap Pipeline — the canonical grammar:
InitialFrame -> InitialGen -> InitialGenReViz? -> ExtendGen x N -> Zap.mp4 - Responses — surface run IDs, provider request IDs, current cost, stage, and next user decision; never claim a video is complete until run status is
doneand a final asset URL exists
Eve Docs Read Order
The full Eve documentation lives atnode_modules/eve/docs/. For Zap work, read in this order:
node_modules/eve/docs/introductionnode_modules/eve/docs/getting-startednode_modules/eve/docs/project-layoutnode_modules/eve/docs/agent-confignode_modules/eve/docs/skillsnode_modules/eve/docs/toolsnode_modules/eve/docs/channelsnode_modules/eve/docs/sandboxnode_modules/eve/docs/deployment
Useful Commands
eve:info is the fastest way to verify that Eve has picked up your agent.ts, resolved all tools and skills, and is pointing at the correct model. Run it after any structural change to agent/.
Eve Version Pin
Zap v1 pins Eve at0.15.1. Do not upgrade the eve package unless a blocking bug requires it — Eve introduces breaking changes in minor versions, and the Zap skill schema and tool contract are validated against this specific version.
zap validate against all skills before deploying.
Agent Sandbox
agent/sandbox/ is the Eve sandbox workspace — a managed directory where the agent can read and write files during execution. Tools like stitch_zap and extract_last_frame operate inside this sandbox via ctx.getSandbox(), which gives them an isolated filesystem and a sandbox.run() interface for executing ffmpeg commands without touching the host.
The sandbox is reset between agent sessions. Do not rely on sandbox-written files persisting across runs; use Convex or blob storage for durable asset references.
Eve Channels
agent/channels/eve.ts defines how the Zap agent communicates with clients. The channel uses the eveChannel factory from eve/channels/eve and configures three authentication strategies:
| Strategy | When it applies |
|---|---|
httpBasic | API clients and CI that authenticate with ZAP_BASIC_USER / ZAP_BASIC_PASSWORD |
vercelOidc | Production Vercel deployments — token is issued automatically by the Vercel OIDC service |
localDev | Local development — bypasses auth when running on localhost |
/studio connects to the agent through this Eve channel. Streaming responses, tool-call events, and run status updates all flow over this single channel definition.
