ArtificialAnalysis/Stirrup
The lightweight framework for building agents
What it solves
Stirrup is a lightweight framework designed to simplify the creation of AI agents. It avoids imposing rigid, predefined workflows that can often degrade model performance, instead allowing the LLM to determine the best approach to complete a task.
How it works
Stirrup provides a foundation for building agents through several core components:
- Agent: Manages the execution loop until the task is finished or a maximum number of turns is reached.
- Session: A context manager that handles tool lifecycles, file management, and cleanup.
- Tools: A flexible system for defining capabilities, including a generic
Toolinterface andToolProviderfor managing complex tools. - Context Management: Automatically summarizes conversation history as the model approaches context limits.
Who it’s for
It is intended for developers who want a flexible, customizable starting template for building agents without the overhead of rigid frameworks, or those who want to integrate a wide range of built-in tools like code execution and web browsing.
Highlights
- Built-in Tools: Includes native support for local code execution (or Docker/E2B), web search, and web fetching.
- MCP Client Support: Ability to connect to Model Context Protocol (MCP) servers to utilize their tools and resources.
- Multimodal Support: Processes images, video, and audio with automatic format conversion.
- Human-in-the-loop: Features a built-in user input tool for human feedback or clarification.
- Flexible Provider Support: Works with OpenAI-compatible APIs, LiteLLM, or custom clients.