---
title: Build enterprise agents with eve
description: Build enterprise agents with eve on Vercel. Configure identity, tool approvals, tenant-scoped memory, model policies, and audit controls.
keywords: ["eve","enterprise AI agents","Vercel Passport","Vercel Connect","AI Gateway","Vercel Sandbox","Vercel Workflows","Enterprise Apps and Agents"]
url: "https://vercel.com/kb/guide/enterprise-agents-with-eve"
published: 2026-12-03
last_updated: 2026-12-03
authors: Ben Sabic
related_resources:
  - title: "What are enterprise AI agents?"
    url: "https://vercel.com/i/enterprise-ai-agents"
    description: "Learn what enterprise AI agents are, their security risks and controls, responsible AI frameworks, and where shadow AI and citizen developers fit."
  - title: "Vercel for Enterprise: a control plane for apps and agents"
    url: "https://vercel.com/blog/vercel-for-enterprise"
    description: "See how one control plane governs deployments, data access, models, and token budgets for every builder, managed through your existing IdP."
  - title: "How do you govern AI apps and agents built by employees?"
    url: "https://vercel.com/i/govern-employee-built-ai-apps-and-agents"
    description: "Give every employee-built app an owner, set baseline controls for access, data, and spend, and review apps before wider use."
  - title: "How do you build an audit trail for what an AI agent did?"
    url: "https://vercel.com/i/how-to-audit-ai-agents"
    description: "Connect identity, tool calls, approvals, and results into one record, so you can reconstruct what an agent did and investigate mistakes."
  - title: "Choosing between eve, AI SDK agents, and `WorkflowAgent`"
    url: "/kb/guide/eve-vs-ai-sdk-agents-vs-workflowagent"
    description: "Compare eve, `ToolLoopAgent`, and `WorkflowAgent` by durability, approvals, channels, and setup to choose an agent framework for your TypeScript application."
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest kb search "<query>"
read_with_vercel_cli: "npx vercel@latest kb inspect enterprise-agents-with-eve"
---

