Biomni-ReAct
This project is a lightweight implementation scaffold for a Biomni-inspired ReAct architecture. It follows the core design pattern visible in Biomni: retrieve a task-specific subset of resources, construct a biomedical agent prompt, then run an iterative reasoning and tool-execution loop.
Architecture
- Task specification: input task, workspace, expected outputs, and optional constraints are normalized into
TaskSpec. - Resource registry: tools, software packages, and data resources are represented as searchable
Resourcerecords. - Resource retriever: a simple lexical retriever selects task-relevant resources before the agent starts reasoning.
- ReAct loop: the model alternates between planning text and explicit executable actions.
- Executor: shell and Python actions run inside a bounded workspace, and every step is logged.
- Artifacts: retrieval plan, trace, final answer, and run summary are written for evaluation.
Quick Start
cd /225040511/project/Biomni-ReAct
python -m biomni_react.cli --task examples/simple_task.json --workspace runs/demo
For an OpenAI-compatible endpoint, set:
export BIOMNI_REACT_API_KEY="..."
export BIOMNI_REACT_BASE_URL="https://api.openai.com/v1"
export BIOMNI_REACT_MODEL="gpt-4o-mini"
The agent writes run artifacts under the workspace directory. If no API key is configured, it still creates the retrieval plan and summary so the pipeline can be tested offline.
Relation to Biomni
This repository intentionally keeps the implementation small. It mirrors the Biomni logic rather than copying its full infrastructure: resource retrieval first, prompt grounding second, then a ReAct-style execute/observe loop with auditable logs.