Planning and execution engine for AI agents with MCP support
Project description
planningmcp
Planning and execution engine for AI agents with MCP support
Part of the MCP AI Suite.
Features
- Goal decomposition -- break goals into executable steps via pattern, template, LLM, or hybrid decomposers
- Plan execution with step-by-step tracking, parallel execution, and progress reporting
- Replanning -- automatic recovery from step failures via retry, skip, or LLM-based replan strategies
- Cost estimation and budget management with per-plan and per-namespace limits
- Plan optimization -- auto-parallelization, bottleneck detection, and critical path analysis
- Plan templates -- 8 built-in workflows: deploy, migrate, audit, analyze, setup, refactor, onboard, incident
- LTP integration -- compile goals into Lean Task Protocol plans for deterministic execution (provided by the separate
ltpmcpdependency, whose LTP types planningmcp re-exports) - Mermaid diagram export for plan visualization
- OpenTelemetry tracing support (optional)
Installation
pip install mcpaisuite-planningmcp
# Optional extras:
pip install mcpaisuite-planningmcp[dev] # Development tools
pip install mcpaisuite-planningmcp[all] # All integrations
pip install mcpaisuite-planningmcp[litellm] # LLM-based decomposition
pip install mcpaisuite-planningmcp[redis] # Redis plan store
pip install mcpaisuite-planningmcp[tracing] # OpenTelemetry tracing
Quick Start
from planningmcp import PlanningFactory
planner = PlanningFactory.create(plan_store="sqlite", sqlite_path="plans.db")
plan = await planner.create_plan("Research and summarize Python 3.13 features")
plan = await planner.execute_plan(plan.id)
print(f"Status: {plan.status}, Progress: {plan.progress:.0%}")
MCP Server
planningmcp serve
Configuration
| Variable | Default | Description |
|---|---|---|
PLANNINGMCP_DECOMPOSER |
template |
Decomposer: pattern, template, llm, hybrid |
PLANNINGMCP_STORE |
memory |
Plan store: memory, sqlite, redis |
PLANNINGMCP_SQLITE_PATH |
planningmcp.db |
SQLite database path |
PLANNINGMCP_MODEL |
default |
LLM model for cost estimation |
PLANNINGMCP_REPLAN |
retry |
Replan strategy: retry, skip, llm |
REDIS_URL |
redis://localhost:6379/0 |
Redis URL (when store=redis) |
PLANNINGMCP_WEBHOOK_URLS |
-- | Comma-separated webhook URLs |
API Reference
PlanningPipeline
Central orchestrator for plan creation, execution, and learning.
await planner.create_plan(goal, namespace="default", context="") -> Plan
await planner.execute_plan(plan_id) -> Plan
await planner.execute_step(plan_id, step_id) -> StepResult
await planner.estimate_cost(plan_id) -> CostEstimate
await planner.replan(plan_id, failed_step_id) -> Plan
await planner.optimize_plan(plan_id) -> Plan
await planner.get_bottlenecks(plan_id) -> list[dict]
await planner.get_critical_path(plan_id) -> list[dict]
await planner.to_mermaid(plan_id) -> str
await planner.compile_ltp(goal) -> LTPPlan
await planner.run_ltp(goal, tool_executor=None) -> dict
PlanningFactory
PlanningFactory.default() # SQLite store (planningmcp.db), template decomposer
PlanningFactory.from_env() # Build from environment variables
PlanningFactory.from_yaml("config.yaml") # Build from YAML config
PlanningFactory.create(decomposer="hybrid", plan_store="sqlite", completion_fn=my_llm, ...)
Architecture
PlanningPipeline coordinates goal decomposition (via pluggable decomposers), step execution (via PlanExecutor with parallel support), and learning (via PlanHistory). ReplanEngine handles failure recovery with configurable strategies. BudgetManager enforces cost limits, and the optional memory/RAG integrations enrich plan context from prior executions. Plans are stored in pluggable backends (memory, SQLite, Redis).
Testing
pip install -e ".[dev]"
pytest tests/ -v
License
AGPL-3.0 — see LICENSE.
Open source for individuals and open-source projects. For commercial use in closed-source products, a commercial license is available — contact gaeldev@gmail.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcpaisuite_planningmcp-1.0.3.tar.gz.
File metadata
- Download URL: mcpaisuite_planningmcp-1.0.3.tar.gz
- Upload date:
- Size: 69.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af7016fd0d2008d6612b959ab65c1460a4b7adbcf52b4099e3bac0248adfbd1f
|
|
| MD5 |
4a93f13d18b74ecddfd231d5dadf6090
|
|
| BLAKE2b-256 |
4450df4e114bf0c15017b14ed3ed7b0501bb79e592169ed69fb3f055a1b6227d
|
Provenance
The following attestation bundles were made for mcpaisuite_planningmcp-1.0.3.tar.gz:
Publisher:
release.yml on gashel01/planningmcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpaisuite_planningmcp-1.0.3.tar.gz -
Subject digest:
af7016fd0d2008d6612b959ab65c1460a4b7adbcf52b4099e3bac0248adfbd1f - Sigstore transparency entry: 1841292150
- Sigstore integration time:
-
Permalink:
gashel01/planningmcp@9d84993ab916cb6a575894ae49573dfaa6399210 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/gashel01
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9d84993ab916cb6a575894ae49573dfaa6399210 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcpaisuite_planningmcp-1.0.3-py3-none-any.whl.
File metadata
- Download URL: mcpaisuite_planningmcp-1.0.3-py3-none-any.whl
- Upload date:
- Size: 64.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a50240cc5fb338fa6b70a0fbea4d74c0881ec5ebb8873c360ca8686ffdd7d84
|
|
| MD5 |
da7629cfe6b520a3b7e2ba34e7c7fc21
|
|
| BLAKE2b-256 |
5043114ba1eddcd754e20d47d73712bb4b41ab29e6235dd496ea9722a1ce8c87
|
Provenance
The following attestation bundles were made for mcpaisuite_planningmcp-1.0.3-py3-none-any.whl:
Publisher:
release.yml on gashel01/planningmcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpaisuite_planningmcp-1.0.3-py3-none-any.whl -
Subject digest:
6a50240cc5fb338fa6b70a0fbea4d74c0881ec5ebb8873c360ca8686ffdd7d84 - Sigstore transparency entry: 1841292976
- Sigstore integration time:
-
Permalink:
gashel01/planningmcp@9d84993ab916cb6a575894ae49573dfaa6399210 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/gashel01
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9d84993ab916cb6a575894ae49573dfaa6399210 -
Trigger Event:
push
-
Statement type: