Miner-facing entry for agent-challenge: baseagent template + Phala TDX self-deploy attestation.
agent-recipe is the miner day-1 product surface for agent-challenge on BASE. It is the twin of prism-recipe:
| Recipe | Challenge | Attestation plane | Miner supplies |
|---|---|---|---|
| agent-recipe (this repo) | agent-challenge | Phala Intel TDX CVMs | Agent ZIP (baseagent Agent) + OpenRouter + Phala key |
| prism-recipe | PRISM | Lium / worker plane GPU | Recipe image env (OPENROUTER_API_KEY) + Lium |
This repository is not a dump of the agent-challenge service. It:
- Vendors / references the baseagent
template (
template/baseagent/agent.pywithclass Agent) for ZIP packaging. - Documents the Phala self-deploy path miners actually run:
python -m agent_challenge.selfdeployfrom BaseIntelligence/agent-challenge. - Ships a thin CLI (
agent-recipe) for discovery, doctor checks, and optional pass-through to selfdeploy when agent-challenge is installed.
Upstream template lineage: BaseIntelligence/baseagent (same product tree as
historical PlatformNetwork/baseagent). baseagent remains the upstream template
repo; agent-recipe is the miner product entry. Sync notes live under
template/baseagent/SYNC.md.
flowchart LR
M[Miner] --> T["baseagent template Agent"]
T --> Z["Signed agent ZIP submit"]
Z --> S["chain / agent-challenge"]
M --> P["Phala self-deploy CLI"]
P --> R["Attested review CVM"]
R -->|allow| E["Attested eval CVM"]
E --> W["BASE weights"]
P -. "python -m agent_challenge.selfdeploy" .-> AC["agent-challenge package"]
Full walkthrough: docs/miner/README.md.
- Fork / clone template — start from vendored
template/baseagent/or upstream baseagent. Implement/improveclass Agentinagent.py(Harbor-compatible entry for agent-challenge). - Local dry-check —
agent-recipe doctor/agent-recipe template(this repo). - Package + submit ZIP — follow agent-challenge submit-agent / dashboard path on joinbase.ai.
- Phala attestation — install agent-challenge, set
OPENROUTER_API_KEY+PHALA_CLOUD_API_KEY, run ordered review → eval viapython -m agent_challenge.selfdeploy(see docs/miner/self-deploy.md). Cap spend (~$20). - Teardown — bring Phala inventory to zero when done; never leave keys in git.
Production scoring uses OpenRouter inside TEE, not a Base LLM gateway. The baseagent template refuses Base gateway residue fail-closed.
git clone https://github.com/BaseIntelligence/agent-recipe.git
cd agent-recipe
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest -q
agent-recipe doctor
agent-recipe info
agent-recipe templateCopy .env.example for local env names only. Do not commit real keys.
# Separate install of the challenge package (not vendored here):
git clone https://github.com/BaseIntelligence/agent-challenge.git
pip install -e ./agent-challenge
# Discovery (safe when PHALA_CLOUD_API_KEY is missing)
agent-recipe selfdeploy-status --json
agent-recipe selfdeploy-help
# Authoritative CLI (full options):
python -m agent_challenge.selfdeploy --help
# Or: agent-recipe selfdeploy -- --helpLive CVM create requires PHALA_CLOUD_API_KEY. Without it, use --help / documented
dry-run paths only. Never print secrets.
| Pin | Value |
|---|---|
| Upstream agent template | BaseIntelligence/baseagent |
| Vendored entry | template/baseagent/agent.py (class Agent) |
| Self-deploy module | python -m agent_challenge.selfdeploy |
| Challenge repo | BaseIntelligence/agent-challenge |
| Measured OpenRouter model (docs pin) | x-ai/grok-4.5 |
| Default Phala money cap | $20 (CPU TDX; prefer tdx.small) |
| Public API | https://chain.joinbase.ai |
| Twin recipe (PRISM) | BaseIntelligence/prism-recipe |
agent-recipe/
template/baseagent/ # vendored agent.py + upstream sync notes
src/agent_recipe/ # CLI + template/selfdeploy helpers
docs/miner/ # A→Z miner guide + self-deploy
docs/architecture.md
docs/security.md
tests/
.env.example
pyproject.toml
LICENSE # Apache-2.0
| Is | Is not |
|---|---|
| Miner product entry (like prism-recipe) | Full agent-challenge service dump |
Vendored baseagent Agent template + sync notes |
Replacement of upstream baseagent history |
| Docs + thin CLI for Phala self-deploy | Live Phala credentials or gateway tokens |
| Apache-2.0 product surface | Secret store |
| Repo | Use when |
|---|---|
| agent-recipe | Mining agent-challenge (agent ZIP + Phala TDX attestation) |
| prism-recipe | Mining PRISM (digest-pinned train image + Lium attestation) |
| baseagent | Upstream agent template only (sync source for this recipe) |
| agent-challenge | Challenge service, submit scripts, full selfdeploy implementation |
Apache License 2.0. See LICENSE.
Vendored template/baseagent/agent.py retains upstream copyright notices from
baseagent (MIT upstream template).
Product packaging of agent-recipe is Apache-2.0.