Skip to content

E2B

llms.txt lists every page for an agent

The e2b lexicon runs chant Ops on a steward: one E2B sandbox that outlives every run. chant run <op> --on e2b hands the run to it. The steward keeps a clone of the project and its installed tools on its disk, runs one Op at a time, and sleeps paused between runs. Any API that speaks E2B’s can host it, hosted E2B or a platform of your own.

The lexicon also declares one kind, Template, for the image a steward is made from. chant build writes each template as e2b.<name>.Dockerfile, and the e2b template create command line that builds it.

Install it with:

Terminal window
npm install --save-dev @intentius/chant-lexicon-e2b

Point a profile at your E2B account in chant.config.ts:

import type { ChantConfig } from "@intentius/chant/config";
import "@intentius/chant-lexicon-e2b";
export default {
lexicons: ["e2b"],
e2b: {
profiles: {
prod: {
apiKey: { env: "E2B_API_KEY" },
template: "chant-steward",
gitToken: { env: "GITHUB_TOKEN" },
},
},
defaultProfile: "prod",
},
} satisfies ChantConfig;

Declare the template it names, with the tools the project’s Ops call:

import { Template } from "@intentius/chant-lexicon-e2b";
const steward = new Template({
name: "chant-steward",
fromImage: "node:22-bookworm",
run: ["apt-get update && apt-get install -y --no-install-recommends jq && rm -rf /var/lib/apt/lists/*"],
cpuCount: 2,
memoryMB: 2048,
});
export { steward };

Then build the template once and run an Op on the steward:

Terminal window
chant build src --lexicon e2b -o dist/e2b.json
(cd dist && e2b template create chant-steward --dockerfile e2b.chant-steward.Dockerfile --cpu-count 2 --memory-mb 2048)
chant run prod-apply --on e2b
MetricCount
Resources1
Property types0
Services1
Intrinsic functions0
Pseudo-parameters0
Lint rules4

Lexicon version: 0.124.34
Namespace: E2B

chant