Issue #30 · Option C · Forgejo: gaem/nagato-game-assist · Created 2026-07-23
Build the same thin gateway adapter against 5 candidate runtimes, score each against the 6 decision gates from docs/gateway-contract.md, and produce a recommendation for human decision. No production changes — all spikes are throwaway prototypes in isolated worktrees.
earendil-works/pi
Minimal agent toolkit with RPC mode / SDK for process embedding. "Adapt pi to your workflows without forking pi internals." First-class steering semantics. TypeScript (no #71 entanglement).
featherless-ai/open-agent-loops
Provider-agnostic agent loop SDK from Featherless. Plug-and-play seams: ModelClient, Memory, Tools, StopConditions. Single zod dep. Runs in Node/Bun/Deno/browser. Very new (v1.0.0, 2 weeks old).
turnstonelabs/turnstone
Self-hosted, local-first orchestration. Built-in shell/files/search/web tools. Explicit no-telemetry posture. Python (matches bridge language). Closest to Nagato's privacy posture. Previously read as "not a decision" — re-evaluating.
Hermes 0.19.0 local fork
Take the existing version-locked Hermes fork and strip it to the Nagato gateway contract. Remove unused tools, harden defaults, delete surface area. Option B from issue #30 — own repo, patches as commits, periodic upstream merges.
Custom Python gateway
Build a minimal gateway from scratch that implements exactly the contract in docs/gateway-contract.md. No upstream to track. Maximum control, maximum maintenance. Python to match the bridge (avoids #71 language split).
From docs/gateway-contract.md — every candidate must be scored against all 6.
| Gate | pi | OAL | Turnstone | Hermes Fork | Ground-Up |
|---|---|---|---|---|---|
| 1. Trace fidelity | ? | ? | ? | ✅ (current) | ✅ (by def) |
| 2. Research tooling | ? | ? | ? | ✅ (current) | ? |
| 3. Session + memory | ? | ? | ? | ✅ (current) | ✅ (by def) |
| 4. Tool governance | ✅ strong | ✅ strongest | ? | ❌ maximal | ✅ (by def) |
| 5. Local-first | ✅ | ✅ | ✅ | ❌ bleeding-edge | ✅ (by def) |
| 6. Maintenance | ? | ? | ? | ❌ 17 patches | all ours |
? = unknown until spike. ✅ = known pass. ❌ = known fail. The spike fills every ?.
Before touching any candidate, extract the thin adapter interface from docs/gateway-contract.md. This is the single contract every spike must implement.
spikes/shared/gateway_adapter.py (Python) or spikes/shared/gateway_adapter.ts (TypeScript)start_run(session_id, prompt, tools) -> run_id, get_trace_events(run_id) -> [TraceEvent], steer(run_id, input), interrupt(run_id, input), get_artifact(artifact_id) -> bytesspikes/shared/score_sheet.md - one row per gate per candidate, filled during spikesTypeScript earendil-works/pi
nagato-game-assist/.worktrees/spike-pigit clone https://github.com/earendil-works/pi.git ~/pi-spikespikes/pi/adapter.ts - implement the shared interface using pi RPC SDKTypeScript featherless-ai/open-agent-loops
nagato-game-assist/.worktrees/spike-oalgit clone https://github.com/featherless-ai/open-agent-loops.git ~/oal-spikespikes/oal/adapter.ts - implement using OAL Agent/Dispatcher/ChannelBridgePython turnstonelabs/turnstone
nagato-game-assist/.worktrees/spike-turnstonegit clone https://github.com/turnstonelabs/turnstone.git ~/turnstone-spikespikes/turnstone/adapter.py - implement using Turnstone orchestration APIFork Hermes 0.19.0 local fork at head 86892b5c5
nagato-game-assist/.worktrees/spike-hermes-stripped~/hermes-agent-local-fork at nagato/hermes-0.19 branchNew Custom Python gateway
nagato-game-assist/.worktrees/spike-ground-upspikes/ground-up/gateway.py - minimal Python gateway that implements exactly docs/gateway-contract.mdspikes/REPORT.md - findings, recommendation, trade-offsPhases 1-5 can run in parallel (up to 3 concurrent subagents per the ERR_NO_BUFFER_SPACE limit). Recommended batching:
Kill wrangler/browser/computer_use before dispatching subagents. ERR_NO_BUFFER_SPACE with 3+ subagents + wrangler SSE + browser + computer_use for 20+ min.
| Phase | Duration | Dependency |
|---|---|---|
| 0. Shared adapter | 1 day | None |
| 1. pi spike | 2 days | Phase 0 |
| 2. OAL spike | 2 days | Phase 0 |
| 3. Turnstone spike | 2 days | Phase 0 |
| 4. Hermes stripped | 2 days | Phase 0 |
| 5. Ground-up | 3 days | Phase 0 |
| 6. Comparison | 1 day | All above |
| Total (parallel) | ~5 days | |
| Total (sequential) | ~13 days |
spikes/shared/gateway_adapter.py - shared adapter interfacespikes/shared/test_fixtures.py - 3 canned test runsspikes/{pi,oal,turnstone,hermes-stripped,ground-up}/ - one directory per candidatespikes/{candidate}/score_sheet.md - 6-gate score per candidatespikes/REPORT.md - final comparison and recommendation