zhudotexe/kani
A hackable microframework for building chat-based LLM applications with tool usage and function calling.

kani provides a lightweight, model-agnostic foundation for implementing tool-calling in language model applications. It supports OpenAI, Anthropic, Google AI, and Hugging Face transformers out of the box, offering fine-grained control over the control flow for NLP researchers and developers building LLM-powered systems. The framework is designed to be less opinionated than other LM frameworks, making it highly customizable for prototyping agent behaviors and function-calling pipelines.