biodsa-agent-dev-skills/SKILL.md
# BioDSA Agent Development Skill ## When to Use This Skill Use this skill when the user wants to: - Create a **new agent** in the BioDSA framework - Understand the **agent architecture** (BaseAgent, state, tools, graphs) - Implement a **single-agent** or **multi-agent** workflow - Add new **tools or tool wrappers** for an agent - Create a **run script** for an agent - Make a new agent pass a **sanity check** - Understand what the **deliverables** look like for prototyping an agent - **Build an
npx skillsauth add ryanwangzf/biodsa biodsa-agent-dev-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user wants to:
benchmarks/)BioDSA is a framework for building biomedical data science agents. The codebase provides:
BaseAgent class that handles LLM initialization, sandbox management, and workspace setupExecutionResults class for structured output and PDF report generation| What | Path |
| ------------------------ | ---------------------------------------------- |
| Base agent class | biodsa/agents/base_agent.py |
| Shared agent state | biodsa/agents/state.py |
| Agent implementations | biodsa/agents/<agent_name>/ |
| Low-level API tools | biodsa/tools/<knowledge_base>/ |
| LangChain tool wrappers | biodsa/tool_wrappers/<domain>/ |
| Sandbox / code execution | biodsa/sandbox/ |
| ExecutionResults | biodsa/sandbox/execution.py |
| Agent exports | biodsa/agents/__init__.py |
| Run scripts | run_<agent_name>.py (top-level) |
| Benchmarks | benchmarks/ |
| Tests | tests/ |
This skill library is organized into seven guides:
| Guide | File | What It Covers |
| ----- | ---- | -------------- |
| 0 | 00-environment-setup.md | Automatic environment setup: conda env, pipenv install, .env configuration, Docker sandbox — run this before anything else if the env is not ready |
| 1 | 01-base-agent.md | BaseAgent class, constructor, key methods, LLM initialization, sandbox lifecycle |
| 2 | 02-single-agent.md | How to subclass BaseAgent for a single-agent workflow (ReAct loop, multi-stage pipeline, custom workflow) |
| 3 | 03-multi-agent.md | Multi-agent patterns: orchestrator + sub-agents, multi-participant meetings |
| 4 | 04-tools-and-wrappers.md | How to create tools (biodsa/tools/), wrap them as LangChain tools (biodsa/tool_wrappers/), and wire them into agents |
| 5 | 05-deliverables-and-testing.md | What a completed agent prototype looks like: folder structure, __init__.py exports, run script, ExecutionResults, PDF reports, sanity checks |
| 6 | 06-user-workflows.md | Two common development workflows: building from reference materials, and building for benchmark evaluation |
When a user asks you to create a new agent, follow these steps in order:
Before writing any code, verify the BioDSA environment is set up. Read 00-environment-setup.md and run the checks. If the environment is not ready (no conda/pipenv env, missing dependencies, no .env), set it up automatically — do not ask the user to do it manually.
IMPORTANT: Do NOT start implementing immediately. First present a design proposal to the user and wait for their feedback.
Identify the workflow — Read 06-user-workflows.md to determine if this is a "from reference materials" or "benchmark-driven" task.
Read the guides — Read the relevant .md files in this directory to understand the patterns.
Present a design proposal — Before writing any code, present the user with a structured proposal covering:
biodsa/tools/ and biodsa/tool_wrappers/ you'll reuse, and which new tools you need to createmessagesWait for the user to confirm, adjust, or answer questions before proceeding.
biodsa/agents/<agent_name>/ with __init__.py, agent.py, state.py, prompt.py, tools.py, and README.md.BaseModel with messages: Annotated[Sequence[BaseMessage], add_messages] plus any domain-specific fields.prompt.py.biodsa/tools/ / biodsa/tool_wrappers/, or create new BaseTool subclasses in tools.py with Pydantic input schemas.BaseAgent, implement __init__, _create_agent_graph, generate, and go.biodsa/agents/<agent_name>/__init__.py and optionally to biodsa/agents/__init__.py.run_<agent_name>.py at the repo root with an example invocation.biodsa/agents/<agent_name>/DESIGN.md with Mermaid diagrams explaining the agent's architecture. See 05-deliverables-and-testing.md for the template.ExecutionResults with a non-empty final_response.┌─────────────────────────────────────────────────────┐
│ BaseAgent │
│ - LLM initialization (OpenAI/Azure/Anthropic/Google)│
│ - Sandbox management (Docker) │
│ - Workspace registration (upload datasets) │
│ - Helper methods (_call_model, _format_messages) │
└──────────────┬──────────────────────────────────────┘
│ inherits
┌──────────┴──────────┐
│ │
▼ ▼
┌────────────┐ ┌─────────────────┐
│ Single │ │ Multi-Agent │
│ Agent │ │ Framework │
│ │ │ │
│ ReactAgent │ │ DeepEvidence │
│ CoderAgent │ │ VirtualLab │
│ AgentMD │ │ │
│ TrialGPT │ │ (orchestrator + │
│ GeneAgent │ │ sub-workflows) │
│ InformGen │ │ │
│ TrialMind │ │ │
└────────────┘ └─────────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────────────────┐
│ LangGraph StateGraph │
│ Nodes → Edges → Conditional Edges → Compile │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Tools Layer │
│ biodsa/tools/ → Pure API functions │
│ biodsa/tool_wrappers/→ LangChain BaseTool wrappers │
│ Agent-specific tools → biodsa/agents/<name>/tools.py│
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ ExecutionResults │
│ message_history + code_execution_results + │
│ final_response → to_json() / to_pdf() │
└─────────────────────────────────────────────────────┘
development
# BioDSA Agent Execution Skill ## Core Principle **Write the script AND run it.** When a user asks to execute a BioDSA agent, do NOT just hand them a script and tell them to run it themselves. You must: 1. Write the execution script 2. **Run the script** via the terminal to start the agent 3. Monitor the output and report the results back to the user 4. Collect and present the deliverables (JSON, PDF, artifacts) This is the key difference from the dev skill — the exec skill is about **complet
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------