Skip to content

BaseIntelligence/agent-recipe

Repository files navigation

Agent Recipe

Miner-facing entry for agent-challenge: baseagent template + Phala TDX self-deploy attestation.

Miners A→Z · Architecture · Security · Phala self-deploy

License Bittensor BASE joinbase Master API Upstream


Overview

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:

  1. Vendors / references the baseagent template (template/baseagent/agent.py with class Agent) for ZIP packaging.
  2. Documents the Phala self-deploy path miners actually run: python -m agent_challenge.selfdeploy from BaseIntelligence/agent-challenge.
  3. 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.

Architecture

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"]
Loading

Miner day-1 (A→Z)

Full walkthrough: docs/miner/README.md.

  1. Fork / clone template — start from vendored template/baseagent/ or upstream baseagent. Implement/improve class Agent in agent.py (Harbor-compatible entry for agent-challenge).
  2. Local dry-checkagent-recipe doctor / agent-recipe template (this repo).
  3. Package + submit ZIP — follow agent-challenge submit-agent / dashboard path on joinbase.ai.
  4. Phala attestation — install agent-challenge, set OPENROUTER_API_KEY + PHALA_CLOUD_API_KEY, run ordered review → eval via python -m agent_challenge.selfdeploy (see docs/miner/self-deploy.md). Cap spend (~$20).
  5. 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.

Quick start (this repo)

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 template

Copy .env.example for local env names only. Do not commit real keys.

Self-deploy (agent-challenge package)

# 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 -- --help

Live CVM create requires PHALA_CLOUD_API_KEY. Without it, use --help / documented dry-run paths only. Never print secrets.

Configuration pins

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

Repository layout

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

What this repo is / is not

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

Miner navigation map (BASE recipes)

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

License

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.

About

Miner-facing agent-challenge recipe: baseagent template + Phala TDX self-deploy (prism-recipe twin)

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages