eve 0.10.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +14 -0
  3. package/dist/src/cli/banner.d.ts +6 -3
  4. package/dist/src/cli/banner.js +1 -1
  5. package/dist/src/cli/commands/init.js +1 -1
  6. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  7. package/dist/src/cli/run.js +1 -1
  8. package/dist/src/evals/runner/run-evals.d.ts +1 -1
  9. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  10. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  11. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +2 -1
  12. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  13. package/dist/src/execution/sandbox/bindings/vercel-errors.d.ts +1 -0
  14. package/dist/src/execution/sandbox/bindings/vercel-errors.js +1 -2
  15. package/dist/src/execution/sandbox/bindings/vercel.d.ts +0 -5
  16. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  17. package/dist/src/harness/input-requests.d.ts +20 -1
  18. package/dist/src/harness/input-requests.js +1 -1
  19. package/dist/src/harness/tool-loop.js +1 -1
  20. package/dist/src/internal/application/package.js +1 -1
  21. package/dist/src/protocol/message.d.ts +11 -2
  22. package/dist/src/protocol/message.js +2 -2
  23. package/dist/src/public/next/index.d.ts +1 -7
  24. package/dist/src/public/next/index.js +1 -1
  25. package/dist/src/public/next/vercel-output-config.js +1 -1
  26. package/dist/src/setup/scaffold/create/project.js +1 -1
  27. package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
  28. package/dist/src/setup/scaffold/create/web-template.js +27 -4
  29. package/dist/src/setup/scaffold/update/channels.js +1 -1
  30. package/docs/README.md +19 -5
  31. package/docs/agent-config.md +16 -19
  32. package/docs/channels/custom.mdx +24 -18
  33. package/docs/channels/discord.mdx +25 -13
  34. package/docs/channels/eve.mdx +24 -6
  35. package/docs/channels/github.mdx +41 -10
  36. package/docs/channels/linear.mdx +29 -36
  37. package/docs/channels/overview.mdx +16 -4
  38. package/docs/channels/slack.mdx +59 -32
  39. package/docs/channels/teams.mdx +19 -7
  40. package/docs/channels/telegram.mdx +23 -9
  41. package/docs/channels/twilio.mdx +28 -6
  42. package/docs/concepts/context-control.md +24 -41
  43. package/docs/concepts/default-harness.md +19 -9
  44. package/docs/concepts/execution-model-and-durability.md +14 -14
  45. package/docs/concepts/security-model.md +32 -8
  46. package/docs/concepts/sessions-runs-and-streaming.md +11 -9
  47. package/docs/connections.mdx +49 -29
  48. package/docs/evals/assertions.mdx +30 -29
  49. package/docs/evals/cases.mdx +10 -10
  50. package/docs/evals/judge.mdx +14 -14
  51. package/docs/evals/overview.mdx +15 -17
  52. package/docs/evals/reporters.mdx +19 -7
  53. package/docs/evals/running.mdx +2 -2
  54. package/docs/evals/targets.mdx +15 -4
  55. package/docs/getting-started.mdx +72 -31
  56. package/docs/guides/auth-and-route-protection.md +18 -12
  57. package/docs/guides/client/continuations.mdx +5 -13
  58. package/docs/guides/client/messages.mdx +2 -2
  59. package/docs/guides/client/output-schema.mdx +2 -2
  60. package/docs/guides/client/overview.mdx +4 -4
  61. package/docs/guides/client/streaming.mdx +6 -5
  62. package/docs/guides/deployment.md +22 -20
  63. package/docs/guides/dev-tui.md +85 -13
  64. package/docs/guides/dynamic-capabilities.md +24 -8
  65. package/docs/guides/dynamic-workflows.md +33 -12
  66. package/docs/guides/frontend/nextjs.mdx +28 -14
  67. package/docs/guides/frontend/nuxt.mdx +21 -4
  68. package/docs/guides/frontend/overview.mdx +11 -11
  69. package/docs/guides/frontend/sveltekit.mdx +20 -3
  70. package/docs/guides/frontend/use-eve-agent-svelte.mdx +106 -14
  71. package/docs/guides/frontend/use-eve-agent-vue.mdx +108 -15
  72. package/docs/guides/hooks.md +14 -60
  73. package/docs/guides/instrumentation.md +24 -18
  74. package/docs/guides/remote-agents.md +19 -15
  75. package/docs/guides/session-context.md +12 -12
  76. package/docs/guides/state.md +25 -9
  77. package/docs/instructions.mdx +18 -10
  78. package/docs/{introduction.md → introduction.mdx} +14 -12
  79. package/docs/reference/cli.md +99 -53
  80. package/docs/reference/meta.json +1 -1
  81. package/docs/reference/project-layout.md +39 -32
  82. package/docs/reference/typescript-api.md +1 -1
  83. package/docs/responsible-use.md +14 -0
  84. package/docs/sandbox.mdx +25 -19
  85. package/docs/schedules.mdx +16 -14
  86. package/docs/skills.mdx +8 -6
  87. package/docs/subagents.mdx +39 -13
  88. package/docs/tools.mdx +13 -9
  89. package/docs/tutorial/connect-a-warehouse.mdx +16 -7
  90. package/docs/tutorial/first-agent.mdx +21 -11
  91. package/docs/tutorial/guard-the-spend.mdx +11 -9
  92. package/docs/tutorial/how-it-runs.mdx +10 -8
  93. package/docs/tutorial/query-sample-data.mdx +8 -8
  94. package/docs/tutorial/remember-definitions.mdx +5 -5
  95. package/docs/tutorial/run-analysis.mdx +13 -11
  96. package/docs/tutorial/ship-it.mdx +70 -14
  97. package/docs/tutorial/team-playbooks.mdx +33 -10
  98. package/package.json +1 -1
