graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Pi + Codegraff Gemini echo
Pi's openai-completions assembler keeps role / content / tool_calls and drops the fields Gemini Interactions needs on the next turn:
message.idstarting withv1_thought_signatureon the message and eachtool_calls[]entryextra_contentif present
Without those, a role:tool follow-up 400s (request_rejected, ~217 bytes). Do not rewrite role: "tool" to role: "function".
Install the extension (Pi auto-loads ~/.pi/agent/extensions/*.ts):
mkdir -p ~/.pi/agent/extensions
cp graff-evals/pi-extensions/codegraff-gemini-echo.ts ~/.pi/agent/extensions/
Smoke:
python3 graff-evals/run.py --harness pi-codegraff --model gemini-3.7-flash --task fix-fib
For a same-seat SWE A/B against graff (SuperGrok / grok-4.6), skip the
gateway and use pi-xai:
# pi-xai.sh reads ~/.xai/credentials/graff-oauth.json (same as `graff login xai`)
cd graff-evals && ./run.py --suite swe --harness graff-dev,pi-xai --model grok-4.6 -j 6