Skip to main content

A production-grade CLI AI coding agent

Project description

⚡ BeamLab CLI

A production-grade, autonomous AI coding agent for your terminal.

BeamLab is a high-performance CLI agent designed to live in your codebase. It doesn't just chat—it searches, reads, reasons, and executes code changes with surgical precision. Powered by a multi-provider "cascade", it ensures you always have a brain online, even when APIs are down.


🚀 Quick Start

1. Installation

Install directly via pip:

pip install beamlab

2. Configure Your Keys

BeamLab uses environment variables for security. Add these to your shell profile (.zshrc, .bashrc, or PowerShell $PROFILE):

export LONGCAT_API_KEY="your-key-here"

Or use the .agent.toml configuration file in your project root:

[model]
longcat_api_key = "your-key-here"

3. Launch

Navigate to any project directory and start the session:

beamlab

🧠 Functional Overview

BeamLab operates as a Stateful Agentic Loop. When you give it a task, it follows a rigorous internal cycle:

  1. Context Retrieval: It perform semantic searches across your repo using a local FAISS vector store.
  2. Reasoning: It uses "Thinking" models to architect a solution.
  3. Tool Execution: It uses specialized tools for file I/O, code searching, shell commands, and web research.
  4. Verification: It can run tests and verify its own changes before handing the reins back to you.

� Usage Guide

Starting a Session

When you launch BeamLab in a project directory, it will:

  • Load or create a session for that project
  • Restore your previous conversation history (if any)
  • Initialize the context with your project files

Session Management

Sessions are isolated per project. Each session maintains its own:

  • Conversation history
  • Context files
  • File modification undo stack

Use these commands to manage sessions:

Command Description Usage
/new Start a fresh session /new "Fixing Bug"
/sessions List all stored sessions /sessions
/switch Switch to a different session /switch 2
/clear Wipe current chat history /clear

Model Selection

View available models and switch between them:

/model

Switch to a specific model:

/model longcat:Flash-Thinking

Context Management

Add files to the context for the agent to reference:

/add src/main.py
/add tests/test_*.py

You can also reference files inline in your prompts:

Explain how @main.py works

File Operations

BeamLab can read, write, and edit files. All write operations require approval by default.

To undo the last file modification:

/undo

�🛠️ Interactive Slash Commands

While in the BeamLab REPL, you can use / commands to manage your session:

Command Description Usage
/help List all available commands /help
/sessions List all stored sessions for this project /sessions
/new Start a fresh named session /new "Fixing Bug"
/switch Switch to a different session by ID or number /switch 2
/model Show or change the active LLM /model
/add Manually pin a file to the context /add src/main.py
/undo Roll back the last file modification /undo
/clear Wipe the current chat history /clear

⚙️ Configuration (.agent.toml)

BeamLab looks for a .agent.toml file in your project root for local overrides.

[model]
primary     = "LongCat-Flash-Chat"
temperature = 0.1

[safety]
require_approval_for_writes = true   # Set to false for full autonomy
require_approval_for_shell  = true

[indexing]
exclude = [".git", "node_modules", "dist"]

Configuration Options

Model Settings:

  • primary: The primary model to use
  • temperature: Sampling temperature (0.0 to 1.0)
  • longcat_api_key: Your LongCat API key (can also use env var)

Safety Settings:

  • require_approval_for_writes: Require confirmation before file writes
  • require_approval_for_shell: Require confirmation before shell commands

Indexing Settings:

  • exclude: Patterns to exclude from codebase indexing

🛡️ Safety First

BeamLab is built with a Security-First mindset:

  • Write Guard: Every file modification requires your explicit approval by default.
  • Shell Guard: No rm -rf or arbitrary commands run without a "Y/N" confirmation.
  • Path Restricted: The agent is restricted to working within your project root unless specified otherwise.

🔧 Advanced Features

Provider Cascade

BeamLab automatically handles provider failures by cascading to available alternatives:

  1. LongCat (primary) - Your main provider
  2. Ollama (local) - Running locally for offline usage

If the primary provider fails, BeamLab will automatically try the next available provider.

Session Persistence

Your sessions are automatically saved and restored:

  • Sessions persist across restarts
  • Each project has isolated sessions
  • Switch between sessions without losing context

Intelligent Context

BeamLab builds context intelligently:

  • Indexes your codebase for semantic search
  • Tracks file references in conversation
  • Maintains conversation history within sessions

👤 Author

Muhammad Yasir (devxyasir)
Email: jamyasir0535@gmail.com
GitHub: devxyasir/beamlab


Developed with love for the Python community. ⚡🚀

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

beamlab-0.2.3.tar.gz (198.7 kB view details)

Uploaded Source

Built Distribution

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

beamlab-0.2.3-py3-none-any.whl (131.7 kB view details)

Uploaded Python 3

File details

Details for the file beamlab-0.2.3.tar.gz.

File metadata

  • Download URL: beamlab-0.2.3.tar.gz
  • Upload date:
  • Size: 198.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for beamlab-0.2.3.tar.gz
Algorithm Hash digest
SHA256 086a379c819ee2a71252208a4e8e88be98df54113b3d60993e0c9165168cb44b
MD5 7bbbc34cd03ad7524c82e790aabf9fde
BLAKE2b-256 2ae76cebce595b42e67a8266510a39e03baff5f0b716c0c799a179034b9dc649

See more details on using hashes here.

File details

Details for the file beamlab-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: beamlab-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 131.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for beamlab-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d75e38d1543f45968f2d24355c823033434d212b77a214ac87b8fdeb916a7718
MD5 8b2bb66758b2b2805ae504fccfb524e8
BLAKE2b-256 b512814ceb685e997938fd2fc888fb6851a9ab3a32b9940f3428a6ab40817e47

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