Quick Start
Simple Agent
from lambdagent import Lam
agent = Lam("summarizer", "Summarize the input concisely.")
result = agent("A very long article about quantum computing...")
Pipeline (Compose)
extract = Lam("extract", "Extract key facts.")
analyze = Lam("analyze", "Analyze the facts.")
report = Lam("report", "Write a report.")
pipeline = extract >> analyze >> report
result = pipeline("Raw data...")
ReAct Agent (Y Combinator)
from lambdagent import Lam, Loop, Tool
search = Tool("search", lambda q: web_search(q))
agent = Loop(
body=Lam("think", "Reason about the question. Use tools if needed."),
condition=lambda r, s: "DONE" in str(r) or s >= 9,
max_steps=10,
)
From YAML
from lambdagent import from_config
agent = from_config("agent-config.yml")
result = agent("Your question here")
One-Sentence Builder
python nl2agent.py "Build a research assistant with search tools" -t "Research AI agents"