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.1.tar.gz (144.3 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.1-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lasagna_ai-0.15.1.tar.gz
Algorithm Hash digest
SHA256 1b8c82746744bc94f264103bb619f01a952f0942c1fcf245cc603084e0ad9e3a
MD5 a02470650ed892e53670bb5d0e698ce5
BLAKE2b-256 2f47e681d6099696fd04f8a9db172ee5af99d7f5628d07505d5e0ec770ddbc3b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lasagna_ai-0.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 953dffc6605de30e0a3eb79e0dc1842abdddb8049edf3988b1e26c06f67ec162
MD5 9bcfb0d9d7668c4a2016d9ff13b97560
BLAKE2b-256 cfbbb890fc934da9fba40ee283b46dfaf6bea8e786f1edb02976284df4080842

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