Repository navigation
feat(agent-react): add the ReAct baseline agent - #21
Merged
Merged
Conversation
Parse /task.json, define the strict submit_answer tool, check an answer against the fields that the task asks for, and write it as OpenRCA prediction JSON.
One bash process runs the model's commands in turn. A command past the timeout ends the session's process group, and long output keeps its start and its end.
extract-background makes background.json from RCA-Agent's prompts at the pinned OpenRCA commit. buildPrompt adds the environment and the answer format, and keeps the system prompt and the tools the same for every task of a scenario.
investigate runs the model until it submits an answer. It wraps up at the step cap, the soft budget, or the soft deadline, and ends on a refusal or an API error with the best answer so far. runTask writes prediction.json, trajectory.jsonl, and summary.json.
The image adds Python 3.13 with pandas, pytz, and DuckDB from hashed pins. The smoke test runs one task in the image with the runner's restrictions against a mock Messages API on an internal network.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The thesis needs a strong baseline: the same model and tools that evorca uses, without self-improvement. This PR adds the
reactagent, Claude Sonnet 5 in a ReAct loop with a bash tool over the telemetry, and RCA-Agent's domain knowledge in its prompt.What changed
agents/react/holds the agent: a persistent bash session, a strictsubmit_answertool, and a loop that wraps up at a step cap, a soft budget, or a soft deadline. It writesprediction.json,trajectory.jsonl, andsummary.json.scripts/extract-background.tsmakesbackground.jsonfrom RCA-Agent's prompts at the pinned OpenRCA commit. It drops only the rules that fit RCA-Agent's controller and executor split, and fails if the prompts change.node:26-trixie-slimwith Python 3.13, pandas, pytz, and DuckDB, from hashed lockfiles.Scope
Blast Radius
New package only, plus one row in the root README. Nothing imports it, and
evorca evaluatecannot run it until the CLI registers it.Verification
pnpm checkpasses. 52 agent tests drive the real SDK against a local mock Messages API.pnpm --filter @evorca/agent-react smokeruns the image asnobodywith a read-only root and a tmpfs, on an internal network that reaches only the mock. DuckDB and pandas read synthetic telemetry, and all three files are written.