Installation
Recommended: Using uv
LionAGI works best with uv for fast, reliable dependency management:
Alternative: pip
You can also install with pip, but uv is faster:
Set Your API Key
API Key Required
LionAGI needs an LLM provider API key to work. Choose one:
Test Installation
Verify Everything Works
from lionagi import Branch, iModel
import asyncio
async def test():
agent = Branch(chat_model=iModel(provider="openai", model="gpt-4o-mini"))
response = await agent.communicate("Hello")
print(f"LionAGI says: {response}")
asyncio.run(test())
Provider Options
# OpenAI
iModel(provider="openai", model="gpt-4o-mini")
# Anthropic
iModel(provider="anthropic", model="claude-3-5-sonnet-20241022")
# Local (Ollama)
iModel(provider="ollama", model="llama3")