Enterprise agents need to act on company data with the right permissions, pause for review, and resume unfinished work. [eve](https://vercel.com/docs/frameworks/agents/eve) provides durable sessions and tool approvals on Vercel so a database analyst, incident investigator, or customer operations agent can keep working across interruptions.

You define the agent in TypeScript and Markdown files. Vercel runs its HTTP routes and tools, persists workflow progress, and routes model requests through AI Gateway. Your application defines which records each employee or customer may access and records consequential actions alongside the platform's traces.

## Prerequisites

Before you begin, make sure you have:

- Node.js 24 or later
  
- [A Vercel account](https://vercel.com/signup) and team with [AI Gateway](https://vercel.com/docs/ai-gateway) access
  
- The latest [Vercel CLI](https://vercel.com/docs/cli)
  
- An Enterprise plan to use Passport, Secure Compute, BYOC, Enterprise Managed Users, and Audit Logs
  

Agent Runs, Vercel Daemons, and Enterprise-Managed Authorization in Vercel Connect are in beta. Use the current eve release and `@vercel/connect` 2.7.0 or later for the integrations shown here.

## What an enterprise agent needs

An agent that answers within one request can run as a single function. [Enterprise AI agents](https://vercel.com/i/enterprise-ai-agents) act on a company's data and software, so they also wait days for an approval, act with one person's permissions, and leave a record of what they changed. Six requirements follow from that:

| Requirement                                         | How eve and Vercel handle it                                                                                                                                                                                                | Where you configure it                      |
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| Work that survives pauses, approvals, and redeploys | Each session runs as a durable workflow on [Vercel Workflows](https://vercel.com/docs/workflows). Waiting for an approval or user input suspends the workflow until the input arrives.                                      | Nothing to add                              |
| Credentials that aren't static API keys             | The deployed agent authenticates to AI Gateway with the project's [OIDC identity](https://vercel.com/docs/oidc), and [Vercel Connect](https://vercel.com/docs/connect) issues provider tokens when the agent asks for them. | `agent/connections/` and `agent/channels/`  |
| Boundaries for each user and tenant                 | Route auth identifies the caller. Tools, memory scopes, and approval policies read that caller from the session.                                                                                                            | `agent/channels/eve.ts` and `agent/memory/` |
| Isolated code execution                             | [Vercel Sandbox](https://vercel.com/docs/sandbox) runs agent-generated code in a microVM with its own filesystem and network.                                                                                               | `agent/sandbox.ts`                          |
| Spend limits                                        | `limits.sessionUsage` pauses a session at a token or cost threshold, and AI Gateway budgets reject requests once spend passes a limit.                                                                                      | `agent/agent.ts` and AI Gateway settings    |
| A record of what the agent did                      | eve emits OpenTelemetry traces, and [Agent Runs](https://vercel.com/docs/agent-runs), which is in beta, shows sessions, turns, tool calls, and token usage.                                                                 | `agent/instrumentation/`                    |

### How eve compiles an agent onto Vercel

eve reads the agent from the filesystem. Each file's path is its identity, so `agent/tools/get_weather.ts` becomes the `get_weather` tool without a registration step. An eve project uses this directory layout:

```text
agent/
├── agent.ts            # model, limits, and the agent-wide approval policy
├── instructions.md     # the system prompt
├── tools/              # one TypeScript file for each tool
├── connections/        # MCP servers and OpenAPI services
├── channels/           # HTTP, Slack, and other entry points, with route auth
├── skills/             # Markdown skills, such as metric definitions
├── subagents/          # specialists, each with its own agent.ts
├── memory/             # memory slots and their scopes
├── extensions/         # mounted packages, such as eve/extensions/code
├── instrumentation/    # OpenTelemetry and Agent Runs policies
└── sandbox.ts          # the sandbox for shell and file tools
```

On Vercel, [Vercel Functions](https://vercel.com/docs/functions) serve the agent's HTTP routes and run your tools, Vercel Workflows persists each session, and Vercel Sandbox runs code in a [separate security context from the harness](https://vercel.com/blog/introducing-eve) that controls the agent.

After a crash, function timeout, or redeploy, the session resumes from its last completed step without an additional workflow wrapper, database, or queue. Completed steps reuse recorded results, but an interrupted step can run again. Make tools that send email, create records, or charge customers idempotent.

The deployed agent authenticates to AI Gateway with the project's OIDC identity, so the project holds no provider API key. AI Gateway adds zero markup to provider token prices, including with Bring Your Own Key (BYOK).

### When an AI SDK agent is enough

The AI SDK's `ToolLoopAgent` runs a model-and-tool loop in your app without durable checkpoints, so your app handles recovery after a crash or timeout. `WorkflowAgent` from `@ai-sdk/workflow` runs that loop inside a Vercel Workflow, and your application still owns the routes, the approval UI, and the channel integrations. eve packages durable sessions with channels, a sandbox, approvals, and evals.

For a single AI feature, an AI SDK agent can fit your application's existing routes and user interface. Compare the [execution and integration responsibilities](https://vercel.com/kb/guide/eve-vs-ai-sdk-agents-vs-workflowagent), or evaluate [other agent frameworks](https://vercel.com/i/ai-agent-frameworks) for a different architecture.

## Set up a production baseline

Initialize `my-agent` to install dependencies, set up Git, and open eve's terminal UI. The yarn command requires modern Yarn:

**pnpm**

```bash
pnpm dlx eve@latest init my-agent
```

**npm**

```bash
npx eve@latest init my-agent
```

**yarn**

```bash
yarn dlx eve@latest init my-agent
```

**bun**

```bash
bunx eve@latest init my-agent
```

Exit the terminal UI and change into `my-agent`, then link it to a Vercel project in the team you plan to use. Linking also pulls the project's environment variables.

**pnpm**

```bash
cd my-agent
pnpm exec eve link
```

**npm**

```bash
cd my-agent
npm exec -- eve link
```

**yarn**

```bash
cd my-agent
yarn eve link
```

**bun**

```bash
cd my-agent
bun run eve link
```

For production, edit `agent/agent.ts` to set provider routing, session limits, and an agent-wide approval policy:

```typescript
import { defineAgent } from "eve";

export default defineAgent({
  model: "anthropic/claude-opus-5.5",
  modelOptions: {
    providerOptions: {
      gateway: { only: ["anthropic", "bedrock"] },
    },
  },
  limits: {
    sessionUsage: ({ window }) =>
      window.inputTokens - window.cacheReadTokens >= 2_000_000 ||
      (window.costUsd ?? 0) >= 25,
    sessionTimeoutMs: 7 * 24 * 60 * 60 * 1_000,
  },
  approval: ({ toolAnnotations }) => {
    if (toolAnnotations?.destructiveHint === true) return "user-approval";
    return undefined; // leave the tool's own decision
  },
});
```

### Restrict model routing

The [`only`](https://vercel.com/docs/ai-gateway/models-and-providers/provider-filtering-and-ordering) [filter](https://vercel.com/docs/ai-gateway/models-and-providers/provider-filtering-and-ordering) restricts AI Gateway to Anthropic and Bedrock. If neither can serve a request, it fails without falling back to another provider.

### Limit session usage

The usage policy pauses before the next model call after the session reaches two million new input tokens or $25 in reported model cost. The caller can approve another usage window. Sessions that cannot ask a person, such as Markdown schedules, fail the next call with `SESSION_USAGE_LIMIT_REACHED`.

Without a custom policy, each usage window allows 40 million new input tokens. `sessionTimeoutMs` sets a seven-day idle timeout here instead of the 30-day default. Open turns, including those awaiting approval, are unaffected.

### Require review for consequential tools

The agent-wide policy asks for approval when a tool is annotated as destructive. It covers calls to authored tools, connections, extensions, and local subagents, but excludes provider-executed tools such as native web search. Other calls return `undefined` so each tool's policy can decide what to do.

eve keeps the stricter result when policies overlap. Local subagents cannot loosen the root policy, and connected servers supply their own annotations. Set explicit policies on write tools and connections rather than relying on those annotations to identify every consequential action.

### Authenticate callers before deploying

The generated `agent/channels/eve.ts` uses `placeholderAuth()`, which rejects production requests. Replace it with a policy for the callers you intend to support: `vercelOidc()` for this project's services, its `subjects` option for approved projects, or an `AuthFn` for application users. The [browser assistant](#internal-browser-assistant-behind-vercel-passport) uses Passport to establish an employee's identity.

> **Warning:**
>
> `eve deploy` deploys to Production. Finish route auth and the approval policies for your write tools before you run it.

**pnpm**

```bash
pnpm exec eve deploy
```

**npm**

```bash
npm exec -- eve deploy
```

**yarn**

```bash
yarn eve deploy
```

**bun**

```bash
bun run eve deploy
```

The command installs dependencies, deploys to Vercel, and displays build logs. Use the deployment URL to [check authentication, tool policies, and traces](#check-the-agent-before-launch) before sending business traffic.

## Build five enterprise agents

Choose the pattern that fits your workflow and start from the baseline project. Give it task-specific instructions in `agent/instructions.md`, then configure the tools, credentials, and caller policy it needs. These are separate agent configurations; combining them requires reconciling their authentication and memory scopes.

The payment endpoint and connector identifiers are placeholders for your services. The multi-tenant pattern also needs your application's verified tenant identity and authorization checks. For more business tasks and their review requirements, see these [internal agent examples](https://vercel.com/i/internal-ai-agent-examples).

### Read-only data analyst with approval for broad queries

The analyst answers questions about business data from a Postgres database. It needs three boundaries: no writes, a pause before a broad query, and no route to the database from the public internet.

Install the Postgres client, its types, and the SQL parser:

**pnpm**

```bash
pnpm add pg pgsql-ast-parser
pnpm add -D @types/pg
```

**npm**

```bash
npm install pg pgsql-ast-parser
npm install -D @types/pg
```

**yarn**

```bash
yarn add pg pgsql-ast-parser
yarn add -D @types/pg
```

**bun**

```bash
bun add pg pgsql-ast-parser
bun add -D @types/pg
```

Set `DATABASE_URL` to a database role restricted to the approved analytics data before adding the tool. Every caller in this sample uses that same role, so it does not provide per-user row or table permissions. Configure those permissions separately when analysts have different access.

Create `agent/tools/run_analytics_query.ts` to demonstrate the approval policy. The SQL checks identify some queries for review; they do not estimate execution cost or bound the database work.

```typescript
import { defineTool } from "eve/tools";
import { Pool } from "pg";
import { parse } from "pgsql-ast-parser";
import { z } from "zod";

// Created once and reused across calls.
const pool = new Pool({ connectionString: process.env.DATABASE_URL });

const MAX_ROWS = 1_000;

function isSingleSelect(sql: string): boolean {
  const statement = sql.trim().replace(/;\s*$/, "");
  return /^select\b/i.test(statement) && !statement.includes(";");
}

// A stand-in for your own cost estimate.
function isBroad(sql: string): boolean {
  try {
    const statements = parse(sql);
    const statement = statements[0];
    return (
      statements.length !== 1 ||
      statement?.type !== "select" ||
      !statement.where ||
      statement.limit?.limit?.type !== "integer" ||
      statement.limit.limit.value > MAX_ROWS
    );
  } catch {
    // Unsupported or invalid SQL requires approval rather than bypassing it.
    return true;
  }
}

export default defineTool({
  description:
    "Run one read-only SQL SELECT statement against " +
    "the analytics database and return rows.",
  inputSchema: z.object({
    sql: z.string().min(1).describe(
      "A single read-only SQL SELECT statement.",
    ),
  }),
  approval: ({ session, toolInput }) => {
    if (session.auth.current?.principalType !== "user") {
      return { type: "denied", reason: "Sign in to query analytics data." };
    }
    const sql = toolInput?.sql ?? "";
    if (!isSingleSelect(sql)) {
      return {
        type: "denied",
        reason: "Only a single SELECT statement is allowed.",
      };
    }
    return isBroad(sql) ? "user-approval" : "not-applicable";
  },
  async execute({ sql }) {
    if (!isSingleSelect(sql)) {
      throw new Error("Only a single SELECT statement is allowed.");
    }
    const client = await pool.connect();
    try {
      const { rows } = await client.query(sql);
      return { rowCount: rows.length, rows: rows.slice(0, MAX_ROWS) };
    } finally {
      client.release();
    }
  },
});
```

#### Limit queries and preserve database permissions

The policy denies unauthenticated callers and obvious non-SELECT statements. Queries without a top-level `WHERE`, a bounded literal `LIMIT`, or syntax the parser understands wait for the requester's approval. By default, only the person whose turn requested the call can approve or cancel it. Replace this heuristic with your database's cost estimate when query size affects availability.

`MAX_ROWS` trims tool output after the query; it does not bound database work or the function's memory use. Production queries need a read-only transaction, a statement timeout, and bounded or streamed results. The [Data Analyst template](https://vercel.com/templates/eve/eve-data-analyst) demonstrates read-only transactions, timeouts, and cost-based approval.

Approval does not grant database permissions. The read-only role remains the write boundary, and `execute` repeats the statement check before sending SQL. For per-user access, map verified users to database roles as the Data Analyst template does. Keep metric definitions in `agent/skills/metric-definitions.md` so terms such as churn follow your team's rules.

#### Connect to a private database

Configure the project's [Secure Compute](https://vercel.com/docs/networking/secure-compute) network and a route to the private database. This Enterprise add-on carries tool requests from Vercel Functions over that path. Follow the [private AWS RDS setup](https://vercel.com/kb/guide/give-eve-agent-secure-access-to-aws-rds-database) for VPC peering, routing, and security groups; project attachment alone does not configure them.

Sandbox shell commands need their own network attachment to reach the database. Keeping SQL in the authored tool also keeps the database credential in the application runtime.

### Incident investigator in Slack

The investigator answers mentions in an alerts channel, reads issues in Linear, and posts its findings in the thread. Each Slack thread is one eve session, and approvals appear in the thread as buttons.

Add the Slack channel, and choose Vercel Connect when prompted:

**pnpm**

```bash
pnpm exec eve add channel/slack
```

**npm**

```bash
npm exec -- eve add channel/slack
```

**yarn**

```bash
yarn eve add channel/slack
```

**bun**

```bash
bun run eve add channel/slack
```

The command creates or reuses a Slack app through Vercel Connect and writes `agent/channels/slack.ts`, where `slack/my-agent` stands for your connector's UID:

```typescript
import { connectSlackCredentials } from "@vercel/connect/eve";
import { slackChannel } from "eve/channels/slack";

export default slackChannel({
  credentials: connectSlackCredentials("slack/my-agent"),
});
```

`connectSlackCredentials` resolves the bot token and supplies the webhook verifier, so the project has no `SLACK_BOT_TOKEN` or `SLACK_SIGNING_SECRET`. Webhook verification shows where an event came from. It doesn't show that the sender should reach your agent, because Slack Connect can deliver events from people outside your workspace. To allow only certain people, check the sender in each inbound hook, as the [Slack channel reference](https://eve.dev/docs/channels/slack) shows.

Create a Linear connector and attach it to the project:

```bash
vercel connect create linear --name acme-linear
vercel connect attach linear/acme-linear
```

Inspect the tools exposed by your authorized Linear MCP connection before creating `agent/connections/linear.ts`. Replace the sample names in `READ_TOOLS` and `WRITE_TOOLS` with the server's current names, and keep the allowlist limited to the operations the investigator needs.

```typescript
import { connect } from "@vercel/connect/eve";
import { defineMcpClientConnection } from "eve/connections";

// Reads run without a prompt. Every other allowed tool waits for approval.
const READ_TOOLS = ["search_issues", "get_issue"];
const WRITE_TOOLS = ["create_comment"];

export default defineMcpClientConnection({
  url: "https://mcp.linear.app/mcp",
  description: "Linear issues, projects, cycles, and comments.",
  auth: connect("linear/acme-linear"),
  tools: { allow: [...READ_TOOLS, ...WRITE_TOOLS] },
  approval: ({ toolName }) =>
    READ_TOOLS.some((tool) => toolName.endsWith(`__${tool}`))
      ? "not-applicable"
      : "user-approval",
});
```

The filename names the connection `linear`; eve prefixes its tools with `linear__`. The allowlist limits which tools the model can discover, and the approval policy pauses every allowed operation except the listed reads.

`connect()` defaults to a user principal. Each Slack user authorizes their own Linear account, and the agent calls Linear with that person's token. When someone hasn't authorized yet, eve suspends the turn and sends the sign-in link to that person in an ephemeral message. Sessions with no user principal, such as a runtime or service caller, fail with `reason: 'principal_required'` and never start OAuth.

Configure other channels with [Connect's eve adapters](https://vercel.com/docs/connect/frameworks/eve) and adjust [MCP tool filters](https://vercel.com/docs/mcp/integrations/eve) to match the investigator's role. For an agent that gathers evidence from Datadog, GitHub, Vercel, and Slack, start with the [incident response template](https://vercel.com/kb/guide/eve-incident-sre-agent).

### Software factory that opens reviewed draft pull requests

Software factories turn a work item into a draft pull request that a person reviews and merges. Rillet built one on eve that takes in customer requests, converts them into specs, tests the changes, and opens pull requests for human review. [Rillet's customer story](https://vercel.com/blog/how-rillet-ships-3-faster-with-ai-agents-on-vercel) reports that the company tripled its shipping rate in three months.

Mount eve's bundled code extension in `agent/extensions/code.ts`:

```typescript
import code from "eve/extensions/code";

export default code({});
```

The code extension adds repository instructions and skills, including support for `AGENTS.md`. Opening pull requests also requires `eve/extensions/git`, GitHub authorization, and its credential broker; installing `gh` alone does not grant repository access. Configure those pieces with the [software factory setup](https://vercel.com/kb/guide/eve-software-factory), including explicit approval rules for shell and repository writes. The baseline's destructive-annotation filter does not establish those rules by itself.

#### Prepare the coding workspace

Create a [drive](https://vercel.com/docs/drives) named `agent-data` in `iad1`, in the same Vercel project as the agent, and write your reference data to it. Then create `agent/sandbox.ts` to install the coding tools and mount the drive:

```typescript
import { installCodeTooling } from "eve/extensions/code/sandbox";
import { defineSandbox } from "eve/sandbox";
import { VercelSandbox } from "eve/sandbox/vercel";

export const environment = VercelSandbox.environment({
  region: "iad1",
  prepare: async (sandbox) => {
    await installCodeTooling(sandbox, { vercel: true });
  },
});

export default defineSandbox(() =>
  environment.open({
    mounts: {
      "/data": { drive: "agent-data", mode: "snapshot" },
    },
  }),
);
```

The environment's `prepare` callback installs `gh` and its wrappers. Each session mounts a read-only snapshot of the reference data at `/data`; populate the drive before opening a snapshot mount and keep it in the sandbox's region.

Mounts must remain outside eve's managed `/workspace` directory. Snapshot mounts do not consume the drive's single read-write mount, so concurrent sessions can read the same data. Use a [read-write drive per user](https://vercel.com/kb/guide/vercel-drives-eve-agent) when sessions need to retain their own changes.

#### Review changes before opening a pull request

Add the reviewer as a declared subagent in `agent/subagents/reviewer/agent.ts`:

```typescript
import { defineAgent } from "eve";

export default defineAgent({
  description:
    "Review the supplied diff and acceptance criteria. " +
    "Report defects and missing tests without changing files.",
  model: "anthropic/claude-opus-5.5",
});
```

The parent calls `reviewer` and must include the diff, relevant source context, and acceptance criteria in its message. This reviewer has no repository connection or shared workspace, so it reviews that supplied material. To inspect the branch itself, give it a separate read-only connection or prepared workspace.

Declared subagents need a description and do not inherit the root's tools, instructions, or sandbox configuration. The root's approval policy still applies to their local calls. If opening a pull request must wait for review, use a workflow tool that awaits the reviewer; an instruction alone cannot enforce that order.

#### Set approval rules for shell commands

For shell calls, [automatic approval review](https://vercel.com/kb/guide/auto-approve-tool-calls-eve-jev) can classify an action before it runs. The `auto()` policy from `eve/tools/approval` asks a decision model and prompts a person when the result is caution or the review fails. Its provider receives the tool name and input, so keep credentials out of those arguments.

The [software factory guide](https://vercel.com/kb/guide/eve-software-factory) deploys a full factory whose four stations end in a reviewed draft pull request, and the [subagents guide](https://vercel.com/kb/guide/how-to-use-eve-subagents) covers delegation in depth. To decide whether to split work across agents at all, read about [multi-agent systems](https://vercel.com/i/multi-agent-systems).

### Multi-tenant customer operations agent

One deployment serves many customers, and each customer's users must reach only their own tenant's memory and records. Configure your `AuthFn` in `agent/channels/eve.ts` to return a verified user principal with a stable user ID and issuer, plus the verified `tenantId` in its attributes. The model must never supply that identity through a prompt or tool argument.

#### Keep session access separate from memory scope

Route authentication establishes identity; your application must also authorize every operation on an existing session. Store its tenant and permitted users, then enforce that ownership on continuation, streaming, cancellation, compaction, clearing, and ending. Check access before forwarding a request to eve, and create new sessions under the verified caller's ownership.

Memory scoping does not hide content already present in a shared transcript. Give users who must not see one another's data separate sessions, and test those boundaries with a second tenant. See [AI data leakage](https://vercel.com/i/how-ai-data-leakage-happens) and [RBAC and ABAC](https://vercel.com/i/rbac-vs-abac-access-control-apps-agents) for the access decisions your application needs.

#### Scope memory by tenant and user

Scope saved context in `agent/memory/profile.ts`:

```typescript
import { defineMemory } from "eve/memory";
import { byPrincipal } from "eve/memory/scope";
import { fileMemory } from "eve/memory/file";

export default defineMemory({
  description: "Remember durable facts for the authenticated tenant user.",
  provider: fileMemory(),

  scope(ctx) {
    const caller = ctx.session.auth.current;
    const tenantId = caller?.attributes.tenantId;
    const principal = byPrincipal(ctx);

    // Require a verified user, tenant, and memory principal.
    if (
      caller?.principalType !== "user" ||
      typeof tenantId !== "string" ||
      principal === null
    ) {
      return null;
    }

    // one memory per user within each tenant
    return [tenantId, principal];
  },
});
```

eve supplies the scope key to the memory provider, so the model cannot select another tenant's memory. Returning `null` disables memory for callers without a verified user and tenant. When the caller changes, eve recalls the new scope; the session-access checks must still prevent exposure of earlier conversation content.

On Vercel, `fileMemory()` stores documents in a private [Blob store](https://vercel.com/docs/vercel-blob). You can [choose another provider](https://vercel.com/kb/guide/choose-an-eve-memory-provider) or [build one](https://vercel.com/kb/guide/build-a-custom-eve-memory-provider) while retaining the same scope policy.

#### Authorize and deduplicate refunds

Before adding `agent/tools/refund_charge.ts`, define the payments service's authorization contract. It must verify the caller's current tenant membership, refund permission, and ownership of the charge immediately before applying a refund. Pass the verified caller identity through a trusted server-to-server request; the model must not choose the caller or tenant.

The sample uses integer cents for USD and requires approval above $100. Adapt the schema, currency, and threshold to your payment service.

```typescript
import { defineTool } from "eve/tools";
import { z } from "zod";

// This sample payment API accepts USD amounts in integer cents.
const APPROVAL_THRESHOLD_CENTS = 10_000;

export default defineTool({
  description: "Refund a charge for the current tenant.",
  inputSchema: z.object({
    chargeId: z.string().min(1),
    amountCents: z.number().int().positive(),
  }),
  approval: ({ session, toolInput }) => {
    const current = session.auth.current;
    const tenantId = current?.attributes.tenantId;
    const initiatorTenantId = session.auth.initiator?.attributes.tenantId;

    if (
      current?.principalType !== "user" ||
      !current.issuer ||
      typeof tenantId !== "string" ||
      tenantId !== initiatorTenantId
    ) {
      return {
        type: "denied",
        reason: "A user in the session's original tenant is required.",
      };
    }

    return (toolInput?.amountCents ?? 0) > APPROVAL_THRESHOLD_CENTS
      ? "user-approval"
      : "not-applicable";
  },
  async execute({ chargeId, amountCents }, ctx) {
    const caller = ctx.session.auth.current;
    const tenantId = caller?.attributes.tenantId;
    if (
      caller?.principalType !== "user" ||
      !caller.issuer ||
      typeof tenantId !== "string" ||
      tenantId !== ctx.session.auth.initiator?.attributes.tenantId
    ) {
      throw new Error("An authenticated tenant is required.");
    }

    const response = await fetch("https://payments.example.com/v1/refunds", {
      method: "POST",
      headers: {
        authorization: `Bearer ${process.env.PAYMENTS_API_KEY}`,
        "content-type": "application/json",
        "idempotency-key": `${ctx.session.id}:${ctx.callId}`,
        "x-tenant-id": tenantId,
        "x-user-id": caller.principalId,
        "x-user-issuer": caller.issuer,
      },
      body: JSON.stringify({ chargeId, amountCents, currency: "USD" }),
    });
    if (!response.ok) {
      throw new Error(`Payments API returned ${response.status}.`);
    }
    return await response.json();
  },
});
```

The policy checks that the caller is a user in the session's original tenant, then pauses refunds above the configured threshold for approval. Execution repeats that identity check and sends the verified tenant, user ID, and issuer to the payments service. Permissions can change during approval, so the service must recheck membership, charge ownership, and refund permission before issuing the refund.

`PAYMENTS_API_KEY` is a placeholder environment variable for your own payments service. Set it in the project's environment variables, and replace the URL and headers with that service's contract. The service must also reject a charge that belongs to another tenant.

The key combines the session ID with the tool-call ID. Retries of that call reuse the key, while another refund in the same turn gets a different one. Your payments service must honor the key; a separate model call is a new operation even if its arguments match an earlier refund.

### Internal browser assistant behind Vercel Passport

An internal assistant with a browser interface should accept only employees who signed in through your identity provider. [Vercel Passport](https://vercel.com/docs/passport) authenticates visitors before requests reach the deployment, and the channel's `AuthFn` turns the verified identity into the eve principal. Passport requires an Enterprise plan.

Install the Passport SDK in the eve project:

**pnpm**

```bash
pnpm i @vercel/passport
```

**npm**

```bash
npm i @vercel/passport
```

**yarn**

```bash
yarn add @vercel/passport
```

**bun**

```bash
bun add @vercel/passport
```

[Configure Passport](https://vercel.com/docs/passport) for the deployment that serves the browser UI and agent. After signing in, [read a verified identity](https://vercel.com/docs/passport/read-identity) in server code and copy its `identity.payload.aud` value into the project's `PASSPORT_AUDIENCE` environment variable. This fixes the expected audience independently of incoming requests.

Keep Vercel's system environment variables available to the deployment. The Passport SDK uses `VERCEL_PROJECT_ID` and the deployment environment to check that the identity belongs to this project and environment. Then replace `agent/channels/eve.ts` with the following policy.

```typescript
import { getIdentity } from '@vercel/passport';
import type { AuthFn } from 'eve/channels/auth';
import { eveChannel } from 'eve/channels/eve';

const passportAuth: AuthFn<Request> = async (request) => {
  try {
    const audience = process.env.PASSPORT_AUDIENCE;
    if (!audience) return null;
    const identity = await getIdentity(request, {
      development: false,
      verifyOptions: { audience },
    });
    if (!identity?.verified || !identity.payload.iss) return null;

    return {
      authenticator: 'passport',
      principalType: 'user',
      issuer: identity.payload.iss,
      principalId: identity.subject,
      attributes: {},
    };
  } catch {
    return null;
  }
};

export default eveChannel({ auth: passportAuth });
```

The policy accepts verified Passport visitors and identifies them by issuer and subject. With a memory provider scoped through `byPrincipal`, that identity gives the same employee a consistent memory scope across conversations. Add memory separately; sharing it with Slack also requires identity mapping.

Local development identities are rejected by `development: false`. The terminal UI's project OIDC login and background workers also need a different policy. If you use a `groups` claim for permissions, validate its presence and type before authorizing an action; the [Passport setup](https://vercel.com/kb/guide/vercel-passport) covers the identity provider configuration.

#### Choose which trace content to retain

Make the Agent Runs content policy explicit in the instrumentation file:

```typescript
import { agentRuns } from 'eve/instrumentation/otel';

export default agentRuns({
  exportPolicy: {
    span: ({ audience }) =>
      audience === 'public'
        ? { emit: true }
        : { redact: true, inputs: true, outputs: true },
  },
});
```

This policy explicitly removes inputs and outputs from Agent Runs spans unless the session is public. It preserves the metadata needed to inspect execution without exporting prompts, responses, reasoning, tool arguments, or results. Private sessions already default to metadata-only tracing in Preview and Production.

The policy applies to Agent Runs alone. Other OpenTelemetry destinations follow the process-wide trace policy, and an export destination cannot restore content that the process-wide policy excluded. Use the [tracing settings](https://vercel.com/kb/guide/trace-and-debug-eve-agent-runs) for both layers and retain approval and outcome records for [agent audits](https://vercel.com/i/how-to-audit-ai-agents).

## Connect the agent to Vercel for Enterprise controls

Platform teams govern who can deploy an agent, who can use it, and which services and models it may call. These [Vercel for Enterprise controls](https://vercel.com/blog/vercel-for-enterprise) support the same eve framework Vercel uses for its internal agents. Assign an owner for each configuration and connect it to your application's [agent governance](https://vercel.com/i/ai-agent-governance) policies.

### Deployment governance

[Enterprise Managed Users](https://vercel.com/docs/security/enterprise-managed-users) (EMU), an Enterprise feature, lets your team own each member's Vercel account. Members sign in only through your SAML SSO provider with a managed account. EMU requires SAML SSO, SSO enforcement, Directory Sync (SCIM), and a verified email domain. [Role-based access control](https://vercel.com/docs/rbac) then sets what each member can do within the team.

These controls govern the people who build and deploy an agent. They don't decide who can message a deployed agent, which is the job of access governance. Rillet, which builds its agents with eve, moved its builders from personal to company-managed accounts in one transition when it set up EMU. Before more employees rely on an agent, name an owner and settle [how you govern employee-built agents](https://vercel.com/i/govern-employee-built-ai-apps-and-agents).

### Access governance

Passport requires visitors to sign in through your identity provider before they reach the deployment and records successful access in Activity Log and Audit Logs. Your application then checks which records that employee may read and which actions they may perform. Depending on your backend architecture, you can:

- [Read the identity](https://vercel.com/docs/passport/read-identity) in server code with `getIdentity()`.
  
- [Add claims such as](https://vercel.com/docs/passport/additional-identity-scopes) [`groups`](https://vercel.com/docs/passport/additional-identity-scopes) to the Passport token.
  
- [Forward the token](https://vercel.com/docs/passport/forward-identity) over HTTPS to another backend you operate.
  
- [Verify a forwarded token](https://vercel.com/docs/passport/verify-identity) at that backend with `verifyIdentity()`.
  

#### Authenticate service callers

Deployments behind Passport redirect requests without a session to sign-in. Webhooks, cron endpoints, and other machine-to-machine routes need a [Protection Bypass for Automation](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation) secret on the original request. The bypass admits the request through deployment protection; it does not replace eve's route authentication or provide a Passport identity.

Background workers such as Vercel Daemons also need an explicit service-caller policy. Use `vercelOidc()` with the daemon's OIDC identity instead of the visitor-only Passport policy, and keep service credentials separate from employee sessions.

#### Set access defaults for internal apps

[Deployment Protection](https://vercel.com/docs/deployment-protection) sets team defaults for new projects, including a protection level and a method such as Vercel Authentication, Passport, or Password Protection. Compare the [protection methods](https://vercel.com/kb/guide/vercel-passport-vs-deployment-protection) for your app. Apply [Vercel Firewall](https://vercel.com/docs/vercel-firewall) [rate limiting](https://vercel.com/docs/vercel-firewall/vercel-waf/rate-limiting) to routes that start agent work to limit incoming requests and model spend.

Two customer stories show these controls on internal apps, without eve. [Mercor](https://vercel.com/blog/how-mercor-ships-internal-apps-and-billions-of-production-tokens-on-one-platform) uses Passport to handle access to its applications and AI Gateway to manage model access. [Klaviyo](https://vercel.com/blog/how-klaviyo-shipped-356-internal-apps-in-two-weeks-on-vercel) gives every app on its internal platform the same access defaults through Passport and its identity provider.

### Integration and data governance

Vercel Connect gives agents short-lived access to services such as Slack, GitHub, and Linear without provider secrets in your environment variables. You set up a connector once at the team level, and any project you allow can request tokens from it. The [announcement](https://vercel.com/blog/introducing-vercel-connect) and the [Vercel Connect guide](https://vercel.com/kb/guide/vercel-connect) cover the product as a whole. For an eve agent, these behaviors matter most:

- With the default user principal, each person authorizes their own account, and eve suspends the turn while they do.
  
- With `principalType: 'app'`, the agent shares one installed credential and never starts a consent flow. If the connector has no app credential, the call fails until an operator fixes it.
  
- When a user disconnects, revoke their grant through the authorization returned by `connect()`. Call `evict` with the principal, connection context, and `revoke: true`; provider revocation is best-effort.
  
- Every connector has an **Observability** tab that logs token requests, authorizations, trigger deliveries, and revocations. On Pro and Enterprise, a [Drain](https://vercel.com/docs/drains) forwards those events to your own endpoint.
  

#### Approve service access through your identity provider

[Enterprise-Managed Authorization](https://vercel.com/docs/connect/ema), currently in beta, lets administrators approve service access through an identity provider such as Okta. Connect exchanges the signed-in user's IdP refresh token for an identity assertion, then for a service token, so users do not need a separate consent prompt at each approved service.

Configure the IdP and resource connectors on both sides. The Passport connector needs `openid` and `offline_access` so Connect can use the user's refresh token; start a new Passport session after changing those scopes.

Use this function in a Passport-protected Next.js app with `@vercel/connect`, `@vercel/passport`, and `server-only` installed. Replace `oauth/resource` with the resource connector's UID and request only the required scopes.

```typescript
import 'server-only';
import { getToken } from '@vercel/connect';
import { requireIdentity } from '@vercel/passport';

export async function getResourceToken(scopes: string[]) {
  const identity = await requireIdentity();

  return getToken('oauth/resource', { subject: identity, scopes });
}
```

Use the returned token only for a server-side request to the resource. This Next.js helper uses Passport's request context; it is not a drop-in eve connection file. The eve adapter's user-consent flow does not establish that the EMA exchange has been configured for this application.

Test on a Passport-protected deployment because the local development identity has no token. If Connect throws `UserAuthorizationRequiredError`, check the IdP refresh token, app approval, and permitted scopes before asking the user to sign in again. Keep those failures separate from an ordinary consent request.

### Model and token governance

When the agent and its subagents use AI Gateway model strings, their model calls go through [AI Gateway](https://vercel.com/docs/ai-gateway), so team-wide AI Gateway settings apply without a code change. Each control is separate, and turning one on doesn't turn on another:

| Control                                                                                                                                                                                      | What it does                                                                                    | Availability and failure behavior                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [Zero Data Retention](https://vercel.com/docs/ai-gateway/security-and-compliance/zdr) (ZDR)                                                                                                  | Routes only to providers with verified zero data retention agreements, team-wide or per request | Pro and Enterprise, or purchased AI Gateway credits. The request fails when no compliant provider serves the model. |
| [Disallow Prompt Training](https://vercel.com/docs/ai-gateway/security-and-compliance)                                                                                                       | Routes only to providers that don't train on your prompts                                       | Separate from ZDR. To enforce both, turn on both. It isn't enforced on BYOK requests.                               |
| [Regional Inference](https://vercel.com/docs/ai-gateway/security-and-compliance/regional-inference)                                                                                          | Pins the inference region to `us`, `eu`, `au`, or `jp` where the provider supports it           | The request fails when AI Gateway can't honor the region. It doesn't run somewhere else.                            |
| [Provider](https://vercel.com/docs/ai-gateway/security-and-compliance/provider-allowlist) and [Model](https://vercel.com/docs/ai-gateway/security-and-compliance/model-allowlist) Allowlists | Restrict which providers and models the team can use                                            | Pro and Enterprise. Blocked requests return `403`.                                                                  |
| [Budgets](https://vercel.com/docs/ai-gateway/observability-and-spend/budgets)                                                                                                                | Set a spend limit for a team, project, API key, or team member                                  | Once spend passes the limit, requests in that scope return `402`.                                                   |

> **Note:**
>
> Team-wide ZDR costs $0.10 per 1,000 requests, and a team-wide allowlist costs $0.10 per 1,000 billed requests. Per-request ZDR has no additional cost.

AI Gateway checks budgets before each request, so accepted requests can finish slightly above a limit. Spend through your own [BYOK credentials](https://vercel.com/docs/ai-gateway/authentication-and-byok/byok) is metered separately and excluded from budgets. The BYOK-without-fallback fee still counts, and exceeding a budget blocks all requests in its scope, including BYOK.

Layer the spend limits. `limits.sessionUsage` pauses one runaway session, a project budget in AI Gateway limits the agent's model spend, and [Spend Management](https://vercel.com/docs/spend-management) covers the team's metered Vercel resources. Spend Management is available to Pro teams and to Enterprise teams on the Flexible Commitment plan, and a budget there doesn't stop usage unless you turn on **Pause production deployments**.

[Tailscale's customer story](https://vercel.com/blog/how-tailscale-built-a-customer-facing-model-router-on-ai-gateway) shows this layer in a customer-facing product that doesn't involve eve. Its Aperture router is built on AI Gateway and Vercel Sandbox and uses the cost and usage that AI Gateway returns on every request.

### Network and infrastructure isolation

#### Connect to private systems

Secure Compute gives deployments a dedicated network with static IP addresses. It supports AWS VPC peering and site-to-site VPN connections to other clouds or on-premises systems. Configure the network path and backend credentials together; a static IP does not authenticate an agent.

On Enterprise teams, supported Vercel Connect connectors can use the Secure Compute network for token requests and provider calls.

#### Run supported functions in your AWS account

[Bring Your Own Cloud](https://vercel.com/docs/networking/bring-your-own-cloud) runs supported Vercel Functions as AWS Lambda functions in your account. Function code and execution remain there, while TLS terminates at Vercel's CDN and request and response data pass through Vercel.

BYOC supports Node.js and Python on Enterprise, excluding the Edge and container runtimes and Vercel Services. Confirm the full eve architecture with your Vercel account team before following the [BYOC setup](https://vercel.com/kb/guide/byoc). Placing Functions in your AWS account does not also move Workflow state or Sandbox execution there.

#### Separate execution and storage

Use separate services for execution, storage, memory, and background jobs:

| Building block                                             | Role in an eve agent                                                           |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Vercel Sandbox                                             | Runs shell commands and agent-generated code away from your app's credentials  |
| Vercel Drives                                              | Hold datasets and working files that persist independently of a sandbox        |
| Vercel Blob                                                | Stores `fileMemory()` documents in a private store                             |
| [Vercel Daemons](https://vercel.com/docs/daemons), in beta | Run workers that poll a queue or an external API and forward work to the agent |

Use [Daemons to send work to eve or receive jobs from its tools](https://vercel.com/kb/guide/vercel-daemons-eve-agents). Combine these boundaries with the controls for [agentic AI security](https://vercel.com/i/agentic-ai-security) when designing what an agent can reach or change.

### Observability and audit

#### Inspect execution traces

Agent Runs is available for eve projects without an instrumentation file. New projects created by `eve deploy` have 100% trace sampling configured; add a sampling rule for an existing project. During beta, Agent Runs uses Tracing rates and includes 30-day retention on all plans.

#### Decide what to retain

Private and unknown-audience sessions in Preview and Production default to metadata-only traces, including span names, timing, models, tools, and token usage. The default also requests deletion of Workflow run data when a session ends, making completed transcripts unreadable on backends that support deletion.

If you need those transcripts, set `experimental.workflow.retention` to `"default"` in `defineAgent` before the sessions start. This keeps run data for the backend's default retention period without changing trace content. The setting remains experimental and has no compatibility guarantee.

#### Keep approval and outcome records

For a refund, execution traces show what the agent tried, the application's approval record identifies who authorized it, and the payment provider confirms the outcome. Keep these records correlated so an operator can reconstruct the action.

Use the platform records and checks alongside your application's audit trail:

- [Audit Logs](https://vercel.com/docs/audit-log), on Enterprise, track team members' activity, export the last 90 days as CSV, and stream through Audit Log Drains. They also hold the `passport-access-granted` events.
  
- The [Security Dashboard](https://vercel.com/docs/security/security-dashboard) runs a fixed set of checks across the team. Two apply directly to agent projects: preview deployments without protection, and long-lived static credentials where OIDC is available.
  
- Use the [Agent Checklist for Launch](https://vercel.com/docs/agent-checklist) to check readiness before production.
  

## Check the agent before launch

Test the configured deployment with non-production records before routing business traffic to it. Cover both the normal workflow and rejected requests:

1. Send an unauthenticated `POST` request to `/eve/v1/session`. eve responds with `401`. Behind Passport or Deployment Protection, the deployment returns a sign-in redirect before the request reaches eve.
   
2. Send a message as an intended caller. The `/eve/v1/health` route skips authentication, so it does not test model access or session permissions.
   
3. Exercise allowed, denied, and approval-required actions. Check that the requester can respond to the prompt, another user cannot approve it unless explicitly authorized, and a denied tool does not run.
   
4. Sign in as another tenant and try to continue, stream, cancel, or end the first tenant's session. Confirm that session ownership and memory remain isolated.
   
5. Revoke a user's business permission while a tool waits for approval. Confirm the action is rejected when execution resumes.
   
6. Retry one refund call and confirm it is deduplicated. Then issue a different refund in the same turn and check that it has a distinct operation key.
   
7. Inspect built-in shell and file tools as well as the authored tools. Confirm that every enabled tool has the access and approval policy intended for this agent.
   
8. Open **Observability**, then **Agent Runs**, and confirm the run shows the tool calls. For a private session, confirm prompts and tool results are absent.
   
9. Confirm which AI Gateway budgets apply to the deployed agent, including team limits and any default project budget. Add a project budget when you need a separate cap for this agent.
   

## Next steps

- Create and deploy your first agent with [eve on Vercel](https://vercel.com/docs/frameworks/agents/eve)
  
- Work through the [Agent Checklist for Launch](https://vercel.com/docs/agent-checklist) before production traffic
  
- Give connections per-user credentials with [eve with Vercel Connect](https://vercel.com/docs/connect/frameworks/eve)
  

## Related resources

### Docs

- eve: [eve on Vercel](https://vercel.com/docs/frameworks/agents/eve), [eve with Vercel Connect](https://vercel.com/docs/connect/frameworks/eve), [eve with MCP](https://vercel.com/docs/mcp/integrations/eve), and [Agent Checklist for Launch](https://vercel.com/docs/agent-checklist)
  
- Identity and access: [Passport](https://vercel.com/docs/passport), [Deployment Protection](https://vercel.com/docs/deployment-protection), [Vercel Firewall](https://vercel.com/docs/vercel-firewall), [Enterprise Managed Users](https://vercel.com/docs/security/enterprise-managed-users), and [RBAC](https://vercel.com/docs/rbac)
  
- Credentials: [Vercel Connect](https://vercel.com/docs/connect) and [Enterprise-Managed Authorization](https://vercel.com/docs/connect/ema)
  
- Models and spend: [AI Gateway](https://vercel.com/docs/ai-gateway), [Zero Data Retention](https://vercel.com/docs/ai-gateway/security-and-compliance/zdr), [Regional Inference](https://vercel.com/docs/ai-gateway/security-and-compliance/regional-inference), [Budgets](https://vercel.com/docs/ai-gateway/observability-and-spend/budgets), and [Spend Management](https://vercel.com/docs/spend-management)
  
- Network and runtime: [Secure Compute](https://vercel.com/docs/networking/secure-compute), [Bring Your Own Cloud](https://vercel.com/docs/networking/bring-your-own-cloud), [Vercel Workflows](https://vercel.com/docs/workflows), [Vercel Sandbox](https://vercel.com/docs/sandbox), [Vercel Drives](https://vercel.com/docs/drives), and [Daemons](https://vercel.com/docs/daemons)
  
- Audit: [Agent Runs](https://vercel.com/docs/agent-runs), [Audit Logs](https://vercel.com/docs/audit-log), and [Security Dashboard](https://vercel.com/docs/security/security-dashboard)
  

### KB guides

- [Choosing between eve, AI SDK agents, and](https://vercel.com/kb/guide/eve-vs-ai-sdk-agents-vs-workflowagent) [`WorkflowAgent`](https://vercel.com/kb/guide/eve-vs-ai-sdk-agents-vs-workflowagent)
  
- [Build a software factory with eve](https://vercel.com/kb/guide/eve-software-factory)
  
- [Build an incident response sre agent with eve](https://vercel.com/kb/guide/eve-incident-sre-agent)
  
- [Give your eve agent secure access to your private AWS RDS database](https://vercel.com/kb/guide/give-eve-agent-secure-access-to-aws-rds-database)
  
- [How to use Vercel Drives with an eve agent](https://vercel.com/kb/guide/vercel-drives-eve-agent)
  
- [Use Vercel Daemons with eve agents](https://vercel.com/kb/guide/vercel-daemons-eve-agents)
  
- [How to choose an eve memory provider](https://vercel.com/kb/guide/choose-an-eve-memory-provider)
  
- [How to automatically approve tool calls in eve with Jev](https://vercel.com/kb/guide/auto-approve-tool-calls-eve-jev)
  
- [Trace and debug eve agent runs](https://vercel.com/kb/guide/trace-and-debug-eve-agent-runs)
  
- [Protect internal apps with Vercel Passport and your identity provider](https://vercel.com/kb/guide/vercel-passport)
  
- [Choose between Vercel Passport and other Deployment Protection methods](https://vercel.com/kb/guide/vercel-passport-vs-deployment-protection)
  
- [The Complete Guide to Vercel Connect](https://vercel.com/kb/guide/vercel-connect)
  
- [Run Vercel Functions in your own AWS account with BYOC](https://vercel.com/kb/guide/byoc)
  

### Blog posts

- [Introducing eve 1.0](https://vercel.com/blog/eve-is-now-generally-available)
  
- [Introducing eve](https://vercel.com/blog/introducing-eve)
  
- [Vercel for Enterprise](https://vercel.com/blog/vercel-for-enterprise)
  
- [Vercel for Enterprise Apps and Agents](https://vercel.com/blog/vercel-for-enterprise-apps-and-agents)
  
- [Introducing Vercel Connect](https://vercel.com/blog/introducing-vercel-connect)
  

### Customer stories

- [How Rillet ships 3× faster with AI agents on Vercel](https://vercel.com/blog/how-rillet-ships-3-faster-with-ai-agents-on-vercel)
  
- [How Mercor ships internal apps and billions of production tokens on one platform](https://vercel.com/blog/how-mercor-ships-internal-apps-and-billions-of-production-tokens-on-one-platform)
  
- [How Klaviyo shipped 356 internal apps in two weeks on Vercel](https://vercel.com/blog/how-klaviyo-shipped-356-internal-apps-in-two-weeks-on-vercel)
  
- [How Tailscale built a customer-facing model router on AI Gateway](https://vercel.com/blog/how-tailscale-built-a-customer-facing-model-router-on-ai-gateway)
  

### Index articles

- [What are enterprise AI agents?](https://vercel.com/i/enterprise-ai-agents)
  
- [How to implement AI agent governance](https://vercel.com/i/ai-agent-governance)
  
- [How do you govern AI apps and agents built by employees?](https://vercel.com/i/govern-employee-built-ai-apps-and-agents)
  
- [How do you audit what an AI agent did?](https://vercel.com/i/how-to-audit-ai-agents)
  
- [7 internal AI agents teams can build](https://vercel.com/i/internal-ai-agent-examples)
  
- [A guide to agentic AI security](https://vercel.com/i/agentic-ai-security)
  
- [RBAC vs ABAC for access control in apps and agents](https://vercel.com/i/rbac-vs-abac-access-control-apps-agents)
  
- [How AI data leakage happens in apps and agents](https://vercel.com/i/how-ai-data-leakage-happens)
  
- [8 best AI agent frameworks compared for control, state, and coordination](https://vercel.com/i/ai-agent-frameworks)
  
- [Multi-agent systems architecture](https://vercel.com/i/multi-agent-systems)

## Related Resources

- [What are enterprise AI agents?](https://vercel.com/i/enterprise-ai-agents): Learn what enterprise AI agents are, their security risks and controls, responsible AI frameworks, and where shadow AI and citizen developers fit.
- [Vercel for Enterprise: a control plane for apps and agents](https://vercel.com/blog/vercel-for-enterprise): See how one control plane governs deployments, data access, models, and token budgets for every builder, managed through your existing IdP.
- [How do you govern AI apps and agents built by employees?](https://vercel.com/i/govern-employee-built-ai-apps-and-agents): Give every employee-built app an owner, set baseline controls for access, data, and spend, and review apps before wider use.
- [How do you build an audit trail for what an AI agent did?](https://vercel.com/i/how-to-audit-ai-agents): Connect identity, tool calls, approvals, and results into one record, so you can reconstruct what an agent did and investigate mistakes.
- [Choosing between eve, AI SDK agents, and \`WorkflowAgent\`](/kb/guide/eve-vs-ai-sdk-agents-vs-workflowagent): Compare eve, \`ToolLoopAgent\`, and \`WorkflowAgent\` by durability, approvals, channels, and setup to choose an agent framework for your TypeScript application.

## More eve guides

- [Choosing between eve, AI SDK agents, and \`WorkflowAgent\`](/kb/guide/eve-vs-ai-sdk-agents-vs-workflowagent): Compare eve, \`ToolLoopAgent\`, and \`WorkflowAgent\` by durability, approvals, channels, and setup to choose an agent framework for your TypeScript application.
- [Deploy a Shopify storefront with an AI assistant](/kb/guide/deploy-shopify-ai-storefront): Deploy an eve shopping agent with Vercel Shop to find Shopify products, manage carts, and answer store questions.
- [Build your first Slack agent with eve](/kb/guide/eve-slack-agent-starter): Deploy the eve Slack agent template: a starter Slack bot built on the eve framework with an example tool and skill.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```
