Skip to content

fastertools/ftl-tool-think

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ftl-tool-think

Release Rust Version License GHCR

An FTL tool for structured reasoning and dynamic problem-solving, powered by MindKit, for AI Agents.

Overview

The think tool provides AI systems with a structured reasoning framework for complex problem-solving. It allows for dynamic reasoning that can branch, revise, and evolve as understanding deepens.

Features

  • Structured Reasoning: Break down complex problems into manageable analytical steps
  • Thought Types: Support for analytical, critical, synthesis, and validation thinking modes
  • Dynamic Revision: Ability to revise previous thoughts as new insights emerge
  • Branching Logic: Explore alternative reasoning paths from any thought
  • Confidence Tracking: Express uncertainty with confidence levels (0.0-1.0)
  • Custom Lenses: Apply domain-specific analysis (e.g., "security", "performance", "Rust best practices")

Prerequisites

  • FTL CLI installed
  • Rust 1.89+ (for local development)

Usage

Running Locally

Clone and run the tool locally for development or testing:

# Clone the repository
gh repo clone fastertools/ftl-tool-think
cd ftl-tool-think

# Start the FTL development server
ftl up

The tool will be available in your local environment for use in your applications.

Tool Interface

The structured_reasoning function accepts a ThinkInput structure with the following fields:

Field Type Required Description
thought String Yes The current reasoning step
next_thought_needed bool Yes Whether more reasoning is required
thought_number u32 Yes Current reasoning step number (must be > 0)
total_thoughts u32 Yes Estimated total reasoning steps (must be > 0)
thought_type Option<String> No Reasoning type: analytical, critical, synthesis, or validation
is_revision Option<bool> No Whether this revises a previous reasoning step
revises_thought Option<u32> No Which reasoning step number is being revised
branch_from_thought Option<u32> No Branching point for alternate paths
branch_id Option<String> No Identifier for the branch
needs_more_thoughts Option<bool> No Indicates expansion beyond initial reasoning estimate
custom_lens Option<String> No Domain-specific analytical lens
confidence Option<f32> No Confidence level (0.0-1.0)

Examples

Basic Structured Reasoning

{
  "thought": "Let me break down this authentication problem step by step",
  "next_thought_needed": true,
  "thought_number": 1,
  "total_thoughts": 3
}

Critical Analysis with Low Confidence

{
  "thought": "This approach might have security implications I haven't considered",
  "next_thought_needed": true,
  "thought_number": 2,
  "total_thoughts": 4,
  "thought_type": "critical",
  "confidence": 0.6
}

Revising a Previous Thought

{
  "thought": "Actually, I need to reconsider my assumption about the database schema",
  "next_thought_needed": true,
  "thought_number": 3,
  "total_thoughts": 5,
  "is_revision": true,
  "revises_thought": 1
}

Full Documentation

This tool wraps the MindKit library. For comprehensive documentation, advanced features, and detailed examples, see:

The interface documented above matches MindKit's ThinkInput structure. For information about reasoning types, visual indicators, advanced branching, custom lenses, and implementation patterns, refer to the upstream MindKit documentation.

Development

Building from Source

# Clone the repository
git clone https://github.com/fastertools/ftl-tool-think.git
cd ftl-tool-think

# Build the tool
ftl build

# Start the tool
ftl up

Contributing

Please feel free to get in touch if you're interested in contributing.

Acknowledgements

This tool is built on MindKit, a framework-agnostic Rust library for structured reasoning and analytical thinking patterns. MindKit provides the core reasoning engine, while this tool provides FTL integration.

The MindKit library was inspired by @modelcontextprotocol/server-sequential-thinking, extending the concept into a comprehensive structured reasoning framework.

License

Apache-2.0

About

FTL tool for sequential thinking and structured reasoning

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors