Lambda - A minimal AI coding agent
Project description
Lambda Agent
A minimal, function-driven AI coding assistant built for speed and simplicity.
Overview
Lambda is a lightweight, command-line AI coding agent driven by Google's Gemini models. Unlike massive IDE extensions or bloated web setups, Lambda lives right in your terminal. It uses a ReAct (Reasoning and Acting) loop to autonomously navigate your codebase, read and write files, run shell commands, and orchestrate complex coding tasks from a single prompt.
With a beautiful UI powered by Rich, Lambda makes pair programming with AI feel fast, natural, and highly contextual.
Key Features
- Autonomous Tool Execution: Powered by Gemini's function calling, Lambda can
read_file,write_file,search_repo, andrun_commanddirectly on your host machine to get things done. - Agentic Scratchpad: Lambda uses a hidden local scratchpad (
.scratchpad/) to draft implementation plans, think through complex logic, and maintain context across long execution chains. - Stunning CLI Experience: Built with Rich, featuring distinct conversational bubbles, syntax highlighting, active token monitoring, and beautiful live spinners.
- Hot-Swappable Models: Instantly switch between different Gemini models mid-conversation using the
/modelsslash command. - Zero-Friction Configuration: Global configurations (
~/.config/lambda-agent/config.env) mean you can runlambdain any directory on your machine instantly.
Installation
Requires Python 3.10+. Install Lambda straight from the repository:
git clone https://github.com/ayusrjn/lambda.git
cd lambda
pip install .
For local development and modifying the agent, use pip install -e . instead.
Usage
Spin up the agent from any directory simply by running:
lambda
First-Time Setup
On your first run, Lambda will securely prompt you for your Gemini API Key and model preference. This is saved to ~/.config/lambda-agent/config.env.
Note: You can override global settings by placing a .env file in your specific project directory.
Built-in Slash Commands
During your interactive session, you can use the following commands:
/models— Display a menu to hot-swap your active AI model (e.g., from Gemini Flash to Pro)./config— Quickly update your API key mid-session./help— List all available slash commands.exitorquit— End the session and review your total token usage.
Under the Hood
Lambda acts autonomously using an extensible set of Python tools:
search_repo(query, path): Deep file inspection ignoring.git,.venv, and binary caches.run_command(command): Real shell execution (with 30s timeout guards).ask_user(question): Ability to explicitly pause and ask the human for clarification.read_file,write_file: Direct file manipulations.- Scratchpad API:
read_scratchpad,write_scratchpad,append_scratchpadfor planning.
Contributing
Contributions make the open-source community an amazing place to learn and build!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License & Attribution
Distributed under the Apache 2.0 License. See LICENSE for more information.
- Engine powered by Google GenAI SDK.
- Lambda icon by shohanur.rahman13 from Flaticon
Project details
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 lambda_agent-0.1.0.tar.gz.
File metadata
- Download URL: lambda_agent-0.1.0.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bea877fcf38df44c5c1013d9ba4627215c45cdf070b8fa8456c1fb3206c253c0
|
|
| MD5 |
f21ddc2e611e600ecd46758c4e06b29b
|
|
| BLAKE2b-256 |
13ecf35b5d24b8bb2416f3c4d217f821d1a00106cd2bbeb55c5de263c44fa315
|
File details
Details for the file lambda_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lambda_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
103a9b4b03ec33c5ba351df6fbeb0af5cdb1938f2693613c992f8bededdf4e04
|
|
| MD5 |
ce130ce7703701567c12787c02e59923
|
|
| BLAKE2b-256 |
a4698ff020a426eaaa6ebf2ec0e3a4ec324863cf54f06c89aa35803b6d484d4c
|