Skip to main content

Lambda - A minimal AI coding agent

Project description

Lambda Logo

Lambda Agent

A minimal, function-driven AI coding assistant built for speed and simplicity.

License Python Version PRs Welcome Maintained


Lambda Interface


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, and run_command directly on your host machine to get things done.
  • Parallel Sub-Agents: Delegate independent tasks (like extensive code analysis or small edits) to parallel background threads using dispatch_subagent.
  • 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 /models slash command.
  • Zero-Friction Configuration: Global configurations (~/.config/lambda-agent/config.env) mean you can run lambda in any directory on your machine instantly.

Installation

Requires Python 3.10+. Install Lambda directly from PyPI:

pip install lambda-agent

For local development, clone the repository and run 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.
  • exit or quit — 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).
  • dispatch_subagent(task): Parallelize isolated tasks via lightweight background Gemini sessions.
  • 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_scratchpad for planning.

Contributing

Contributions make the open-source community an amazing place to learn and build!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License & Attribution

Distributed under the Apache 2.0 License. See LICENSE for more information.

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

lambda_agent-0.1.1.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lambda_agent-0.1.1-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file lambda_agent-0.1.1.tar.gz.

File metadata

  • Download URL: lambda_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for lambda_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 267ffe3ab7fd738a56b6ef8fa157b19cb3da9121aa67c1d1543c419d4e2eac5c
MD5 1a29fdfcc0c7c073b82e7b8f9a062222
BLAKE2b-256 2474b63e6416822f9096eed1bf0b60229f767e87a44265be54dd4185c073b2e0

See more details on using hashes here.

File details

Details for the file lambda_agent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lambda_agent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for lambda_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aeefeb2811e48a74bba0c2d94c1fd1bfa0c264df8873a6a465354a36a8983b0b
MD5 ed63810316f237ef5778725d67ab3206
BLAKE2b-256 eefd0505b9523fc5aa64c9accef6b801b6a9e46abcd0fd9bfcd9b8963a5492d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page