Skip to main content

Production-grade Agent Development Kit powered by LiteLLM

Project description

LiteLLM ADK (Agent Development Kit)

A production-grade, highly flexible Agent Development Kit powered by LiteLLM.

Built for developers who need to swap models, API keys, and base URLs dynamically while maintaining a robust structure for tool usage, modular memory persistence, and observability.

Features

  • Model Agnostic: Access 100+ LLMs (OpenAI, Anthropic, OCI Grok-3, Llama, etc.) via LiteLLM.
  • Easy Tools: Register Python functions with the @tool decorator. No manual JSON schema management.
  • Modular Memory: Native support for conversation persistence:
    • InMemoryMemory: Fast, ephemeral storage.
    • FileMemory: Simple JSON-based local persistence.
    • MongoDBMemory: Scalable, remote persistence.
  • Parallel & Sequential Execution: Built-in support for parallel tool calls with robust stream accumulation.
  • Dynamic Configuration: Global defaults via .env or per-agent/per-request overrides.
  • Async & Streaming: Native support for ainvoke, stream, and astream.

Installation

pip install litellm-adk

Quick Start

Simple Conversational Agent

from litellm_adk.agents import LiteLLMAgent
from litellm_adk.memory import FileMemory

# Setup persistent memory
memory = FileMemory("chat_history.json")

agent = LiteLLMAgent(
    model="gpt-4", 
    memory=memory,
    session_id="user-123"
)

response = agent.invoke("My name is Alice.")
print(agent.invoke("What is my name?")) # Alice

Registering Tools

from litellm_adk.tools import tool

@tool
def get_weather(location: str):
    """Get the current weather for a location."""
    return f"The weather in {location} is sunny."

agent = LiteLLMAgent(tools=[get_weather])
agent.invoke("What is the weather in London?")

Configuration

The ADK uses pydantic-settings. Configure via .env:

  • ADK_MODEL: Default model (e.g., gpt-4o).
  • ADK_API_KEY: Default API key.
  • ADK_BASE_URL: Global base URL override.
  • ADK_LOG_LEVEL: DEBUG, INFO, etc.

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litellm_adk-0.1.2.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litellm_adk-0.1.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file litellm_adk-0.1.2.tar.gz.

File metadata

  • Download URL: litellm_adk-0.1.2.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for litellm_adk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3ecc5e821c94c69e5b2a567ecd037d2b679e746413e5812a443646172e946324
MD5 8d1e45e931a184b3ecca61ca3c12fd2c
BLAKE2b-256 d875baa9a1f09c1a246d9f6db27dc293de6d400a9004f86a54036c76db344c68

See more details on using hashes here.

File details

Details for the file litellm_adk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: litellm_adk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for litellm_adk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f84013375f5d24f7981ca5c4174d1c3015aeff9036c71b136f7a568c693681
MD5 90d1602b8ac907948e10cb350426b2b2
BLAKE2b-256 a3ee0a4ff8d8a1a75e968083e4f065256fb6b355d819fa4046411e4bcdd6976a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page