0

Mock / Simple Planner Provider

Mock / Simple Planner Provider explains the testing layer of MTPX with practical guidance for building inspectable, tool-using agents.

Mo
Mock / Simple Planner Provider
Chapter 036ProvidersTestingIndex
01Orientation

Mock / Simple Planner Provider belongs to the providers track. The page breaks the idea into responsibilities, implementation rules, failure modes, and the signals you should expose in a product UI.

Use this when

Use this when you need to understand how mock / simple planner provider affects a real MTPX agent before you wire it into an application.

  • What mock / simple planner provider owns in the runtime.
  • How it connects to planning, tool execution, events, providers, or storage.
  • What to log, test, and expose to users when this layer is active.
  • Common mistakes that make agent systems hard to inspect.
02 / syntax starter
from mtp import Agent
from mtp.providers import Groq

agent = Agent.MTPAgent(
    provider=Groq(model="llama-3.3-70b-versatile"),
    tools=tools,
)
03 / manual

Read the system

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

Documentation index ↗

A tiny deterministic planner for local demos and testing. Not a real LLM — returns hardcoded plans and responses.

Install

No additional packages required. Part of the MTP core.

Quick Start

pythonfrom mtp import Agent
from mtp.providers import MockPlannerProvider

provider = MockPlannerProvider()
tools = Agent.ToolRegistry()
agent = Agent(provider=provider, tools=tools)

# Triggers a deterministic tool plan when "profile" is in the prompt
reply = agent.run_loop("Get my profile")
print(reply)

# Returns a direct text response for other prompts
reply = agent.run_loop("Hello")
print(reply)

Behavior

The mock provider follows these rules:

  • If the user message contains "profile": executes github.get_user then github.create_issue (sequential batch with $ref dependency).
  • Otherwise: returns "Planner has no tool plan for this prompt yet."

Parameters

None. The provider takes no constructor arguments.

Capabilities

CapabilityValue
Tool callingYes (deterministic)
Parallel tool callsNo
Input modalitiestext
StreamingNo
Usage metricsNone
Reasoning metadataNo
Structured outputNone
Native asyncNo

Use Cases

  • Unit tests and integration tests
  • Deterministic demos of the MTP execution pipeline
  • Debugging tool execution flow without an LLM
  • Example scripts that run without API keys

Aliases

pythonfrom mtp.providers import MockPlannerProvider
from mtp.providers import SimplePlannerProvider

# Both are the same class
assert MockPlannerProvider is SimplePlannerProvider

Full Example

pythonfrom mtp import Agent
from mtp.providers import MockPlannerProvider

provider = MockPlannerProvider()
tools = Agent.ToolRegistry()
agent = Agent(provider=provider, tools=tools, debug_mode=True)

# This triggers the deterministic plan
reply = agent.run_loop("Get my profile", max_rounds=2)
print(reply)

# This returns a text response
reply = agent.run_loop("Hello world")
print(reply)

Source

src/mtp/providers/simple_planner.py (implementation) src/mtp/providers/mock.py (alias)

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