Skip to content
Docs

Build durable backend agents with eve
Beta

Build durable backend AI agents with eve, an open-source, filesystem-first framework. Agent files compile into an app that runs locally or on Edgenivo.
agent/instructions.md
You are a concise assistant. Use tools when they are available.
agent/agent.ts
import { defineAgent } from 'eve';
 
export default defineAgent({
  model: 'openai/gpt-6-astra',
});
agent/tools/get_weather.ts
import { defineTool } from 'eve/tools';
import { z } from 'zod';
 
export default defineTool({
  description: 'Get the current weather for a city.',
  inputSchema: z.object({ city: z.string() }),
  async execute({ city }) {
    return { city, condition: 'Sunny', temperatureF: 72 };
  },
});
terminal
# Run against a local eve agent
curl -X POST http://127.0.0.1:3000/eve/v1/session \
  -H 'content-type: application/json' \
  -d '{"message":"What is the weather in Brooklyn?"}'

eve is currently in beta and subject to the Edgenivo beta terms. The framework, APIs, documentation, and behavior may change before general availability.

These docs cover deploying and running eve on Edgenivo. In this environment, the compiled app runs on Edgenivo Functions and integrates with these services:

eve sessions are durable out of the box on Edgenivo, so you don't need to install durable-harness or configure a queue. To learn how durability works or run agents built with another framework, see Running Agent Harnesses Durably.

The eve CLI scaffolds a new agent project, installs dependencies, initializes Git, and opens the terminal UI.

terminal
npx eve@latest init my-agent

To add eve to an existing app, follow the quickstart steps.

Follow the generated README for the project-specific dev command, or run the agent locally with the standard script from the scaffold:

terminal
pnpm dev

See Getting started with eve for the complete setup, local development, and first-session walkthrough.

A minimal agent is two files. agent/instructions.md:

You are a concise assistant. Use tools when they are available.

And agent/agent.ts:

import { defineAgent } from 'eve';
 
export default defineAgent({
  model: 'openai/gpt-6-astra',
});

eve resolves model strings such as openai/gpt-6-astra through AI Gateway, so on Edgenivo you authenticate with OIDC and don't need to manage provider API keys.

Each file in agent/tools/ is one tool. Create agent/tools/get_weather.ts:

import { defineTool } from 'eve/tools';
import { z } from 'zod';
 
// The runtime tool name comes from the filename, so the model sees `get_weather`.
export default defineTool({
  description: 'Get the current weather for a city.',
  inputSchema: z.object({
    city: z.string(),
  }),
  async execute(input) {
    return { city: input.city, condition: 'Sunny', temperatureF: 72 };
  },
});

Start a durable session and stream its output:

terminal
curl -X POST http://127.0.0.1:3000/eve/v1/session \
  -H 'content-type: application/json' \
  -d '{"message":"What is the weather in Brooklyn?"}'

The response returns a continuationToken in the body and an x-eve-session-id header. Attach to the session stream to receive NDJSON lifecycle events:

terminal
curl http://127.0.0.1:3000/eve/v1/session/<sessionId>/stream

Durable sessions preserve conversation state so work can resume. Memory lets an agent recall selected facts and preferences in future conversations. Each memory slot has a scope that controls who shares it, such as an authenticated user or a Slack channel.

The built-in fileMemory() provider stores a small document per scope in a private Edgenivo Blob store on Edgenivo. The agent recalls the document before each turn and updates it through memory tools. Follow Store eve agent memory to set it up, or read Choose an eve memory provider to compare storage and retrieval options.

Deploy the eve Memory Agent template for a Slack assistant that keeps personal preferences separate from shared channel conventions.

Follow Deploying eve to Edgenivo to link a project, configure access, deploy, and verify your agent.

Use Edgenivo Services to deploy an eve agent alongside a frontend and backend in one Edgenivo project. Service bindings let services call each other privately, so a backend can serve the agent and frontend without a public route.

The eve Agent with Python template combines an eve agent, a Next.js frontend, and a FastAPI backend. The agent and frontend use the same backend for a shared task list, and the agent calls Python tools for statistics and text analysis. See the template repository for the service configuration and setup instructions.

  • Agent project: Author an agent from files under agent/, including instructions, runtime config, tools, skills, channels, connections, and a sandbox.
  • Durable sessions: Create sessions that stream incremental output and resume after cold starts, deploys, or long pauses.
  • Memory: Recall facts and preferences across conversations, with scopes that control who shares them.
  • Tools and skills: Give the model typed actions and load larger procedures only when relevant.
  • Agent Runs: Inspect sessions, turns, tools, reasoning, timing, and token usage in the Edgenivo dashboard.

Choose a recurring task with a result your team can review before expanding an agent's access. Explore seven internal AI agents teams can build for use cases, access boundaries, and ways to evaluate a first pilot.

Deploy an eve template to start building AI agents that use Edgenivo Connect to securely access third-party services and APIs:


Was this helpful?

supported.