Single-agent task runner for hardened Podman containers
Project description
terok-executor
One command to run an AI coding agent inside a hardened, rootless Podman container.
terok-executor builds the container, launches the agent against
the directory you point it at, and keeps real credentials on the
host. Use it on its own as a CLI, or import its AgentRunner from
Python when you want library-grade control.
Quick start
pip install terok-executor
terok-executor run claude ~/my-workspace -p "Fix the bug"
The first run interactively offers any missing prerequisites — sandbox
services, container images, agent credentials.
Mandatory items (services, images) block the launch if
declined; optional ones (SSH key, auth) print the consequence and
proceed.
Individual steps would be:
terok-executor setup # install sandbox services + build base images
terok-executor auth claude # authenticate (OAuth or API key)
terok-executor run claude <dir> -p "Fix the bug" # run the agent with an initial prompt
Use as a library
from terok_executor import AgentRunner
runner = AgentRunner()
runner.run_headless(
agent="claude",
repo=".",
prompt="Fix the failing test in test_auth.py",
max_turns=25,
)
AgentRunner exposes four launch methods — run_headless,
run_interactive, run_web, run_tool — all with the same
hardening guarantees.
Supported agents
| Agent | Auth | Description |
|---|---|---|
| Claude Code | OAuth*, API key | Anthropic Claude Code |
| Codex | OAuth*, API key | OpenAI Codex CLI |
| Vibe | API key | Mistral Vibe |
| Copilot | — | GitHub Copilot (no vault route yet) |
| OpenCode | — (uses provider keys) | Harness that drives any OpenAI-compatible provider — curated configs for Helmholtz Blablador, KISSKI AcademicCloud, and OpenRouter (each authenticated with its own API key) |
| Pi | — (uses provider keys) | Multi-provider harness; routes through the phantom tokens of co-installed providers |
| gh | OAuth, API key | GitHub CLI |
| glab | API key | GitLab CLI |
| SonarCloud | API key | SonarCloud scanner |
| CodeRabbit | API key | CodeRabbit (sidecar tool) |
* Claude and Codex OAuth are experimental.
terok-executor agents list lists the live roster (add --all to
include tools and harness-driven providers).
Where it sits in the stack
terok-executor is the per-task layer. Above it,
terok composes many concurrent
runs across many projects. Below it, terok-executor delegates the
host-side security boundary
(terok-sandbox): the
credential vault, the git gate, the egress firewall hooks, the
per-container supervisor lifecycle (OCI createRuntime/poststop
hooks).
Commands
| Command | Description |
|---|---|
run |
Launch an agent (headless, interactive, or web) |
setup |
Bootstrap sandbox services + container images |
uninstall |
Remove sandbox services + container images |
auth |
Authenticate a provider |
agents |
Inspect the agent roster (list) and set the build-time default selection (set) |
build |
Build base + agent images explicitly |
run-tool |
Run a sidecar tool (CodeRabbit) |
list |
List containers |
start |
Start a stopped container |
stop |
Stop a container (kept for a later start) |
rm |
Remove a container and its host-side state |
show-config |
Print the effective SandboxConfig as YAML (diffable across orchestrators) |
vault |
Vault management (status, unlock, lock, list, passphrase, routes, clean) |
sandbox |
Full terok-sandbox command tree (shield, vault, ssh, doctor, …) |
Config override
Two top-level flags (precede the subcommand, like docker --config):
--config PATH— read thisconfig.ymlinstead of the layered system/user paths (setsTEROK_CONFIG_FILEfor the invocation).--raw— ignore anyconfig.yml; use sandbox/executor dataclass defaults only.
Higher-layer orchestrators (such as terok) typically construct a SandboxConfig from their own resolution chain and pass it into the executor as a library; the public expectation is that, for the fields they own in config.yml, the resulting sub-environment matches what standalone terok-executor would produce against the same file. Use show-config on both sides to verify.
Development
See the Developer Guide.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terok_executor-0.3.0.tar.gz.
File metadata
- Download URL: terok_executor-0.3.0.tar.gz
- Upload date:
- Size: 226.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97436368d588ce4a3d7a73865109efa5177a4b6d124d964e91317318a5adb9a5
|
|
| MD5 |
02f4241f6c6bb570de2862b094ccf633
|
|
| BLAKE2b-256 |
4a5b780983ba915f6e06e583a7622ab6906213e4f09a21385902afc7499b3ca1
|
Provenance
The following attestation bundles were made for terok_executor-0.3.0.tar.gz:
Publisher:
release.yml on terok-ai/terok-executor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terok_executor-0.3.0.tar.gz -
Subject digest:
97436368d588ce4a3d7a73865109efa5177a4b6d124d964e91317318a5adb9a5 - Sigstore transparency entry: 2071867340
- Sigstore integration time:
-
Permalink:
terok-ai/terok-executor@e425ce35ef29eac1405b96fd0badf893b618b3e8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/terok-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e425ce35ef29eac1405b96fd0badf893b618b3e8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file terok_executor-0.3.0-py3-none-any.whl.
File metadata
- Download URL: terok_executor-0.3.0-py3-none-any.whl
- Upload date:
- Size: 293.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5494ca88a943580c1f8d337f1a600fb4e44e65656bf6b012e4503876aedc8c95
|
|
| MD5 |
3f2c3def6ff2597ca12039dc49b4a28b
|
|
| BLAKE2b-256 |
124e7a09a39384f5c629338d1a1d53f5d5edc46e668d252994f5b600d24daec0
|
Provenance
The following attestation bundles were made for terok_executor-0.3.0-py3-none-any.whl:
Publisher:
release.yml on terok-ai/terok-executor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terok_executor-0.3.0-py3-none-any.whl -
Subject digest:
5494ca88a943580c1f8d337f1a600fb4e44e65656bf6b012e4503876aedc8c95 - Sigstore transparency entry: 2071867350
- Sigstore integration time:
-
Permalink:
terok-ai/terok-executor@e425ce35ef29eac1405b96fd0badf893b618b3e8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/terok-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e425ce35ef29eac1405b96fd0badf893b618b3e8 -
Trigger Event:
workflow_dispatch
-
Statement type: