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
Metadata
Release files for lasagna-ai 0.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lasagna_ai-0.21.0.tar.gz | 252.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lasagna_ai-0.21.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 311.5 kB
Release files / lasagna_ai-0.21.0.tar.gz
| Download URL | lasagna_ai-0.21.0.tar.gz |
|---|---|
| Size | 252.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
560957833ad827110344401c8c9252b0aa1610038d33dab65b12ffc070b23d7b
|
|
BLAKE2b-256 checksum How to use checksums |
c74895f3c8436c2782e41737c613331a6b6d451f46d2a1314b1b13646a5478cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.1 cpython/3.12.3 HTTPX/0.28.1
|
Release files / lasagna_ai-0.21.0-py3-none-any.whl
| Download URL | lasagna_ai-0.21.0-py3-none-any.whl |
|---|---|
| Size | 59.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a82112dd152b34e45fdb2731ace0ee7939211a6fb51cb2814c02c62363c9e612
|
|
BLAKE2b-256 checksum How to use checksums |
9238b2b4755d99738f51ec485a63c650fecd417224f1bd2df1c38862593ca944
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.1 cpython/3.12.3 HTTPX/0.28.1
|