# e2b-dev/fragments

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/e2b-dev-fragments).**

6,326 stars · 866 forks · TypeScript · Apache-2.0

## Links

- GitHub: https://github.com/e2b-dev/fragments
- Homepage: https://fragments.e2b.dev
- awesome-repositories: https://awesome-repositories.com/repository/e2b-dev-fragments.md

## Topics

`ai` `ai-code-generation` `anthropic` `claude` `claude-ai` `code-interpreter` `e2b` `javascript` `llm` `nextjs` `react` `sandbox` `typescript`

## Description

Fragments is an open-source AI code generation sandbox that produces code automatically based on user prompts and executes it inside isolated cloud environments. The project provides a secure foundation for running AI-generated code by sandboxing execution away from the host system, preventing potential harm while allowing users to see results immediately.

The sandbox supports customization through configurable execution environments defined via Dockerfiles, enabling code to run in specific runtimes or frameworks. Users can integrate different language models and model providers by registering their identifiers, API endpoints, and authentication keys, giving flexibility in choosing which AI powers code generation. The system also streams AI responses incrementally in the user interface, providing real-time feedback as code is generated.

Additional capabilities include installing packages from registries like npm or pip during execution, and hosting the sandbox as a deployable web interface. The project's documentation covers setup, configuration of custom environments and models, and deployment instructions for getting a sandbox instance running.

## Tags

### Artificial Intelligence & ML

- [AI Execution Sandboxes](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-execution-sandboxes.md) — Provides an AI code generation sandbox that runs generated code in isolated cloud environments. ([source](https://cdn.jsdelivr.net/gh/e2b-dev/fragments@main/README.md))
- [AI Code Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-code-generators.md) — Generates code automatically from natural language prompts using a language model. ([source](https://fragments.e2b.dev))
- [Streaming Chat Responses](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-chat-clients/streaming-chat-responses.md) — Streams AI-generated text incrementally to the user interface as it is produced. ([source](https://cdn.jsdelivr.net/gh/e2b-dev/fragments@main/README.md))
- [Custom AI Models](https://awesome-repositories.com/f/artificial-intelligence-ml/custom-ai-models.md) — Supports registering new AI models by identifier and display name for use in the sandbox. ([source](https://cdn.jsdelivr.net/gh/e2b-dev/fragments@main/README.md))
- [Model Provider Configurations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-provider-configurations.md) — Configures external AI model providers by setting API endpoints and authentication keys. ([source](https://cdn.jsdelivr.net/gh/e2b-dev/fragments@main/README.md))

### DevOps & Infrastructure

- [Code Execution Sandboxes](https://awesome-repositories.com/f/devops-infrastructure/execution-environments/code-execution-runtimes/code-execution-sandboxes.md) — Executes AI-generated code in isolated cloud environments, preventing harm to the host system. ([source](https://fragments.e2b.dev))

### Programming Languages & Runtimes

- [Custom Execution Environment Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/sandboxed-code-execution-environments/custom-execution-environment-definitions.md) — Enables defining custom sandbox templates with Dockerfiles for specific runtimes. ([source](https://cdn.jsdelivr.net/gh/e2b-dev/fragments@main/README.md))
