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.20.0.tar.gz (254.4 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.20.0-py3-none-any.whl (65.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lasagna_ai-0.20.0.tar.gz
Algorithm Hash digest
SHA256 b16aeefa306cc750a024a54e9efc21553572b1c4ad4706c13c31147483525186
MD5 8f1a72283873516317107f9b80beaae3
BLAKE2b-256 cf508c3ae59f4b39eeac89a906d6238f35041695886dea3e6688de95e599244b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lasagna_ai-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29d3f84ddb016fb372bb4b338051a2064b2e48d1ba0145b3a5fb6fe81c5586d9
MD5 ceb189cff26f1b52efec725d378c656d
BLAKE2b-256 70e3b23ba8cb4e1e5353ffdee4453ebd58c402f5f119876f269f65d47e901826

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