task-planner
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@task-planner re-plan my best next action — retrieve succeeded, budget 6 left"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agent Task Planner
Optimal, re-planning task selection for AI agents. Give it candidate actions with a value and a cost, a budget, and optional conflicts and prerequisites. It returns the provably best plan and, as things happen, the single best next action. It works as a Claude Code plugin, as an MCP server for any MCP-capable agent, or as a Python library.
Why this algorithm: it won a pre-registered benchmark against QAOA, Grover Adaptive Search, simulated annealing and LP-guided sampling (research report). CP-SAT found the optimum of every test instance in under 1 ms. Re-planning after every event added 14–28 % utility over a fixed plan, and quantum methods did not beat classical ones at any size tested.
Install
Claude Code (one step, Claude Code ≥ 2.1.275):
/plugin install agent-task-planner --marketplace maxkyliu/agent-task-planneror in two steps:
/plugin marketplace add maxkyliu/agent-task-planner
/plugin install agent-task-planner@agent-task-plannerRequires uv on your PATH; the plugin's MCP server runs with
uv run, which installs its Python dependencies on first start.
Any MCP client (Claude Desktop, other agents), stdio server:
{
"mcpServers": {
"task-planner": {
"command": "uvx",
"args": ["--from", "git+https://github.com/maxkyliu/agent-task-planner", "agent-task-planner-mcp"]
}
}
}Python:
uv add git+https://github.com/maxkyliu/agent-task-plannerfrom agent_task_planner.planner import PlanRequest, select_tasks
plan = select_tasks(
PlanRequest.model_validate(
{
"budget": 10,
"tasks": [
{"id": "retrieve", "utility": 5, "cost": 4},
{"id": "verify", "utility": 3, "cost": 3},
{"id": "deep_dive", "utility": 4, "cost": 5},
],
"conflicts": [["retrieve", "deep_dive"]],
"prerequisites": [{"task": "verify", "requires": "retrieve"}],
}
)
)
print(plan.execution_order, plan.total_utility, plan.optimal) # ['retrieve', 'verify'] 8 TrueRelated MCP server: agent-reasoning-mcp
Tools
Tool | Use it to | Key inputs | Returns |
| plan once |
|
|
| adapt after each outcome | all known |
|
| validate any proposed selection |
|
|
The rules:
Integers only: utilities, costs and budgets are non-negative integers, so scale fractions (for example ×100).
Conflicts are pairs that cannot both run.
Prerequisites mean "B only after A succeeded".
Fallback: if CP-SAT hits its time limit, the best plan found is returned with
optimal: false. If CP-SAT finds nothing in time, a feasible greedy plan is returned instead.
The research behind it
The planner comes out of an 8-week, pre-registered study comparing classical and quantum methods for budgeted agent task selection at 4–24 tasks. Full report: docs/research-report.pdf.
Hypothesis (held-out data, frozen protocol) | Result |
QAOA beats simulated annealing per shot on the same QUBO | ✗: 0.29× (95 % CI 0.12–0.42), loses 59/75 |
Grover Adaptive Search needs fewer evaluations | ✓ vs uniform random (0.14×) · ✗ vs LP-guided sampling (1.43×) |
Warm-started quantum re-planning saves work | ✗: median ratio 1.00 |
Real hardware ≈ vendor noise model | closer to it than to ideal, but 2–3× noisier (IBM ibm_kingston, 8 s free tier) |
Development
uv sync
uv run pytest # unit, property (vs brute force) and MCP stdio tests
uv run ruff check . && uv run mypy
claude plugin validate .License
MIT
Available Tools
3 toolscheck_planB
Check a proposed selection against the budget, conflicts and prerequisites.
Inputs: tasks (required), budget (required), selected (required), conflicts, +1 more. Returns: object
plan_next_actionA
Re-plan after something changed and return the single best task to execute now.
Pass every known task (new ones included, with current utilities), the budget left, and which tasks already succeeded, failed or were cancelled. Call again after each action.
Inputs: tasks (required), remaining_budget (required), failed, cancelled, +3 more. Returns: object
plan_tasksB
Choose the subset of tasks with maximum total utility within the budget.
Respects conflicts and prerequisites. Returns the selection, an execution order (prerequisites first), totals, and whether the plan is proven optimal.
Inputs: tasks (required), budget (required), method, conflicts, +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have distinct core purposes: full planning, incremental next-action selection, and validation of a proposed selection. plan_tasks and plan_next_action both involve planning and could be confused at first glance, but the descriptions clarify their different outputs and usage contexts.
All tool names use a consistent snake_case verb-based pattern: plan_tasks, plan_next_action, check_plan. The convention is predictable and readable.
Three tools are well-scoped for a task planner: one for full planning, one for replanning the next action, and one for validating a plan. Each tool has a clear role and earns its place.
The surface covers full planning, incremental replanning, and plan validation, which are the core lifecycle operations for this domain. Minor gaps might include explaining why a plan is infeasible or suggesting repairs, but agents can work around these by using check_plan and replanning.
Maintenance
Related MCP Connectors
Plan vehicle routes, job assignments and load packing from stops, fleet and constraints.
Deterministic contextual decision arbitration and action routing for autonomous software. Takes current state, context, or intent plus caller-supplied candidate actions, state transitions, routes, refusals, escalations, tools, or models and returns a deterministic ordered candidate field. Also provides persistent machine representations for memory, retrieval, indexing, and downstream coherence measurement.
Plan agent workload routes from evaluation and cost data. $1 USDC per plan; modeled savings only.
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables agents to plan premium-model tasks with estimated credit budgets, require explicit approval before execution, and inspect itemized usage receipts afterward.Apache 2.0
- AlicenseAqualityBmaintenanceStrategic BDI cognitive reasoning engine for AI agents. Goal decomposition DAGs, multi-factor utility scoring, risk evaluation, and adaptive replanning over MCP.15150 npm13MIT
- AlicenseNot gradedqualityCmaintenanceEnables monitoring of running agent loops with token and monetary cost estimation, pruning of verbose thinking chains near limits, and routing sub-tasks between fast/cheap and deep reasoning models. It provides deterministic, MCP-compatible budget optimization for autonomous agents and copilot frameworks.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-capable agents to solve scheduling and integer optimization problems using Google OR-Tools, return proven-optimal or valid solutions, independently verify proposed solutions, and explain infeasible rule sets.MIT