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

Outworked v0.3.0 adds iMessage support, built-in browser, and scheduling for Claude Code agents
Outworked v0.3.0 introduces iMessage channel support for agent communication, a built-in browser for web interaction, scheduling via cron, tunneling for local sharing, and enhanced MCP/Skills support. The desktop app orchestrates Claude Code agents as a team to handle coding tasks, web research, and automated workflows.

Using Obliteratus toolkit to remove refusal weights from AI models
A Reddit user used the Obliteratus toolkit to surgically remove specific weights responsible for refusal behavior in AI models, demonstrating on Alibaba's Qwen 1.5B model that it can reveal training origins without retraining.

Need MCP Server Provides Semantic Tool Discovery for AI Agents
An MCP server called Need enables semantic search over 10,000+ tools from brew, npm, pip, and cargo. When an agent requests a task like 'compress these PNGs,' it finds pngquant, installs it, runs it, and reports back on success.

Claude Code Hooks Implementation Project Covers All 23 Hooks
A developer has built a project entirely with Claude code that implements all 23 Claude code hooks, with a video explaining each hook's use case and a GitHub repository available.