index.md 1.1 KB

lambdagent

Lambda Calculus Agent DSL — Every agent is a function. Every composition is function composition. Every loop is a Y combinator.

What is lambdagent?

lambdagent is a Python DSL that models AI agents as Lambda calculus terms. It provides 11 composable constructs with rigorous mathematical foundations.

Core insight: An LLM-Dataset Pair (M, D) is equivalent to a λ-term.

YAML Config ──→ from_config() ──→ Lambda Term ──→ Runtime ──→ Result
                 (compiler)        (Term tree)    (β-reduction)

Install

pip install lambdagent

Hello World

from lambdagent import Lam

agent = Lam("greeter", "You are a friendly assistant. Say hello.")
result = agent("Hi there!")
print(result)

Next Steps