Skip to main content

Layered agents!

Project description

Lasagna AI Logo

Lasagna AI

PyPI - Version PyPI - Python Version Test Status Downloads

  • 📚 Official Docs: https://lasagna-ai.rhobota.com/

  • 🥞 Layered agents!

    • Agents for your agents!
    • Tool-use, structured output ("extraction"), and layering FTW 💪
    • Ever wanted a recursive agent? Now you can have one! 🤯
    • Parallel tool-calling by default.
    • Fully asyncio.
    • 100% Python type hints.
    • Functional-style 😎
    • (optional) Easy & pluggable caching! 🏦
  • 🚣 Streamable!

    • Event streams for everything.
    • Asyncio generators are awesome.
  • 🗃️ Easy database integration!

    • Don't rage when trying to store raw messages and token counts. 😡 🤬
    • Yes, you can have both streaming and easy database storage.
  • ↔️ Provider/model agnostic and interoperable!

    • Core support for OpenAI, Anthropic, and AWS Bedrock.
    • Experimental support for Ollama and NVIDIA NIM/NGC.
    • Message representations are canonized. 😇
    • Supports vision!
    • Easily build committees!
    • Swap providers or models mid-conversation.
    • Delegate tasks among model providers or model sizes.
    • Parallelize all the things.

Table of Contents

Installation

pip install -U lasagna-ai[openai,anthropic,bedrock]

If you want to easily run all the ./examples, then you can install the extra dependencies used by those examples:

pip install -U lasagna-ai[openai,anthropic,bedrock,example-deps]

Used By

Lasagna AI is used in production by:

AutoAuto

Debug Logging

This library logs using Python's builtin logging module. It logs mostly to INFO, so here's a snippet of code you can put in your app to see those traces:

import logging

logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
)

# ... now use Lasagna as you normally would, but you'll see extra log traces!

Special Thanks

Special thanks to those who inspired this library:

License

lasagna-ai is distributed under the terms of the MIT license.

Joke Acronym

Layered Agents with toolS And aGeNts and Ai

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

lasagna_ai-0.15.0.tar.gz (139.2 kB view details)

Uploaded Source

Built Distribution

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

lasagna_ai-0.15.0-py3-none-any.whl (53.4 kB view details)

Uploaded Python 3

File details

Details for the file lasagna_ai-0.15.0.tar.gz.

File metadata

  • Download URL: lasagna_ai-0.15.0.tar.gz
  • Upload date:
  • Size: 139.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for lasagna_ai-0.15.0.tar.gz
Algorithm Hash digest
SHA256 0d815f09edbb7cb1ef47378673b8d68484b6cc10fc5666d4bbc2b2c81b49676f
MD5 2a077c34ebca1cdab7d77bfb8ed61330
BLAKE2b-256 8cf4b692ea4e5a3b3e4167f2b879d86d4a04741eb37dce331a250649c547373b

See more details on using hashes here.

File details

Details for the file lasagna_ai-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: lasagna_ai-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 53.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for lasagna_ai-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b312fb5e878d4adcc70164bfccc4209a7860a0d49a424728e46a1b812aa9c158
MD5 a0701fce57bfbcd1f53ca8d775dcd116
BLAKE2b-256 f13a188d485523821491448c79500cba41f3b84946737f5c2cb208de65a17d08

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