Skip to main content

Lag: Lamin's Agent CLI

lag can retrieve or generate scripts (.py), notebooks (.ipynb), and skills & plans (.md) and then perform work with these tools.

Setup

pip install lag-cli

Create ~/llms.env with:

GEMINI_API_KEY=your_api_key_here

Make sure LaminDB is initialized and connected.

Quick Start

Run in default mode:

lag --prompt "Write a text file with 'Hello agent!' in it, please"

Modes

Default mode

  • If a plan exists (plan.md or latest plan_*.md, or --plan-file), lag executes the referenced runnable tools.
  • Otherwise, lag generates runnable tool file(s), shows their contents, and asks for confirmation before execution.
  • In default mode, generated code includes ln.track() / ln.finish() unless --no-track is used.

Planning mode (--plan)

Generate tools without executing them:

lag --plan --prompt "Write a plan for this analysis"

Generated tool files are saved via lamin save in plan mode.

Common Flags

  • --project <name> sets LAMIN_CURRENT_PROJECT.
  • --model <model-name> selects the Gemini model.
  • --output-file <path> sets output filename for generated content.
  • --output-format [md|py|ipynb] applies in --plan mode.
  • --plan-file <path> executes a specific plan in default mode.
  • --no-track disables ln.track() / ln.finish() injection.
  • --yes skips confirmation for executing newly generated tools.

Run Context Propagation

When lag executes scripts/notebooks, it propagates:

  • LAMIN_INITIATED_BY_RUN_UID (master run uid)
  • LAMIN_CURRENT_PROJECT (if --project is provided)

lag itself does not directly create output artifacts; produced outputs are tracked by executed tool code.

Metadata

Release files for lag-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lag-cli 0.1.0
File Size Uploaded
lag_cli-0.1.0.tar.gz 23.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lag-cli 0.1.0
File Interpreter ABI Platform
lag_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.1 kB

Release files / lag_cli-0.1.0.tar.gz

Download URL lag_cli-0.1.0.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1174b312016c6d91ed221f722d57605f5ee12ff317254dd3c48a92e7d8cf12f7
BLAKE2b-256 checksum
How to use checksums
068b484d2c5ae1904d468c9cb23f8b3f3325ead8d90bd04053fe5bc7f60eee2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / lag_cli-0.1.0-py3-none-any.whl

Download URL lag_cli-0.1.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89ac3d7e9c3b96af29a60c0923b81d7f336ceb501a6975aaf7b6ddbdc397f7a2
BLAKE2b-256 checksum
How to use checksums
a128770f9a4d922cfd065cb1ed10c304d381127d01caa8d551989050b161ee48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page