# Plan And Solve Agent

> Breaks down complex queries into a step-by-step plan before execution, improving performance on multi-hop reasoning tasks.

- Skill: `majiayu000/plan-and-solve-agent` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/plan-and-solve-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/plan-and-solve-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/plan-and-solve-agent

---


# Plan-and-Solve Agent

The **Plan-and-Solve Agent** separates high-level planning from low-level execution. It is ideal for complex scientific inquiries that require multiple distinct steps (e.g., "Find targets for disease X, then design drugs, then check safety").

## When to Use This Skill

*   When a user query is too complex for a single "ReAct" loop.
*   When you need to visualize the reasoning process *before* committing to execution.
*   To orchestrate multiple specialized sub-agents.

## Core Capabilities

1.  **Decomposition**: Splits a goal into linear or parallel sub-tasks.
2.  **Execution**: runs each step sequentially (mocked in this version).
3.  **Reporting**: Summarizes the outputs of all steps.

## Workflow

1.  **Input**: A complex natural language query.
2.  **Plan**: The agent generates a list of `PlanNode` objects.
3.  **Execute**: The agent iterates through nodes, executing them (simulation).

## Example Usage

**User**: "Investigate the impact of variant X on drug response."

**Agent Action**:
```bash
python3 Skills/Agentic_AI/Agent_Architectures/Plan_and_Solve/plan_and_solve.py \
    --query "Investigate the impact of variant X on drug response."
```

```

