Agent Recipes
Copy-and-run integration paths for immutable RootFetch artifacts. No secrets required.
This page is intentionally operational: fetch artifacts, verify integrity, run monitor agents, and connect via MCP.
1) Quickstart
Install SDK, fetch latest pointer, verify manifest hashes.
JavaScript
npm i rootfetch-sdk-js
node -e "import('rootfetch-sdk-js').then(async ({ RootFetch }) => {
const rf = new RootFetch({ baseUrl: 'https://rootfetch.vercel.app' });
const latest = await rf.latest();
const verification = await rf.verifyManifest(latest.run_id);
console.log({ run_id: latest.run_id, expected_count: verification.expected_count, checked_count: verification.checked_count, valid: verification.valid });
})"Python
pip install rootfetch-sdk-py
python3 - <<'PY'
from rootfetch_sdk import RootFetch
rf = RootFetch(base_url="https://rootfetch.vercel.app")
latest = rf.latest()
verification = rf.verify_manifest(latest["run_id"])
print({
"run_id": latest["run_id"],
"expected_count": verification["expected_count"],
"checked_count": verification["checked_count"],
"valid": verification["valid"],
})
PY2) Verify A Run
One-liners backed by expected_count/checked_count output.
JS verifier
node examples/verify-run.mjs <run_id>
Python verifier
python3 examples/verify_run.py <run_id>
VerificationResult example
{
"run_id": "20260225T231501Z_83c1fd7b57c6_rootfetch_model_v1",
"expected_count": 8,
"checked_count": 8,
"missing_files": [],
"valid": true
}3) Agent Monitor
Dry-run commands plus durable state behavior.
JS monitor dry-run
cd rootfetch-examples/agent-monitor/js npm install ROOTFETCH_BASE_URL=https://rootfetch.vercel.app npm run start:dry
Python monitor dry-run
cd rootfetch-examples/agent-monitor/py python3 -m venv .venv . .venv/bin/activate pip install -e . ROOTFETCH_BASE_URL=https://rootfetch.vercel.app python -m rootfetch_agent.monitor --dry-run
ROOTFETCH_STATE_PATHdefaults to.rootfetch-agent-state.json(durable local state).WEBHOOK_URLis optional in dry-run; events print to stdout when omitted.- Webhook sends include
Idempotency-KeyandX-RootFetch-Dedup-Keyheaders.
4) Webhook Payload Schema
Evidence links and model fields carried in each notification.
{
"dedup_key": "sha256:...",
"run_id": "20260225T231501Z_83c1fd7b57c6_rootfetch_model_v1",
"snapshot_ts_utc": "2026-02-25T23:15:01Z",
"model_version": "rootfetch_model_v1",
"dvi": 22.7,
"regime": "CONSOLIDATING",
"regime_confidence": 0.82,
"evidence": {
"run_url": "https://rootfetch.vercel.app/runs/20260225T231501Z_83c1fd7b57c6_rootfetch_model_v1",
"compare_url": "https://rootfetch.vercel.app/compare?left=<prev_run_id>&right=20260225T231501Z_83c1fd7b57c6_rootfetch_model_v1"
}
}5) MCP Snippet
Use the read-only MCP endpoint; token remains server-side in your client tooling.
{
"mcpServers": {
"rootfetch": { "url": "https://rootfetch.vercel.app/api/mcp" }
}
}6) Links
Direct pointers to contracts, examples, and run evidence routes.