Serverless-native LLM orchestration framework for AWS Lambda
Project description
LambdaLLM
Serverless-native LLM orchestration framework for AWS Lambda.
Built by SubstrAI — Open-source GenAI frameworks for serverless infrastructure.
The Problem
Existing LLM frameworks (LangChain, LlamaIndex) assume long-running servers. They break on Lambda:
- Cold starts: 500MB+ dependency trees add seconds
- Stateless: No conversation memory between invocations
- 15-min timeout: Long agent loops crash
- 250MB limit: LangChain alone exceeds this
The Solution
LambdaLLM is purpose-built for Lambda's constraints:
from lambdallm import handler, Prompt, Model
summarize = Prompt(
template="Summarize in {max_words} words:\n\n{document}",
output_schema={"summary": str, "key_points": list}
)
@handler(model=Model.CLAUDE_3_HAIKU)
def lambda_handler(event, context):
return summarize.invoke(
document=event["body"]["text"],
max_words=100
)
Features
- < 5MB package size (vs 400MB+ for LangChain)
- Cold-start optimized — lazy imports, connection pooling
- DynamoDB-native state — conversation memory that survives stateless execution
- Cost-aware routing — auto-select cheapest model that meets quality threshold
- One-command deploy —
lambdallm deploygenerates all AWS infrastructure - Timeout handling — checkpoint/resume for long chains
Installation
pip install lambdallm[bedrock]
Quick Start
lambdallm init my-project
cd my-project
lambdallm dev
Documentation
License
MIT — see LICENSE
Author
Gaurav Kumar Sinha — Founder, SubstrAI
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 substrai_lambdallm-1.0.0.tar.gz.
File metadata
- Download URL: substrai_lambdallm-1.0.0.tar.gz
- Upload date:
- Size: 74.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a068c23fbf803a7740ce772091dee938d1fffce95a8d8eb7dfe51790f77483a9
|
|
| MD5 |
b485c3912b0f64629b6a946c7070c546
|
|
| BLAKE2b-256 |
fcbea8dfc21192e55508b29740db89b72b300fd2f60b4ca7f33303ea30c5f7fd
|
File details
Details for the file substrai_lambdallm-1.0.0-py3-none-any.whl.
File metadata
- Download URL: substrai_lambdallm-1.0.0-py3-none-any.whl
- Upload date:
- Size: 85.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a56bb59ee42243b92fecfa7b1eaee1d3a2953f13bc98b60170ee0e35aee6a6a7
|
|
| MD5 |
b115b45618f06296144ec69eeca041ba
|
|
| BLAKE2b-256 |
db09d104b06e43aae3d16b86ade3a85619eaf4dc149e24283a341cc48c4f399a
|