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

✍️ OpenClawRadar📅 Published: April 20, 2026🔗 Source
ToolLoop: Open-Source Framework for Claude-Style Tools with Any LLM
Ad

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.

Ad

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

Ad

👀 See Also

OpenClaw's QMD Memory Search Fast Path Had Silent Bugs
Tools

OpenClaw's QMD Memory Search Fast Path Had Silent Bugs

OpenClaw's built-in memory search uses basic keyword matching, but users can switch to QMD for semantic search across workspace markdown files. A fast path through MCPorter was broken with three bugs causing every call to silently fail and fall back to slower CLI execution.

OpenClawRadar
Agentic Context Engine: Automated Agent Improvement Loop with 34.2% Accuracy Gain
Tools

Agentic Context Engine: Automated Agent Improvement Loop with 34.2% Accuracy Gain

An open-source tool automates the entire agent improvement loop from trace analysis to fix implementation, achieving 34.2% accuracy improvement on Tau-2 Bench in one iteration. The system uses Claude Code in a REPL environment to analyze failures and decide between prompt or code fixes.

OpenClawRadar
Open-source persistent memory system for Claude Code solves context loss between sessions
Tools

Open-source persistent memory system for Claude Code solves context loss between sessions

A developer built a file-based memory system for Claude Code that automatically captures project context without plugins or API keys. It uses conversation transcripts, an inbox file, and nightly cron jobs to maintain persistent memory across sessions.

OpenClawRadar
Graph Compose: Hosted Temporal Workflows with Visual Builder and AI
Tools

Graph Compose: Hosted Temporal Workflows with Visual Builder and AI

Graph Compose is a hosted platform for orchestrating API workflows on Temporal, letting you define workflows as JSON graphs with three building methods: a React Flow visual builder, a TypeScript SDK, and an AI assistant that converts plain English to graphs.

OpenClawRadar