---
title: "Execution environment"
url: https://www.daytona.com/definitions/e/execution-environment
---

# Execution environment

An execution environment is everything a program runs in: the operating system, runtime, libraries, files, network, and resources available to it.

An execution environment is the setting in which code runs. It includes the hardware or virtual machine, the operating system, the language runtime, and the installed libraries. It also includes the files the code can read, the environment variables it receives, and the network it can reach. The same code can behave differently in two environments.

Developers try to make execution environments repeatable, so that code runs the same way everywhere. Images and containers package an environment so it can be recreated exactly. Virtual machines and sandboxes add isolation, so code cannot reach beyond its environment. Choosing an environment means trading off startup speed, isolation, and how much control the code has.

AI agents need an execution environment to run the code they write and to use tools. That environment must allow real work, such as installing packages and running servers. It must also contain mistakes, since the code has not been reviewed. A sandbox is an execution environment built for this, isolated from the host and from other users.

## Related terms

- [Sandbox](https://www.daytona.com/definitions/s/sandbox.md)
- [Code execution](https://www.daytona.com/definitions/c/code-execution.md)
- [Operating system](https://www.daytona.com/definitions/o/operating-system.md)
- [Container](https://www.daytona.com/definitions/c/container.md)
- [Isolation](https://www.daytona.com/definitions/i/isolation.md)
