ToolLoop: Open-Source Framework for Claude-Style Tools with Any LLM

ToolLoop is an open-source Python framework that implements Claude Code-style functionality while remaining provider-agnostic. The project was created specifically to avoid vendor lock-in while maintaining similar tool capabilities.
Key Features
The framework includes 11 tools covering:
- File operations
- Code search
- Shell access
- Sub-agents
The entire codebase is approximately 2,700 lines. ToolLoop connects to any LLM through LiteLLM, supporting:
- Any model on AWS Bedrock (DeepSeek, Llama, Mistral)
- Any API provider (OpenAI, Moonshot)
- Local endpoints
Model Switching Capability
A key feature is the ability to switch models mid-conversation while maintaining shared context between interactions. This allows developers to use different models for different tasks without losing the conversation history.
SDK Usage Example
Here's the code snippet from the source showing basic usage:
from sdk import query, ToolLoopOptions
async for event in query(
prompt="Find all TODO comments, fix them, run the tests",
options=ToolLoopOptions(
model="bedrock/converse/deepseek.v3.2",
allowed_tools=["Read", "Edit", "Grep", "Glob", "Bash"],
),
):
print(event)
The example demonstrates how to swap the deepseek.v3.2 model for any other supported model while maintaining the same tools and prompt structure.
Practical Application
This type of framework is particularly useful for developers who want to build AI agents with specific tool capabilities but need flexibility in model selection. The open-source nature allows for customization and avoids dependency on a single provider's ecosystem.
The project is available on GitHub at github.com/zhiheng-huang/toolloop.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Monarch v3: NES-Inspired KV Paging for 78% Faster LLM Inference
Monarch v3 implements NES-inspired memory paging for transformers, achieving 78% faster inference (17.01 to 30.42 tok/sec) on a 1.1B parameter model with nearly zero VRAM overhead. The open-source algorithm splits KV cache into hot and cold regions with compression and promotion mechanisms.

Flue: A TypeScript Framework for Building Autonomous Coding Agents
Flue is a TypeScript framework that provides a programmable harness for building autonomous agents, featuring skills, sessions, sandboxed shell execution, and a built-in virtual sandbox. It can replace tools like Dosu, Greptile, CodeRabbit, Devin, and Claude Code with custom agent logic.

LLM Circuit Finder: Duplicate 3 layers to boost reasoning without training
A new toolkit finds 'reasoning circuits' in transformer models - contiguous blocks of 3-4 layers that act as indivisible cognitive units. Duplicating these blocks (layers 12-14 in Devstral-24B) improves logical deduction from 0.22 to 0.76 on BBH benchmarks with no weight changes or training.

Memento v1.0: Persistent Memory MCP Server for Claude Code with 17 Tools
Memento v1.0 is a persistent memory MCP server for Claude Code that ships with 17 tools, hybrid search, contradiction detection, and a visual memory graph. It runs locally with no cloud dependencies and supports multiple IDEs including Claude Code, Cursor, Windsurf, and OpenCode.