@@ -3,9 +3,9 @@ title: "Remote Agents"
3
3
  description: "Call another Eve deployment as a subagent with defineRemoteAgent: same lowered tool shape, outbound auth, durable callback dispatch."
4
4
  ---
5
5
 
6
- Sometimes the specialist you want to delegate to isn't a directory in your repo, it's a separately owned agent living behind its own URL. `defineRemoteAgent` lets you call another Eve deployment as if it were a local subagent.
6
+ `defineRemoteAgent` calls a separately deployed Eve agent as if it were a local subagent. Reach for it when the specialist you delegate to is a separately owned agent behind its own URL rather than a directory in your repo.
7
7
 
8
- The file lives under `agent/subagents/`, so its tool name is still derived from the path. There's no `name` field.
8
+ The file lives under `agent/subagents/`, so its tool name is derived from the path. There's no `name` field.
9
9
 
10
10
  ```ts title="agent/subagents/weather.ts"
11
11
  import { defineRemoteAgent } from "eve";
@@ -20,20 +20,22 @@ export default defineRemoteAgent({
20
20
 
21
21
  `defineRemoteAgent` accepts:
22
22
 
23
- - `url`: the remote Eve deployment root. Required.
24
- - `description`: the model-visible delegation description. Required.
25
- - `auth`: optional outbound auth hook from `eve/agents/auth`.
26
- - `headers`: optional static or lazy request headers.
27
- - `path`: optional session-create path; defaults to `/eve/v1/session`.
28
- - `outputSchema`: optional structured return type the caller requires (lowered to JSON Schema at compile time and enforced by the remote like any task-mode output schema).
23
+ | Parameter | Type | Required | Default | Description |
24
+ | -------------- | ------------------------------- | -------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `url` | `string` | Yes | n/a | Base URL of the remote Eve deployment to call. |
26
+ | `description` | `string` | Yes | n/a | Model-visible delegation description. |
27
+ | `auth` | `OutboundAuthFn` | No | none | Outbound auth hook from `eve/agents/auth`. |
28
+ | `headers` | `HeadersValue` | No | none | Static or lazily resolved request headers. |
29
+ | `path` | `string` | No | `/eve/v1/session` | Route appended to `url` for the create-session request. |
30
+ | `outputSchema` | `StandardSchema \| JSON Schema` | No | none | Structured return type the caller requires. Lowered to JSON Schema at compile time and enforced by the remote like any task-mode output schema. |
29
31
 
30
32
  ## The lowered tool
31
33
 
32
- A remote agent lowers to the same `{ message, outputSchema? }` tool shape as a local subagent. The parent packs everything the remote needs into `message`; the remote never sees the parent's history. Set `outputSchema` (here or per call) and the remote runs in task mode, returning structured output as the tool result.
34
+ A remote agent lowers to the same `{ message, outputSchema? }` tool shape as a local subagent. The parent packs everything the remote needs into `message`. The remote never sees the parent's history. Set `outputSchema` (here or per call) and the remote runs in task mode (a single-shot delegation that returns one structured result instead of an open conversation; see [Subagents](../subagents)), returning structured output as the tool result.
33
35
 
34
36
  ## Outbound auth
35
37
 
36
- `auth` is an `OutboundAuthFn` from `eve/agents/auth`. It attaches request headers to the outbound dispatch:
38
+ `auth` is an `OutboundAuthFn` from `eve/agents/auth` that attaches request headers to the outbound dispatch:
37
39
 
38
40
  | Helper | Header |
39
41
  | ------------------------------- | ---------------------------------------------------------------------------- |
@@ -41,17 +43,19 @@ A remote agent lowers to the same `{ message, outputSchema? }` tool shape as a l
41
43
  | `bearer(token)` | `Authorization: Bearer <token>` (static or lazily resolved) |
42
44
  | `basic({ username, password })` | `Authorization: Basic …` |
43
45
 
44
- If you're calling another Vercel-deployed Eve agent, reach for `vercelOidc()`: the remote verifies the OIDC token to authorize the caller. See [Auth & route protection](./auth-and-route-protection) for the receiving side.
46
+ If you are calling another Vercel-deployed Eve agent, reach for `vercelOidc()`. The remote verifies the OIDC token to authorize the caller. See [Auth & route protection](./auth-and-route-protection) for the receiving side.
45
47
 
46
- ## Callback / park dispatch
48
+ ## How remote dispatch and callbacks work
47
49
 
48
- A local subagent runs inline. A remote one runs in its own deployment, so dispatch has to be asynchronous:
50
+ A local subagent runs inline. A remote one runs in its own deployment, so dispatch is asynchronous:
49
51
 
50
52
  1. The parent starts a task-mode session on the remote's `POST /eve/v1/session`, passing a framework callback URL.
51
- 2. The parent turn parks durably until the remote posts a terminal callback, holding no compute while it waits.
53
+ 2. The parent turn parks (suspends durably without holding compute; see [Execution model & durability](../concepts/execution-model-and-durability)) until the remote posts a terminal callback.
52
54
  3. When the callback arrives, the parent resumes and surfaces the result.
53
55
 
54
- The parent stream carries the same `subagent.called`, `action.result`, and `subagent.completed` events as local delegation. For a remote call, `subagent.called.data.remote.url` records the target. A failed _start_ comes back as a failed tool result, so the caller can explain or recover within the same session. Terminal callback delivery runs as a durable Workflow step on the callee: a failed callback POST is rethrown rather than marking the task complete, which puts redelivery under Workflow retry policy.
56
+ The parent stream carries the same `subagent.called`, `action.result`, and `subagent.completed` events as local delegation. For a remote call, `subagent.called.data.remote.url` records the target.
57
+
58
+ Both failure paths surface to the parent as a failed tool result, so the caller can explain or recover within the same session. A failed _start_ returns the error inline. A remote that starts and then fails posts a terminal failure callback, which the parent receives as an errored subagent result carrying the remote's error (or `REMOTE_AGENT_FAILED` when none is supplied). Terminal callback delivery runs as a durable step on the underlying workflow engine (see [Execution model & durability](../concepts/execution-model-and-durability)). A failed callback POST is rethrown rather than marking the task complete, so the engine retries it.
55
59
 
56
60
  ## What to read next
57
61
 
@@ -10,11 +10,11 @@ Eve exposes runtime state through the `ctx` parameter passed to tool `execute`,
10
10
  - `ctx.getSkill(identifier)`: handle for a named skill visible to the current agent
11
11
  - `defineState(name, initial)`: typed durable state with `get()` and `update()` (imported from `eve/context`)
12
12
 
13
- These APIs work only inside active authored runtime execution such as tools, channel event handlers, and authored hooks. They throw when called outside a managed context.
13
+ These APIs work only inside active authored runtime execution, including tools, channel event handlers, and authored hooks. They throw when called outside a managed context.
14
14
 
15
15
  ## `ctx.session`
16
16
 
17
- Use `ctx.session` when you need durable runtime metadata about the current execution.
17
+ `ctx.session` exposes durable runtime metadata about the current execution.
18
18
 
19
19
  ```ts title="agent/tools/who_called_me.ts"
20
20
  import { defineTool } from "eve/tools";
@@ -46,7 +46,7 @@ Public session fields:
46
46
  - `turn.sequence`
47
47
  - optional `parent`
48
48
 
49
- Important behavior:
49
+ Behavior:
50
50
 
51
51
  - `auth.current` is the caller for the active inbound turn.
52
52
  - `auth.initiator` is the caller that started the durable session.
@@ -63,14 +63,14 @@ const sandbox = await ctx.getSandbox();
63
63
  const result = await sandbox.run({ command: "npm test" });
64
64
  ```
65
65
 
66
- Important behavior:
66
+ Behavior:
67
67
 
68
- - It takes no arguments: each agent has exactly one sandbox.
68
+ - It takes no arguments. Each agent has exactly one sandbox.
69
69
  - It is async because Eve binds or restores sandbox state lazily.
70
70
  - It only works when sandbox access is attached to the active runtime path.
71
- - Visibility is node-local: a subagent sees its own sandbox, not the parent's.
71
+ - Visibility is node-local. A subagent sees its own sandbox, not the parent's.
72
72
 
73
- `SandboxSession` also exposes `resolvePath(path)` for cases where authored code needs the live backend-native path for a logical `/workspace/...` location before passing it to shell code or a child process.
73
+ `SandboxSession` also exposes `resolvePath(path)`, which returns the live backend-native path for a logical `/workspace/...` location. Use it when authored code needs that path before passing it to shell code or a child process.
74
74
 
75
75
  See [Sandbox](../sandbox) for lifecycle details.
76
76
 
@@ -83,20 +83,20 @@ const skill = ctx.getSkill("research");
83
83
  const notes = await skill.file("references/checklist.md").text();
84
84
  ```
85
85
 
86
- Important behavior:
86
+ Behavior:
87
87
 
88
- - It is synchronous; file content is read lazily from the active sandbox.
88
+ - It is synchronous. File content is read lazily from the active sandbox.
89
89
  - It only works when sandbox access is attached to the active runtime path.
90
90
  - `identifier` is the path-derived skill id.
91
91
  - Visibility follows the current agent's sandbox.
92
- - Missing skills surface when a file accessor reads a missing sandbox path.
92
+ - A missing skill surfaces when a file accessor reads a missing sandbox path.
93
93
  - The returned handle exposes `name` and `file(relativePath)`.
94
94
 
95
95
  See [Skills](../skills) for the full authoring model.
96
96
 
97
97
  ## Custom state with `defineState`
98
98
 
99
- Use `defineState` when your agent needs durable typed state that tools, hooks, and channel handlers can share. State survives across workflow step boundaries. Declare the handle at module scope so every importer shares it:
99
+ Use `defineState` when your agent needs durable typed state that tools, hooks, and channel handlers can share. State survives workflow step boundaries. Declare the handle at module scope so every importer shares it:
100
100
 
101
101
  ```ts title="agent/lib/budget.ts"
102
102
  import { defineState } from "eve/context";
@@ -139,7 +139,7 @@ The framework sets up a context container before invoking authored code:
139
139
  3. Authored code runs inside the managed scope, so `ctx` and `defineState` accessors resolve automatically.
140
140
  4. After the step, the framework commits mutable state (for example sandbox changes) back to the durable session.
141
141
 
142
- This lifecycle is fully managed by the framework. Authored code only needs to use `ctx` and the public accessors.
142
+ The framework manages this lifecycle. Authored code only uses `ctx` and the public accessors.
143
143
 
144
144
  ## What to read next
145
145
 
@@ -3,7 +3,7 @@ title: "State"
3
3
  description: "Durable per-session memory with defineState: get() and update(), persisted across step boundaries."
4
4
  ---
5
5
 
6
- `defineState` is a typed, named slot of durable per-session memory for an agent. Use it when the agent has to remember something between the turns of a conversation (a running budget, a glossary, a checklist) and you don't want to stand up an external store for it. The values survive workflow step boundaries, so they outlast crashes, redeploys, and days-long sessions.
6
+ `defineState` is a typed, named slot of durable per-session memory for an agent. Use it when the agent has to remember something between conversation turns (a running budget, a glossary, a checklist) and you don't want to stand up an external store for it. The values survive workflow step boundaries, so they outlast crashes, redeploys, and days-long sessions.
7
7
 
8
8
  ```ts
