From LLM Calls to AI Agents
Go beyond single LLM calls: build tool-calling agents that can run your Python functions, with the zero-dependency larzagent library.
Calling an LLM is one thing; letting it act โ calling your functions to look things up or take steps โ is where AI products get useful. The Larz Stack's larzagent gives you that tool-calling loop, zero-dependency, against any OpenAI-compatible API.
Define a tool, run an agent
from larzagent import tool
@tool
def order_status(order_id: str) -> str:
"""Look up an order's status."""
return db.status(order_id)
# via the framework's contrib adapter:
from larz.contrib import agents
agents.enable(app, base_url='https://gateway.larzpay.com/v1')
app.ask('Where is order 42?', tools=[order_status]) # the model calls itTakeaways
larzagentturns Python functions into tools the model can call, with a defensive agent loop.larz.contrib.agentswires it into your app asapp.agent()/app.ask().- It works against any OpenAI-compatible API and is testable offline. More in the Larz Stack course.