Layered agents!
Project description
Lasagna AI
-
📚 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.
- 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:
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:
- Numa Dhamani (buy her book: Introduction to Generative AI)
- Dave DeCaprio's voice-stream 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lasagna_ai-0.21.0.tar.gz.
File metadata
- Download URL: lasagna_ai-0.21.0.tar.gz
- Upload date:
- Size: 252.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.1 cpython/3.12.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
560957833ad827110344401c8c9252b0aa1610038d33dab65b12ffc070b23d7b
|
|
| MD5 |
6347ec5555d2ca3d8f68de3bdddcb2a9
|
|
| BLAKE2b-256 |
c74895f3c8436c2782e41737c613331a6b6d451f46d2a1314b1b13646a5478cf
|
File details
Details for the file lasagna_ai-0.21.0-py3-none-any.whl.
File metadata
- Download URL: lasagna_ai-0.21.0-py3-none-any.whl
- Upload date:
- Size: 59.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.1 cpython/3.12.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a82112dd152b34e45fdb2731ace0ee7939211a6fb51cb2814c02c62363c9e612
|
|
| MD5 |
d847cb2cfa8b2375a2f366cdd9814be3
|
|
| BLAKE2b-256 |
9238b2b4755d99738f51ec485a63c650fecd417224f1bd2df1c38862593ca944
|