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

Comparison of Four Managed OpenClaw Hosting Providers for 2026
Tools

Comparison of Four Managed OpenClaw Hosting Providers for 2026

A developer tested four managed OpenClaw hosting providers over two months, ranking them based on setup time, uptime, integration reliability, model routing, cost, and multi-step task handling. LobsterTank costs $2/month with basic container hosting, KiwiClaw is $39/month with better support, xCloud is $24/month with solid uptime, and RunLobster is $49/month with extensive tool integration and flat pricing.

OpenClawRadar
SprintiQ: Open-Source Sprint Planning for Claude Code
Tools

SprintiQ: Open-Source Sprint Planning for Claude Code

SprintiQ is an open-source agile platform that acts as an orchestration layer for Claude Code, offering AI-powered user story generation, sprint planning, velocity tracking, and a CLI that syncs git activity to sprints in real time.

OpenClawRadar
Claude Skills Silently Override Instructions: Undocumented Pitfalls Exposed
Tools

Claude Skills Silently Override Instructions: Undocumented Pitfalls Exposed

User discovers Claude skills silently enforce hard limits on user input via `ask_user_input_v0` (max 3 questions, 4 options each), `Write` overwrites files while `create_file` refuses on Claude.ai, and relative paths in `references/` don't resolve. A community repo catalogs findings.

OpenClawRadar
InsAIts Runtime Security Monitor for Claude Code Hits 8,000 PyPI Downloads
Tools

InsAIts Runtime Security Monitor for Claude Code Hits 8,000 PyPI Downloads

InsAIts, a runtime security monitor for Claude Code agentic sessions, has reached 8,140 total downloads on PyPI. Version 3.4.0 adds an Adaptive Context Manager, layered anchor injection system, and dashboard improvements.

OpenClawRadar