Skip to content
AgentEnv Framework

Core Concepts

The concepts AgentEnv Framework is built from and why each one exists, starting with environments

AgentEnv Framework lets you build environments for AI agents, run agents in them and check what they did. Seven concepts make it up: environments, artifacts, agents, tasks, the registry, plugins and sandboxes. This page defines each one and why it exists, in that order.

Environments

An environment is the world an agent acts in: usually a server that offers tools over the Model Context Protocol (MCP) and holds the state they change, such as an email inbox that an agent can search and send from. You write it as a subclass of AgentEnvEnvironment, like the EmailEnv below, and it describes itself in an environment card. You register it as an env under an id, with a new version on every registration, and each deployment of an env is an env instance. A multi env composes several envs into one, such as the inbox and a contacts book. Environments follows EmailEnv through each of these.

Artifacts

An artifact is data that the framework stores and versions, such as a set of emails, a file, a Docker image or a VM image. You register artifacts on their own, independently of any environment, and every registration adds a new version. That decoupling lets you take one set of artifacts, such as a company's data, and load it into different environments, such as an MCP environment for tool-calling agents and a computer-use (CUA) environment for agents that work in a browser. Because the artifacts are separate, you can iterate on them without touching the environments that load them. Artifacts follows one company's data through each of these.

Agents

An agent is what acts in an environment: anything that speaks the agent-to-agent protocol (A2A), written as an AgentEnvAgent or wrapping a harness such as Claude Code, Codex, Gemini, Hermes Agent, OpenCode, pi, OpenHands, Letta Code, Pydantic AI or Browser Use. Agents are separate from envs and tasks, so the same task runs unchanged with any agent, and one task can deploy several agents that message each other. Agents covers how they plug in.

Tasks

A task is a run you can repeat: a directed acyclic graph (DAG) of task steps that deploy envs and agents, prompt the agents, grade their work with verifiers and collect what they made. The framework ships nearly 50 built-in steps, and you can register your own as a Python class. A task is a JSON list of steps, so you write one without code. Tasks and steps covers how a run executes.

The registry

The registry is where the framework keeps what you register and what your runs record, in four stores: a document store for versioned records and run history, an object store for the bytes they point at, an image store for container images, and a secret store for the secret: references in your config. All four are local by default, and config.toml swaps any of them for AWS or Google Cloud stores, or a store of your own.

Plugins

The AgentEnv Framework comes with some strong building blocks, but you may find the need to add more. Plugins let you write your own custom env types (e.g a CUA env), custom task steps for your DAG, your own custom stores, custom env topologies, and more.

Sandboxes

A sandbox is the isolated machine or container that your env or agent can run in. Your machine's Docker is the default sandbox provider, but you may also choose to use a sandbox provider such as Modal's, CoreWeave, E2B, Sail, Tensorlake, Tenki, Vercel, smol machines, boxd, Daytona, boat, Agent37, Lume, or a sandbox provider of your own creation via a plugin. View all available sandbox providers here.

Last updated on

Ask a question · Report an issue

On this page