Clients
CLI
The epochal CLI runs an agent on one prompt inside a Time Portal sandbox gated to a past timestamp, with Time Portal web search and fetch tools. By default it uses a built-in harness so nothing in the agent's prompt, tools, or sandbox postdates the instant; it can also run Claude Code, Codex, or Grok Build inside the sandbox.
Install
Prebuilt binary
Download the epochal archive for your platform from the latest release, unpack it, and put epochal on your PATH.
| Platform | Archive name ends in |
|---|---|
| macOS, Apple silicon | aarch64-apple-darwin.tar.gz |
| macOS, Intel | x86_64-apple-darwin.tar.gz |
| Linux, x86-64 | x86_64-unknown-linux-gnu.tar.gz |
| Linux, ARM64 | aarch64-unknown-linux-gnu.tar.gz |
| Windows, x86-64 | x86_64-pc-windows-msvc.zip |
Each release lists its archives' checksums in SHA256SUMS, and gh attestation verify <archive> --repo epochal-org/epochal checks that an archive was built from that repository.
From crates.io
The CLI is published to crates.io as epochal-cli. Installing it requires Rust 1.88 or later:
Shell
bash
cargo install epochal-cliThis builds the epochal binary into Cargo's bin directory, ~/.cargo/bin by default, which must be on your PATH.
Build from source
Shell
bash
git clone https://github.com/epochal-org/epochal.git
cd epochal
cargo install --path cliSet your keys
The CLI needs your Epochal API key, and a model endpoint and key for the agent, whichever harness runs it. The model key stays on your machine; see How a run works.
Get API KeyShell
bash
export EPOCHAL_API_KEY="ek_…"
export EPOCHAL_LLM_BASE_URL="https://api.anthropic.com"
export EPOCHAL_LLM_API_KEY="sk-ant-…"Both variables are required. EPOCHAL_LLM_BASE_URL takes an Anthropic Messages endpoint or any OpenAI-compatible Chat Completions endpoint, such as https://api.openai.com/v1 or a gateway. Models whose id starts with claude or anthropic, such as anthropic/claude-sonnet-5-5, use the Anthropic API and others use the OpenAI API; set EPOCHAL_LLM_API to anthropic or openai to choose.
Run an agent at the instant
epochal time-portal run takes a model, an instant, and a prompt. This example asks a question as of October 6, 2024, a few days before the Nobel Prizes were announced:
Shell
bash
epochal time-portal run --model claude-sonnet-5-5 --as-of 2024-10-06 \
"Will AI research win a Nobel Prize this year?"Progress is written to stderr, and the agent's final response is written to stdout.
Add --format json to get the answer together with every web call, or -o FILE to write the result to a file. Run epochal time-portal run --help for the sandbox's options, such as --internet, --cpu, --memory, --upload, and --download. The sandbox defaults to 1 vCPU and 2 GiB, which gets the whole free hour; a larger --cpu or --memory uses it up faster. See Pricing.
Claude Code, Codex, and Grok Build
--harness claude, --harness codex, or --harness grok runs that agent inside the sandbox instead. Each is a current build, so its version and built-in prompts postdate the instant and can reveal the present to the agent: such a run is not strictly held to the instant. The CLI says so and asks before it starts; --yes skips the question.
Each harness uses the same EPOCHAL_LLM_BASE_URL and EPOCHAL_LLM_API_KEY, and speaks its own API to it, so the endpoint must speak that API too. Claude Code needs an Anthropic Messages endpoint and gets the key as x-api-key. Codex and Grok Build need an OpenAI Responses endpoint, such as https://api.openai.com/v1, and get the key as Authorization: Bearer. EPOCHAL_LLM_API applies only to the built-in harness.
Shell
bash
epochal time-portal run --harness claude --model claude-sonnet-5-5 --as-of 2024-10-06 \
"Will AI research win a Nobel Prize this year?"How a run works
epochal time-portal run creates a Time Portal sandbox. The built-in harness runs on your computer: it sends the conversation to your model endpoint, and runs each tool call the model makes:
- Shell and file tools run in the sandbox, whose clock starts at the instant.
- Web search and fetch go to the Time Portal API with your Epochal API key, at the sandbox's instant.
The prompt is dated at the instant and says nothing about your computer. Your model key never reaches Epochal or the sandbox.
With --harness, the agent runs inside the sandbox instead. Nothing it sends leaves the sandbox for the internet: its model calls and its web search and fetch calls are tunneled back to the epochal process on your computer, which adds your model key and forwards them, and responses come back with timestamps rewritten to the instant. The sandbox gets a placeholder key in place of yours.
The model provider bills your model key as usual; Epochal bills the sandbox and the web calls.
Search and fetch from the shell
The CLI also calls Search and Fetch directly:
Shell
bash
epochal time-portal search "Nobel Prize 2024 predictions" --as-of 2024-10-06
epochal time-portal fetch https://www.nobelprize.org/ --as-of 2024-10-06Next steps
Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime.
A sandbox is a Linux virtual machine whose clock and network are set to an instant.