Skip to main content

FPF Agentic Thinking Map

v1.5.0 — a compact runtime map for LLM agents.

Built from FPF (First Principles Framework) as a bounded traversal core: explicit state, lawful next move, inspectable outcomes.

Python 3.12+ · MIT · zero runtime dependencies

At a glance

PyPI version Python versions License Zero dependencies Verify

Live demo Per decision Traversal Runtime shape


What this is

This map keeps agentic traversal clean.

It does not run heavy semantic payload inside the step loop.
It does not force reasoning-on-reasoning recursion.
It does not let traversal bloat with generated thinking trash.

The model stays free to generate.
The map only keeps runtime state and checks the next lawful move.


Why this exists

In long multi-step runs, models waste budget on self-management:

  • re-checking what was already checked
  • re-deriving state from prior prose
  • re-arguing about their own prior reasoning

That is where drift and context noise come from.

This package moves traversal bookkeeping to code:

  • context
  • roles
  • transitions
  • evidence freshness
  • guards and blockers
  • outcome kind

So the model spends capacity on the task, not on traversal clutter.


Runtime contract

Each step returns a compact JSON slice:

  • where the agent is
  • what can fire
  • what is blocked
  • what evidence is missing or stale
  • what outcome applies

Outcomes include:

  • CONTINUE
  • COLLECT_EVIDENCE
  • BRIDGE
  • IDLE
  • ESCALATE

The map constrains traversal legality.
It does not overwrite user meaning and does not replace model intelligence.


Measured per step

This was tested on 5 shipped decision points.

  • compiled state.slice() averaged 481.4 tokens per decision
  • raw FPF exact-section prompt averaged 138977.2 tokens per decision
  • that is 288.7x smaller per decision
  • in live billed input tokens, compiled averaged 537.4 vs raw 139194.6
  • that is a 259.0x live per-decision input gap

Full measurement: TRIPLE_TAX_CALCULUS.md


Scope

This package is intentionally narrow.

It is for:

  • bounded, stepwise agent traversal
  • clearer failure signals
  • lower runtime noise
  • inspectable behavior

It is not:

  • full semantic ingestion of FPF
  • a universal reasoning engine
  • a replacement for application logic
  • an in-engine memory/retrieval system (no embeddings/vector store inside this engine)

Quick start

# Python 3.12+
python -m fpf_thinking_map.verify
python -m fpf_thinking_map.examples

Install:

pip install fpf-thinking-map

Minimal usage

from fpf_thinking_map import (
    SemanticMap,
    ContextPrimitive,
    RolePrimitive,
    TransitionPrimitive,
    GatePrimitive,
    GateCheck,
    RuntimeBinding,
    ThinkingMapTraversal,
)

sm = SemanticMap()
sm.register_context(ContextPrimitive("deploy", "Deploy Context"))
sm.register_role(RolePrimitive("owner", "Owner", "deploy"))
sm.register_gate(
    GatePrimitive(
        "release_gate",
        "Release Gate",
        "deploy",
        checks=[GateCheck("tests", "Green tests", required_evidence=["test_results"])],
    )
)
sm.register_transition(
    TransitionPrimitive(
        "ship",
        "Ship release",
        "deploy",
        "candidate",
        "released",
        required_evidence=["test_results"],
    )
)

engine = ThinkingMapTraversal(sm)
state = engine.build_active_state(
    RuntimeBinding(
        task="release",
        actor_role_ids=["owner"],
        active_context_id="deploy",
        current_evidence=["test_results"],
    ),
    current_state="candidate",
)
outcome = engine.step(state)
print(outcome.kind)  # CONTINUE / COLLECT_EVIDENCE / BRIDGE / IDLE / ESCALATE

The engine is domain-agnostic. You define your own contexts, evidence, gates, and transitions.


Relationship to FPF

Based on ailev/FPF by Anatoly Levenchuk.
Independent implementation, MIT-licensed, with further development rights.

FPF is the broad frame.
This package is the compact runtime traversal tool.


Design principles

  • add structure only when behavior improves
  • keep per-step payload small
  • keep legality checks explicit
  • keep model generation free
  • optimize for inspectability

Compatibility

Works with model families that can read structured JSON and follow constraints. No model-specific prompt protocol is required by the engine itself.


Deep technical notes (optional)

If you need theory, adoption/rejection rationale, and analysis provenance, use:

Mainstream docs stay focused on runtime behavior and integration.


License

MIT. See LICENSE.


"All speech is vain and empty unless it be accompanied by action." — Demosthenes

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fpf_thinking_map-1.5.0.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fpf_thinking_map-1.5.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file fpf_thinking_map-1.5.0.tar.gz.

File metadata

  • Download URL: fpf_thinking_map-1.5.0.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fpf_thinking_map-1.5.0.tar.gz
Algorithm Hash digest
SHA256 3b6bee0344bf59925897ef9791e228e3ee391132754c2828c6f5178486a08f6f
MD5 0da9cae9a2e1caed65c7609cfa25f029
BLAKE2b-256 955a98016b6c4f15f14e622a7a32cc83f2334b0b57bc0182ddecc15134e87944

See more details on using hashes here.

Provenance

The following attestation bundles were made for fpf_thinking_map-1.5.0.tar.gz:

Publisher: publish.yml on igareosh/fpf-agentic-thinking-map

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fpf_thinking_map-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fpf_thinking_map-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e10b798ed790dd5ded4b0066634cf5c58e42bb509443248e2b93282f9602f2e6
MD5 131e906e0410ee6467e1946dae8af452
BLAKE2b-256 cb84c16109d8be604fa1733893e3f394a47b70c4f7ff5f35462690cb9c0d8e16

See more details on using hashes here.

Provenance

The following attestation bundles were made for fpf_thinking_map-1.5.0-py3-none-any.whl:

Publisher: publish.yml on igareosh/fpf-agentic-thinking-map

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.9.5

2 files

1.9.4

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.6.0

2 files

This release

1.5.0 This release

2 files

1.4.25

2 files

1.4.24

2 files

1.4.23

2 files

1.4.22

2 files

1.4.21

2 files

1.4.20

2 files

1.4.19

2 files

1.4.18

2 files

1.4.17

2 files

1.4.16

2 files

1.4.15

2 files

1.4.14

2 files

1.4.13

2 files

1.4.12

2 files

1.4.11

2 files

1.4.10

2 files

1.4.9

2 files

1.4.8

2 files

1.4.7

2 files

1.4.6

2 files

1.4.5

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page