9
9
  import { defineState } from "eve/context";
@@ -16,14 +16,19 @@ Pass `defineState(name, initial)` a stable string `name` (namespace it to your a
16
16
  - `get()`: read the current value. Returns `initial()` on first access within a context.
17
17
  - `update(fn)`: replace the value with `fn(current)`.
18
18
 
19
- Use the handle from inside a tool, hook, or other framework-managed runtime code:
19
+ Declare the handle once at module scope and import it wherever you read or write the slot. Use it from inside a tool, hook, or other framework-managed runtime code:
20
20
 
21
- ```ts title="agent/tools/spend.ts"
21
+ ```ts title="agent/lib/budget.ts"
22
22
  import { defineState } from "eve/context";
23
+
24
+ export const budget = defineState("my-agent.budget", () => ({ count: 0, cap: 25 }));
25
+ ```
26
+
27
+ ```ts title="agent/tools/spend.ts"
23
28
  import { defineTool } from "eve/tools";
24
29
  import { z } from "zod";
25
-
26
- const budget = defineState("my-agent.budget", () => ({ count: 0, cap: 25 }));
30
+ import { budget } from "../lib/budget.js";
31
+ import { runQuery } from "../lib/warehouse.js";
27
32
 
28
33
  export default defineTool({
29
34
  description: "Run a query, counting it against the session budget.",
@@ -43,20 +48,31 @@ export default defineTool({
43
48
 
44
49
  State is durable by default and does not reset between turns. If you want a clean slate every turn, overwrite it from a lifecycle [hook](./hooks) on `turn.started`:
45
50
 
46
- ```ts
47
- budget.update(() => ({ count: 0, cap: 25 }));
51
+ ```ts title="agent/hooks/reset-budget.ts"
52
+ import { defineHook } from "eve/hooks";
53
+ import { budget } from "../lib/budget.js";
54
+
55
+ export default defineHook({
56
+ events: {
57
+ async "turn.started"() {
58
+ budget.update(() => ({ count: 0, cap: 25 }));
59
+ },
60
+ },
61
+ });
48
62
  ```
49
63
 
64
+ The hook imports the same module-scope `budget` handle as the tool, so both read and write the same slot.
65
+
50
66
  ## State is never shared with subagents
51
67
 
52
68
  Every [subagent](../subagents) starts with its own fresh state, whether it's a built-in `agent` copy or a declared specialist. `defineState` values never cross the parent/child boundary, even when the child is a copy of the same agent.
53
69
 
54
70
  ## State vs. connection-side storage
55
71
 
56
- `defineState` is for conversation-scoped working memory that lives and dies with the session: counters, the current plan, what the user has told you this conversation. Anything that has to outlive the session, be shared across sessions or users, or be queried independently of a turn belongs in an external store, either a [connection](../connections) or your own database. State is not a database. It's the agent's short-term memory, persisted durably for the life of the session.
72
+ `defineState` holds conversation-scoped working memory that lives and dies with the session, including counters, the current plan, and what the user has told you this conversation. It is the agent's short-term memory, persisted durably for the life of the session. Anything that has to outlive the session, be shared across sessions or users, or be queried independently of a turn belongs in an external store, either a [connection](../connections) or your own database.
57
73
 
58
74
  ## What to read next
59
75
 
60
76
  - Read state inside dynamic resolvers → [Dynamic capabilities](./dynamic-capabilities)
61
77
  - How step durability works → [Execution model & durability](../concepts/execution-model-and-durability)
62
- - The `ctx` accessors available alongside state → [Tools](../tools)
78
+ - The `ctx` accessors available alongside state → [TypeScript API](../reference/typescript-api)
@@ -3,19 +3,17 @@ title: "Instructions"
3
3
  description: "Author the agent's always-on system prompt with instructions.md or instructions.ts."
4
4
  ---
5
5
 
6
- Instructions are the always-on system prompt. Use them for whatever should hold on every turn: a rule, a persona, a constraint. This is the agent's permanent identity, not a procedure it pulls in when the moment calls for it.
7
-
8
- Eve prepends the instructions to every model call in the session.
6
+ Instructions are the always-on system prompt, the agent's permanent identity rather than a procedure it pulls in when the moment calls for it. Use them for anything that should hold on every turn, such as a rule, a persona, or a constraint. Eve prepends the instructions to every model call in the session.
9
7
 
10
8
  ## Author instructions
11
9
 
12
- In the simplest case, instructions are a markdown file at the agent root. Whatever you write is the prompt.
10
+ At minimum, instructions are a markdown file at the agent root. Whatever you write is the prompt:
13
11
 
14
12
  ```md title="agent/instructions.md"
15
13
  You are a concise assistant. Use tools when they are available.
16
14
  ```
17
15
 
18
- Keep this file to stable behavior that applies on every turn: identity, tone, standing rules.
16
+ Keep this file to stable behavior such as identity, tone, and standing rules.
19
17
 
20
18
  ## Markdown vs TypeScript
21
19
 
@@ -30,11 +28,15 @@ export default defineInstructions({
30
28
  });
31
29
  ```
32
30
 
33
- `defineInstructions` takes one field, `markdown`, which is the resolved prompt text. A module-backed prompt runs once at build time. Eve captures the resulting markdown into the compiled manifest, so the runtime serves the same prompt every session and never re-runs the module.
31
+ `defineInstructions` takes one field, `markdown`, the resolved prompt text. A module-backed prompt runs once at build time. Eve captures the resulting markdown into the compiled manifest, so the runtime serves the same prompt every session and never re-runs the module.
32
+
33
+ ## Split instructions across a directory
34
+
35
+ For more than one file, add an `agent/instructions/` directory. Eve reads its entries non-recursively and accepts both `.md` files and `.ts` modules (a `.ts` file can wrap `defineInstructions` or `defineDynamic`). Entries combine in alphabetical order by filename (`localeCompare`).
34
36
 
35
- Got more than one file? An `agent/instructions/` directory works too. Use either `instructions.md` or `instructions.ts` at the agent root, not both.
37
+ A flat `agent/instructions.md` (or `.ts`) at the agent root and the directory can coexist. The root file's content comes first, then the sorted directory entries. You cannot author both `instructions.md` and `instructions.ts` at the root; that pairing is a build error.
36
38
 
37
- ## How it differs from skills
39
+ ## Instructions vs skills
38
40
 
39
41
  Instructions and [skills](./skills) both feed text into the model's context. The difference is timing:
40
42
 
@@ -43,13 +45,19 @@ Instructions and [skills](./skills) both feed text into the model's context. The
43
45
  | `instructions.md` / `.ts` | Always on, every turn | Permanent identity and standing rules |
44
46
  | `agent/skills/*` | On demand, when the model calls `load_skill` | Optional procedures that should not bloat every turn |
45
47
 
46
- Keep instructions short and stable. Long or situational procedures belong in skills, where they only enter context when the request calls for them. See [Skills](./skills).
48
+ Keep instructions short and stable. Long or situational procedures belong in [skills](./skills), where they only enter context when the request calls for them.
47
49
 
48
50
  Instructions never run code. When you need typed executable behavior, reach for a [tool](./tools).
49
51
 
50
52
  ## Dynamic instructions
51
53
 
52
- Need the prompt resolved at runtime from session context (auth, tenant, channel)? Wrap `defineInstructions` in a `defineDynamic` resolver. See [Dynamic capabilities](./guides/dynamic-capabilities).
54
+ To resolve the prompt at runtime from session context (auth, tenant, or channel), wrap `defineInstructions` in a `defineDynamic` resolver. See [Dynamic capabilities](./guides/dynamic-capabilities).
55
+
56
+ ## Disclaimer
57
+
58
+ As the deployer, it is your responsibility to ensure your agent complies with applicable laws.
59
+
60
+ Where an Eve agent communicates with people, you may be required to disclose that they are interacting with an automated AI system where law requires it. Eve does not add this disclosure automatically; configure it in your instructions and/or channel responses.
53
61
 
54
62
  ## What to read next
55
63
 
@@ -5,7 +5,11 @@ description: "How an Eve agent is laid out as files, what runs when a message ar
5
5
 
6
6
  Eve is a framework for building durable agents as ordinary files in a TypeScript project.
7
7
 
8
- Instead of describing your whole agent in one large configuration object, you give each part a clear home: instructions go in one file, tools in one folder, channels in another. Eve discovers that structure and turns it into an agent that runs locally, serves HTTP, connects to other platforms, and keeps working across many turns.
8
+ Instead of one large configuration object, each part of your agent gets a clear home. Instructions go in one file, tools in one folder, channels in another. Eve discovers that structure and turns it into an agent that runs locally, serves HTTP, connects to other platforms, and keeps working across many turns.
9
+
10
+ <Callout>
11
+ Eve is currently in beta and subject to the [Vercel beta terms](https://vercel.com/docs/release-phases/public-beta-agreement); the framework, APIs, documentation, and behavior may change before general availability.
12
+ </Callout>
9
13
 
10
14
  ## An Eve project at a glance
11
15
 
@@ -37,9 +41,7 @@ Start with only `instructions.md` and `agent.ts`. Add the other folders when the
37
41
 
38
42
  ## The files are the interface
39
43
 
40
- Eve is [filesystem-first](./reference/project-layout): a file's location says what it does, and its path usually gives it a name.
41
-
42
- For example, this file:
44
+ Eve is [filesystem-first](./reference/project-layout). A file's location says what it does, and its path usually gives it a name. For example, this file:
43
45
 
44
46
  ```text
45
47
  agent/tools/get_weather.ts
@@ -64,7 +66,7 @@ There is no separate registry to keep in sync. Add the file and Eve discovers it
64
66
 
65
67
  ## What happens when a message arrives
66
68
 
67
- Whether a message comes from a web app, the terminal, or Slack, the same flow runs. Eve turns the platform input into a message, gives the model its instructions, skills, tools, and conversation history, runs the work (calling tools and subagents as needed), saves the session and streams events, then delivers the result back in the form the platform expects.
69
+ The same flow runs whether a message comes from a web app, the terminal, or Slack. Eve turns the platform input into a message, gives the model its instructions, skills, tools, and conversation history, runs the work (calling tools and subagents as needed), saves the session and streams events, then delivers the result back in the form the platform expects.
68
70
 
69
71
  That keeps agent behavior portable. Your weather tool does not need to know whether the question came from a browser or from Slack.
70
72
 
@@ -72,13 +74,13 @@ That keeps agent behavior portable. Your weather tool does not need to know whet
72
74
 
73
75
  An Eve session is more than one request and one response. It can:
74
76
 
75
- - stream progress while work is happening
76
- - call tools and subagents
77
- - pause for [approval or a human answer](./tools)
78
- - resume after that answer arrives
79
- - keep durable state across turns
77
+ - Stream progress while work is happening
78
+ - Call tools and subagents
79
+ - Pause for [approval or a human answer](./tools)
80
+ - Resume after that answer arrives
81
+ - Keep durable state across turns
80
82
 
81
- Under the hood, Eve uses the open-source [Workflow SDK](https://workflow-sdk.dev) to make sessions durable, resumable, and crash-safe. Eve handles that machinery so your tools can focus on the work itself.
83
+ Under the hood, Eve uses the open-source [Workflow SDK](https://workflow-sdk.dev) to make sessions durable, resumable, and crash-safe. Eve handles that machinery so your tools focus on the work itself.
82
84
 
83
85
  ## Grow the project by adding capabilities
84
86
 
@@ -93,7 +95,7 @@ As the agent grows, each concern still has a predictable home:
93
95
  | [`schedules/`](./schedules) | Recurring or scheduled work |
94
96
  | `lib/` | Shared code imported by the other agent files |
95
97
 
96
- The result stays readable before it runs: the directory tells you what the agent can do.
98
+ The result stays readable before it runs. The directory tells you what the agent can do.
97
99
 
98
100
  ## What to read next
99
101
 
@@ -1,38 +1,57 @@
1
1
  ---
2
2
  title: "CLI"
3
- description: "eve command reference: info, build, start, dev, eval."
3
+ description: "Reference for every eve CLI command: init, info, build, start, dev, link, deploy, eval, and channels."
4
4
  ---
5
5
 
6
- The `eve` binary (`bin: eve`) runs from your app root, and every command loads `.env`/`.env.local` from that root before it does anything else.
6
+ The `eve` binary (`bin: eve`) runs from your app root, and every command first loads `.env`/`.env.local` from that root. Running `eve` with no command runs `eve dev`.
7
7
 
8
8
  ## Commands
9
9
 
10
- | Command | Does |
11
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
12
- | `eve info` | Print the resolved application: discovered tools, skills, subagents, schedules, channels, routes, artifact paths, and discovery diagnostics |
13
- | `eve build` | Compile `.eve/` artifacts and build the host output; prints the output directory |
14
- | `eve start` | Serve the built `.output/` app; prints the listening URL |
15
- | `eve dev` | Start the local dev server and open the terminal UI |
16
- | `eve dev <url>` | Connect the UI to an existing server URL (e.g. a remote deployment) instead of booting a local server |
17
- | `eve link` | Link the directory to a Vercel project and pull AI Gateway credentials |
18
- | `eve deploy` | Deploy the agent to Vercel production (links first if needed) |
19
- | `eve eval` | Run evals against the local app or a remote target |
20
- | `eve channels add [kind]` | Scaffold a channel interactively, or by kind (`slack` \| `web`) |
21
- | `eve channels list` | List user-authored channels |
10
+ | Command | Description |
11
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
12
+ | `eve init [target]` | Scaffold a new agent, or add one to an existing project directory |
13
+ | `eve info` | Print the resolved application, including discovered tools, skills, subagents, schedules, channels, routes, artifact paths, and discovery diagnostics |
14
+ | `eve build` | Compile `.eve/` artifacts and build the host output; prints the output directory |
15
+ | `eve start` | Serve the built `.output/` app; prints the listening URL |
16
+ | `eve dev` | Start the local dev server and open the terminal UI |
17
+ | `eve dev <url>` | Connect the UI to an existing server URL (e.g. a remote deployment) instead of booting a local server |
18
+ | `eve link` | Link the directory to a Vercel project and pull AI Gateway credentials |
19
+ | `eve deploy` | Deploy the agent to Vercel production (links first if needed) |
20
+ | `eve eval` | Run evals against the local app or a remote target |
21
+ | `eve channels add [kind]` | Scaffold a channel interactively, or by kind (`slack` \| `web`) |
22
+ | `eve channels list` | List user-authored channels |
22
23
 
23
24
  When `eve build` fails on discovery errors, it prints the full diagnostics report (severity, message, source path) and the diagnostics artifact path.
24
25
 
26
+ ## `eve init`
27
+
28
+ ```bash
29
+ eve init [target] [--channel-web-nextjs]
30
+ ```
31
+
32
+ The optional `target` decides the mode:
33
+
34
+ - A name (`eve init my-agent`) scaffolds a fresh project in a new `my-agent/` directory.
35
+ - An existing directory, including `.` for the current one (`eve init .`), adds an agent to that project. The project needs a `package.json`, the `agent/` files must not exist yet, and the missing `eve`, `ai`, and `zod` dependencies are added without touching anything else.
36
+ - Omitting the target scaffolds or updates the current directory, the same as `eve init .`.
37
+
38
+ Either mode installs dependencies, initializes Git, and runs `eve dev` through the project's package manager.
39
+
40
+ | Flag | Type | Default | Description |
41
+ | ---------------------- | ---- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
42
+ | `--channel-web-nextjs` | flag | off | Add the Web Chat application (a Next.js app). Rejected when adding to an existing project; run `eve channels add web` there afterward. |
43
+
25
44
  ## `eve info`
26
45
 
27
46
  ```bash
28
47
  eve info [--json]
29
48
  ```
30
49
 
31
- | Flag | Effect |
32
- | -------- | ------------ |
33
- | `--json` | Emit as JSON |
50
+ | Flag | Type | Default | Description |
51
+ | -------- | ---- | ------- | ------------ |
52
+ | `--json` | flag | off | Emit as JSON |
34
53
 
35
- When something behaves unexpectedly, run this first. It confirms a file was discovered, lists the active surface, and surfaces discovery diagnostics, all faster than booting the dev server.
54
+ Run this first when something behaves unexpectedly. It confirms a file was discovered, lists the active surface, and surfaces discovery diagnostics, all faster than booting the dev server.
36
55
 
37
56
  ## `eve build`
38
57
 
@@ -44,7 +63,7 @@ No flags. Compiles to `.eve/` and builds the host output, then prints the built
44
63
 
45
64
  Useful artifacts written under `.eve/` (preserved even on partial failure):
46
65
 
47
- | Artifact | Tells you |
66
+ | Artifact | Description |
48
67
  | ---------------------------------------------- | ---------------------------------------------------- |
49
68
  | `.eve/discovery/agent-discovery-manifest.json` | What Eve found on disk |
50
69
  | `.eve/discovery/diagnostics.json` | Authored-shape errors and warnings |
@@ -58,10 +77,10 @@ Useful artifacts written under `.eve/` (preserved even on partial failure):
58
77
  eve start [--host <host>] [--port <port>]
59
78
  ```
60
79
 
61
- | Flag | Effect |
62
- | --------------- | ---------------------------------------------------- |
63
- | `--host <host>` | Host interface to bind |
64
- | `--port <port>` | Port to listen on (defaults to `$PORT`, then `3000`) |
80
+ | Flag | Type | Default | Description |
81
+ | --------------- | ------ | ------------------ | ---------------------- |
82
+ | `--host <host>` | string | all interfaces | Host interface to bind |
83
+ | `--port <port>` | number | `$PORT`, then 3000 | Port to listen on |
65
84
 
66
85
  Serves the previously built output. Prints the listening URL.
67
86
 
@@ -72,27 +91,27 @@ eve dev [options]
72
91
  eve dev https://your-app.vercel.app
73
92
  ```
74
93
 
75
- Pass a bare URL as the only argument and the UI connects to that server instead of booting a local one (same as `--url`). That's handy for smoke-testing a preview or production deployment. The interactive UI turns off in a non-TTY terminal.
76
-
77
- | Flag | Effect |
78
- | ----------------------------------- | ----------------------------------------------------------------------------------------- |
79
- | `--host <host>` | Host interface to bind |
80
- | `--port <port>` | Port to listen on (defaults to `$PORT`, then `2000`) |
81
- | `-u, --url <url>` | Connect to an existing server URL instead of starting one |
82
- | `--no-ui` | Start the server without an interactive UI |
83
- | `--name <name>` | Title shown in the terminal UI (defaults to the app folder name) |
84
- | `--input <text>` | Pre-fill the prompt input after launching the UI (editable; not auto-submitted) |
85
- | `--tools <mode>` | Tool-call rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
86
- | `--reasoning <mode>` | Reasoning rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
87
- | `--subagents <mode>` | Subagent-section rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
88
- | `--connection-auth <mode>` | Connection-authorization rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
89
- | `--assistant-response-stats <mode>` | Assistant header statistic: `tokens` \| `tokensPerSecond` |
90
- | `--context-size <tokens>` | Model context window size, shown as a usage percentage |
91
- | `--logs <mode>` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
94
+ Pass a bare URL as the only argument and the UI connects to that server instead of booting a local one (same as `--url`), which lets you smoke-test a preview or production deployment. The interactive UI turns off in a non-TTY terminal.
95
+
96
+ | Flag | Type | Default | Description |
97
+ | ----------------------------------- | ------ | ------------------ | ----------------------------------------------------------------------------------------- |
98
+ | `--host <host>` | string | all interfaces | Host interface to bind |
99
+ | `--port <port>` | number | `$PORT`, then 3000 | Port to listen on |
100
+ | `-u, --url <url>` | string | none | Connect to an existing server URL instead of starting one |
101
+ | `--no-ui` | flag | UI on | Start the server without an interactive UI |
102
+ | `--name <name>` | string | app folder name | Title shown in the terminal UI |
103
+ | `--input <text>` | string | none | Pre-fill the prompt input after launching the UI (editable, not auto-submitted) |
104
+ | `--tools <mode>` | enum | `auto-collapsed` | Tool-call rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
105
+ | `--reasoning <mode>` | enum | `full` | Reasoning rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
106
+ | `--subagents <mode>` | enum | `auto-collapsed` | Subagent-section rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
107
+ | `--connection-auth <mode>` | enum | `full` | Connection-authorization rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
108
+ | `--assistant-response-stats <mode>` | enum | `tokensPerSecond` | Assistant header statistic: `tokens` \| `tokensPerSecond` |
109
+ | `--context-size <tokens>` | number | none | Model context window size, shown as a usage percentage |
110
+ | `--logs <mode>` | enum | `stderr` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
92
111
 
93
112
  Local dev writes the active server process ID to `.eve/dev-process.pid`. If another `eve dev` starts for the same agent while that process is still running, Eve exits with a message that includes the command to stop the existing server.
94
113
 
95
- Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight sessions keep a consistent code revision while new prompts pick up rebuilds. `eve dev` prunes stale runtime snapshots and old local sandbox templates in the background on startup; stopping `eve dev` and deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/` is safe when you want a manual cleanup.
114
+ Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight sessions hold a consistent code revision while new prompts pick up rebuilds. On startup, `eve dev` prunes stale runtime snapshots and old local sandbox templates in the background. For manual cleanup, stop `eve dev` and delete `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`.
96
115
 
97
116
  ## `eve link`
98
117
 
@@ -100,7 +119,7 @@ Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snaps
100
119
  eve link
101
120
  ```
102
121
 
103
- Links the current directory to an existing Vercel project by selecting a team and then a project, then pulls the project's environment so an AI Gateway credential (`VERCEL_OIDC_TOKEN` or `AI_GATEWAY_API_KEY`) lands in `.env.local`, and verifies one actually did. Running it again re-links: the pickers always run, and the new choice wins. Interactive only in CI, use `vercel link --project <name> --yes` instead. A running `eve dev` reloads env files automatically, so no restart is needed after the pull.
122
+ Links the current directory to an existing Vercel project. You select a team and then a project, and Eve pulls the project's environment so an AI Gateway credential (`VERCEL_OIDC_TOKEN` or `AI_GATEWAY_API_KEY`) lands in `.env.local`, then verifies one actually did. Running it again re-links: the pickers always run, and the new choice wins. The command is interactive only; in CI, use `vercel link --project <name> --yes` instead. A running `eve dev` reloads env files automatically, so you don't need to restart after the pull.
104
123
 
105
124
  ## `eve deploy`
106
125
 
@@ -108,7 +127,7 @@ Links the current directory to an existing Vercel project by selecting a team an
108
127
  eve deploy
109
128
  ```
110
129
 
111
- Deploys the agent to Vercel production (`vercel deploy --prod`), installing dependencies first and pulling environment variables after. An already-linked project deploys with or without a TTY (non-interactive runs pass the non-interactive `vercel` flags); an unlinked directory walks the `eve link` pickers when a terminal is present, and exits with guidance otherwise.
130
+ Deploys the agent to Vercel production (`vercel deploy --prod`), installing dependencies first and pulling environment variables after. An already-linked project deploys with or without a TTY (non-interactive runs pass the non-interactive `vercel` flags). An unlinked directory walks the `eve link` pickers when a terminal is present, and exits with guidance otherwise.
112
131
 
113
132
  ## `eve eval`
114
133
 
@@ -118,19 +137,46 @@ eve eval [evalId...] [--url <url>] [options]
118
137
 
119
138
  Runs all discovered evals when no eval ids are given; ids match exactly or by directory prefix (`eve eval weather` runs everything under `evals/weather/`). Exits `0` when every eval passed its checks, `1` when any eval failed (a failed check, an execution error, or a `--strict` threshold miss), `2` on configuration errors.
120
139
 
121
- | Flag | Effect |
122
- | ----------------------- | ---------------------------------------------- |
123
- | `--url <url>` | Remote agent URL (skip local host startup) |
124
- | `--tag <tag...>` | Run only evals carrying a tag |
125
- | `--strict` | Below-threshold scores also fail the exit code |
126
- | `--list` | Print discovered evals without running them |
127
- | `--timeout <ms>` | Per-eval timeout in milliseconds |
128
- | `--max-concurrency <n>` | Max concurrent eval executions (default 8) |
129
- | `--json` | Output results as JSON |
130
- | `--skip-report` | Skip eval-defined reporters (e.g. Braintrust) |
140
+ | Flag | Type | Default | Description |
141
+ | ----------------------- | ------ | ------- | ---------------------------------------------- |
142
+ | `--url <url>` | string | none | Remote agent URL (skip local host startup) |
143
+ | `--tag <tag...>` | string | none | Run only evals carrying a tag |
144
+ | `--strict` | flag | off | Below-threshold scores also fail the exit code |
145
+ | `--list` | flag | off | Print discovered evals without running them |
146
+ | `--timeout <ms>` | number | none | Per-eval timeout in milliseconds |
147
+ | `--max-concurrency <n>` | number | 8 | Max concurrent eval executions |
148
+ | `--json` | flag | off | Output results as JSON |
149
+ | `--junit <path>` | string | none | Write JUnit XML results to a file |
150
+ | `--skip-report` | flag | off | Skip eval-defined reporters (e.g. Braintrust) |
151
+ | `--verbose` | flag | off | Stream per-eval `t.log` lines to stdout |
131
152
 
132
153
  See [Evals](../evals/overview) for authoring evals.
133
154
 
155
+ ## `eve channels add`
156
+
157
+ ```bash
158
+ eve channels add [kind] [-f] [-y]
159
+ ```
160
+
161
+ Scaffolds a channel into `agent/channels/`. With no `kind` it prompts interactively; pass a `kind` (`slack` \| `web`) to scaffold one directly.
162
+
163
+ | Flag | Type | Default | Description |
164
+ | ------------- | ---- | ------- | --------------------------------------------------------- |
165
+ | `-f, --force` | flag | off | Overwrite existing channel files |
166
+ | `-y, --yes` | flag | off | Assume yes for confirmations; requires an explicit `kind` |
167
+
168
+ ## `eve channels list`
169
+
170
+ ```bash
171
+ eve channels list [--json]
172
+ ```
173
+
174
+ Lists the user-authored channels in the current project.
175
+
176
+ | Flag | Type | Default | Description |
177
+ | -------- | ---- | ------- | -------------- |
178
+ | `--json` | flag | off | Output as JSON |
179
+
134
180
  ## Recommended loop
135
181
 
136
182
  1. Edit files under `agent/`.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "title": "Reference",
3
- "pages": ["typescript-api", "cli", "project-layout"]
3
+ "pages": ["http-api", "typescript-api", "cli", "project-layout"]
4
4
  }