0

Mock planner provider

Install and configure the Mock / Simple Planner adapter, then run the Python example and check its capabilities.

Mo
Mock / Simple Planner Provider
Chapter 036ProvidersTestingIndex
01Orientation

MockPlannerProvider is an alias for a small deterministic planner. It needs no provider SDK or API key.

Use this when

Install and configure the Mock / Simple Planner adapter, then run the Python example and check its capabilities.

  • Run a text-only fixture
  • Tool-plan fixture
  • Capabilities
  • Import the underlying class
02 / syntax starter
from mtp import Agent
from mtp.providers import MockPlannerProvider

agent = Agent.MTPAgent(
    provider=MockPlannerProvider(), tools=Agent.ToolRegistry()
)
print(agent.run("Hello"))
03 / manual

Read the system

The complete source manual—syntax, examples, linked references, edge cases, and implementation notes.

Documentation index ↗

MockPlannerProvider is an alias for a small deterministic planner. It needs no provider SDK or API key.

Run a text-only fixture

pythonfrom mtp import Agent
from mtp.providers import MockPlannerProvider

agent = Agent.MTPAgent(
    provider=MockPlannerProvider(), tools=Agent.ToolRegistry()
)
print(agent.run("Hello"))

The reply is Planner has no tool plan for this prompt yet. This provider follows fixed rules; it does not answer general questions or calculate arbitrary expressions.

Tool-plan fixture

A prompt containing profile requests github.get_user followed by github.create_issue, with a dependency and a result reference. Those names are demo contracts. Register both handlers before using that prompt. The built-in planner itself does not connect to GitHub.

For a complete offline example that registers and executes its own tool, use the quickstart and download offline_agent.py.

Capabilities

The planner supports deterministic sequential tool plans and text input. It declares no native finalize streaming, usage metrics, reasoning metadata, structured output, or native async client. The runtime can use its declared finalize fallback.

Import the underlying class

pythonfrom mtp.providers.simple_planner import SimplePlannerProvider

The public package alias is MockPlannerProvider. The underlying class lives in simple_planner.py.

01

Read

Understand where Mock / Simple Planner Provider sits in the agent loop before adding abstractions.

02

Wire

Connect the smallest useful provider, registry, store, or event stream first.

03

Observe

Expose events, logs, results, and failure states while the runtime is still moving.

04

Harden

Add policy, tests, retries, and audit traces after the behavior is visible.

Next docOllama Provider