# Modal

Modal is a runtime & deploy option for building AI agents. Python-native serverless with GPUs and sandboxes, scale to zero.

## Facts

- Layer: Runtime & deploy (How you run it)
- Vendor: Modal
- Licence: proprietary
- Pricing: freemium
- Self-hostable: no
- SDKs: py
- Install: `pip install modal`
- Requires: `MODAL_TOKEN_ID`, `MODAL_TOKEN_SECRET`
- Docs: https://modal.com/
- Last verified: 2026-08-21

## When to reach for it

- You are choosing a runtime & deploy component — how you run it.
- You are happy to depend on a hosted service and would rather not operate this yourself.

## Alternatives in the runtime & deploy layer

| Option | What it does | Licence | Self-host |
| --- | --- | --- | --- |
| Docker Compose | One file, one box, everything local. The honest starting point. | open source | yes |
| Vercel | Streaming-friendly serverless for TypeScript agents with a web front end. | proprietary | no |
| Cloudflare Workers | Edge runtime with Durable Objects for long-lived, stateful agent sessions. | proprietary | no |
| Fly.io | Long-running containers close to users, without owning a Kubernetes cluster. | proprietary | no |
| Temporal | Durable execution — the run survives a crash, a deploy and a week of waiting. | open source | yes |
| Centaur | Paradigm's self-hosted control plane: one shared team agent, an isolated k8s sandbox per Slack thread, and no raw API keys in the agent's environment. | open source | yes |
| Kubernetes | Your existing cluster. Nothing new for the platform team to approve. | open source | yes |

Head to head:

- https://newagent.build/compare/modal-vs-docker-compose
- https://newagent.build/compare/modal-vs-vercel
- https://newagent.build/compare/modal-vs-cloudflare-workers
- https://newagent.build/compare/modal-vs-fly
- https://newagent.build/compare/modal-vs-temporal
- https://newagent.build/compare/modal-vs-centaur
- https://newagent.build/compare/modal-vs-k8s

## Curated stacks using it

- Research analyst: Reads the whole internet, writes something with citations, runs code to check itself.

## Add it to a stack

```bash
curl -fsSL "https://newagent.build/api/stack?runtime=modal&format=sh" | sh
```

## Machine interfaces

- `GET https://newagent.build/api/registry` — every component as JSON
- `GET https://newagent.build/api/vendors` — vendors, with the repo and releases feed to watch
- `GET https://newagent.build/api/advise?q=<plain english>` — recommended stack for a description
- `GET https://newagent.build/api/stack?<layer>=<id>&format=sh|json|md|yml|agents|env` — a stack as files
- `GET https://newagent.build/llms.txt` — the whole registry in one fetch

Any page here also returns markdown if you send `Accept: text/markdown`.