A Python framework for routing, automating, and orchestrating LLM tool calls. Voitta simplifies the integration of AI agents with external tools and APIs, enabling more powerful and flexible AI applications.
- Tool Call Routing: Seamlessly route LLM tool calls to the appropriate handlers
- Flexible Configuration: Define your tools and routing logic using YAML or Python
- Framework Agnostic: Works with any LLM provider or framework
- Extensible Architecture: Easily add custom tools and integrations
- Observability: Monitor and debug tool calls with built-in logging
pip install voittaTo install the latest pre-release version from TestPyPI:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ voittaThe --extra-index-url flag is needed to fetch dependencies from the main PyPI repository, as TestPyPI may not have all the required dependencies.
You can also specify a particular version:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ voitta==0.2.3Note: Pre-release versions on TestPyPI may contain experimental features and bugs. Use in production environments at your own risk.
from voitta import Voitta
# Initialize Voitta
voitta = Voitta()
# Register a tool handler
@voitta.tool("get_weather")
def get_weather(location, unit="celsius"):
# Implementation to fetch weather data
return {"temperature": 22, "condition": "sunny", "location": location, "unit": unit}
# Process an LLM tool call
result = voitta.process_tool_call({
"name": "get_weather",
"arguments": {"location": "San Francisco", "unit": "fahrenheit"}
})
print(result) # Output: {"temperature": 72, "condition": "sunny", "location": "San Francisco", "unit": "fahrenheit"}For detailed usage examples and documentation, please refer to:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.