feat(agent): run the Agenta harness on the rivet/ACP backend with forced skills#4782
feat(agent): run the Agenta harness on the rivet/ACP backend with forced skills#4782mmabrouk wants to merge 1 commit into
Conversation
…ced skills The Agenta harness (Pi plus a forced base AGENTS.md, persona, tools, and skills) only ran on the in-process Pi backend. Selecting it on the rivet path (AGENTA_AGENT_RUNTIME=rivet, a non-local sandbox, or the playground Harness dropdown) sent the agent id "agenta" to the rivet daemon, which only knows real agents (pi/claude) and answered "Unsupported Agent: agenta". The rejection never resolved the request, so the playground spun forever. Map "agenta" onto the "pi" ACP agent (acpAgent) for every daemon operation, keeping "agenta" as the user-facing identity. Add AGENTA to RivetBackend.supported_harnesses so select_backend routes it. Deliver the forced skills by laying the bundled dirs into a per-run Pi agent dir (so they never leak into later plain-pi runs) for local, and uploading them to the fresh sandbox for Daytona.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Railway Preview Environment
|
Context
The "Agenta" harness is Pi with a fixed opinion: a base AGENTS.md preamble, a persona, forced
read/bashtools, and forced skills. It only ran on the in-process Pi backend. The moment a run went through the rivet/ACP backend (which happens whenAGENTA_AGENT_RUNTIME=rivetis set, a non-local sandbox is picked, or the playground Harness dropdown selects Agenta), the runner sent the agent idagentato the rivet daemon. The daemon only knows real agents (pi,claude), so it answeredUnsupported Agent: agenta. That rejection surfaced as an unhandled promise rejection that never resolved the request, so the playground sat on "Generating response…" forever.Changes
The Agenta harness runs on the same engine as Pi, so the rivet daemon should drive it as the
piagent. The runner now mapsagenta -> pionce (acpAgent) and usesacpAgentfor every daemon operation (session creation, capability probe, model resolution, daemon env, the harness key var).harness("agenta") stays the user-facing identity for logs, the trace span label, and error text.RivetBackend.supported_harnessesnow includesAGENTA, soselect_backendroutesagentato rivet for a non-local sandbox orAGENTA_AGENT_RUNTIME=rivetinstead of raisingUnsupportedHarnessError.Forced skills cannot ride the
/runwire as text (a skill is a directory of files), so the wire carries only the skill names and the runner lays the bundled directories onto disk where Pi auto-discovers them. They go into the Pi user-scope agent dir (<agentDir>/skills/), the only place pi-acp loads them in a headless run (project skills under<cwd>/.pi/skills/are trust-gated). Because that dir is shared across runs, an Agenta run gets a throwaway per-run agent dir seeded from the login, with the extension and skills installed into it and the daemon pointed at it; it is removed after the run. A plainpirun is unchanged. On Daytona the sandbox is already fresh per run, so the skills upload through the sandbox FS API.Before: selecting Agenta on the rivet path raised
AcpHttpError: Unsupported Agent: agentaand the request hung.After: Agenta runs as Pi, loads the
agenta-getting-startedskill, and the model reads it.Tests / notes
test_select_backend.py(agenta+daytona andruntime=rivetroute to rivet) andtest_harness_adapters.py(RivetBackend.supports(AGENTA)). Service and SDK agent suites pass.test/skills.test.tsfor the sharedresolveSkillDirs; all 8 runner tests pass./pi-agent/skillsstayed empty afterward (no leak) and a following plain-pirun did not see the skill.Dockerfile.devnow bakesskills/(matching prod) and the dev compose bind-mounts it.adapters/agenta.md: the personaappendSystemPromptis not delivered on the ACP Pi path (pi-acp has no per-run hook); the base AGENTS.md andread/bashstill apply. Daytona skill upload is UTF-8 text only.integration/agenta-rivet-base, a branch that merges the in-flight agent-workflows series this change depends on (SDK, service, runner-tools, runner-engines, hosting, docs), so the diff here is exactly these 11 files. Rebase onto the relevant branch once those land.What to QA
agenta-getting-startedskill. It quotes the skill content, and the turn's token count is higher than a no-skill turn.