Skip to content

About

Lean agents: tmux-based Claude Code / kilo agents + a browser CDP skill, no MCP

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Lean Agents Framework (laf)

Run Claude Code agents that keep working after you close the terminal, and reopen any of them later with one short command.

Quick start

1. Install what laf needs (once)

  • The Claude extension for Chrome, signed in with your Claude account. It lets agents use your logged-in browser (optional).
  • tmux. On a Mac: brew install tmux.

2. Install laf

curl -fsSL https://raw.githubusercontent.com/shekhar7x/lean-agents-framework/main/bin/setup.sh | bash

If it says ~/.local/bin is not on your PATH, add it, then open a new terminal.

3. Use it

laf kc0              # start an agent called kc0 (or reopen it if it exists)
laf                  # see your agents
laf --stop kc0       # stop it

laf kc0 again later brings it back in the same folder, with the same conversation. To leave an agent running and get your terminal back, press Ctrl-b and then d.

That's all you need. Everything below is optional.


Everyday commands

laf NAME start the agent, or reopen it
laf list your agents
laf --stop NAME stop an agent (it stays in the list; laf NAME restarts it)
laf NAME -d -p "task" start it in the background with a first task
laf --read NAME see the last 20 lines of an agent's screen
laf --delete NAME show what would be deleted; add --confirm to forget the agent
laf --update update laf to the latest version
laf --help the full guide

Names use letters, digits, - and _. The words list, stop, delete, read, import, update and help can't be names.

Things to know

  • Claude agents start with the Chrome extension, Remote Control and all permissions on. That means no approval prompts: agents can run any command and use your signed-in browser, which is what lets them work while you're away. Remote Control lets you follow an agent from claude.ai/code or your phone, listed under the agent's own name. Switch any of them off in ~/.config/laf/config: LAF_CHROME=0, LAF_REMOTE=0, LAF_SKIP_PERMS=0. If your plan doesn't include Remote Control, set LAF_REMOTE=0.
  • A stopped agent restarts in the folder where it was started, from any directory. New agents start in the folder you are in.
  • A first task given to an agent that is already running is not sent. Message it instead (see "Talking to agents").
  • Treat web pages and emails as untrusted. They can contain instructions aimed at your agent.

More

Several agents at once

Use a two-letter prefix for the kind of work plus a number: rs0 rs1 rs2 for research, ml0 ml1 for mail.

laf rs0 rs1 rs2 -d -p "task"     # start several (more than one name needs -d)
laf --list rs+                   # only names starting with rs
laf --stop rs+                   # stop them all
laf --delete rs+ --confirm       # stop and forget them all

In a pattern, + means any characters, so rs+ matches rs0 and rs10. 'rs*' works too if you quote it, because your shell expands a bare * itself. Patterns work with --list, --stop, --delete and --import. Starting needs an exact name.

Talking to agents

laf --read rs1                                          # last 20 lines (`--read rs1 50` for 50)
tmux send-keys -t "=rs1:" Escape                        # interrupt what it is doing
sleep 0.3
tmux send-keys -t "=rs1:" -l "also check pricing"; sleep 0.3; tmux send-keys -t "=rs1:" Enter Enter

=rs1: means exactly rs1 (plain rs1 could also match rs10). For anything longer than a sentence, write it to a file and send the path ("read tasks/rs1.md and do it"). --read shows what is on the agent's screen; Claude and kilo draw a full-screen interface, so it cannot reach further back than one screen. The installed skill teaches your agents these commands.

Bring in agents you already have

laf --import              # list past claude/kilo sessions named like ks1, ic0, rs3
laf --import --confirm    # register them, so laf NAME reopens them in their folder

--import ic+ limits it to a pattern, and --all allows any valid name. laf --delete NAME --history --confirm also deletes the conversation.

Settings: ~/.config/laf/config

A plain shell file, read every time an agent starts. Nothing personal lives in the repo.

LAF_ENGINE=claude          # default engine
LAF_CLAUDE_MODEL=          # optional
LAF_CHROME=0               # turn the Chrome extension off
LAF_REMOTE=0               # turn Remote Control off
LAF_SKIP_PERMS=0           # make claude ask before risky commands (default: all allowed)

Optional: kilo

Skip this unless you use kilo. Install it, then add two lines to your config:

LAF_KILO_MODEL=provider/model      # kilo wants provider/model
export PROVIDER_API_KEY=...        # whatever key that provider needs

Then laf w1 -e kilo -d -p "task" (or lafk w1 -d -p "task") starts a kilo agent. Kilo suits cheap bulk coding; keep Claude for review and judgment. The first start of a kilo agent makes one tiny call ("Reply with exactly: OK") to create a session titled with the agent's name; after that laf w1 reopens that exact session. lafc and lafk are shortcuts for laf -e claude and laf -e kilo. An agent keeps its engine; use another name for a different engine. Kilo has no permission-skip flag; its approvals come from kilo's own config.

How it works

  • tmux keeps each agent running under its name.
  • A small list (~/.local/state/laf/agents.tsv: name, engine, folder, created, started, task) remembers every agent, so a stopped one comes back in its folder. Claude resumes the conversation by name.

Update

laf --update

Installs the latest version and keeps your config and agent list. Running the install command again does the same.

Uninstall

curl -fsSL https://raw.githubusercontent.com/shekhar7x/lean-agents-framework/main/bin/setup.sh | bash -s -- uninstall

Removes laf and its skill. Keeps your config and agent list, so a later install picks up where you left off.

Uninstall and delete everything

curl -fsSL https://raw.githubusercontent.com/shekhar7x/lean-agents-framework/main/bin/setup.sh | bash -s -- uninstall --purge

Removes laf and also deletes your config and agent list. It asks "[y/N]" first.

With a clone, bin/setup.sh uninstall and bin/setup.sh uninstall --purge do the same. None of these stop a running agent.

Good habits

  • Escape interrupts an agent mid-task. Send it only when you mean to.
  • Give agents that edit code their own folder or branch, or they'll overwrite each other.
bin/laf             the launcher
bin/setup.sh        install / uninstall / update
skills/laf/SKILL.md the Claude skill

MIT licensed.

About

Lean agents: tmux-based Claude Code / kilo agents + a browser CDP skill, no MCP

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages