Skip to main content

augpool

Build

Pool multiple Augment Code credentials and prefer the least-used account so org credit spend stays balanced.

Identity is always the full email. No short ids.

Home ~/.augpool/ — override with AUGPOOL_HOME or --home
Runtime Python 3.11+, zero third-party deps
Auth inject AUGMENT_SESSION_AUTH and auggie --augment-session-json

Install

The augpool binary must sit on a stable PATH that both your terminal and agent hosts (e.g. kandev boot scripts) can resolve. A project venv alone is usually not enough for agents.

Recommended — pipx

pipx install augpool
# → ~/.local/bin/augpool   (keep ~/.local/bin on PATH)

User install

python3 -m pip install --user augpool
# ensure ~/.local/bin is on PATH for login shells *and* GUI / agent processes

Editable (development)

git clone https://github.com/zeval/augpool.git
cd augpool
python3 -m pip install -e ".[dev]"

Editable installs place the console script in whichever environment’s bin/ you pip into (conda base, Homebrew Python, …). That only works for kandev if that bin/ is on the agent’s PATH.

Avoid for agent use:

python3 -m venv .venv && source .venv/bin/activate && pip install …

That works only while the venv is activated. kandev will not find augpool.


First things to do

Do these in order. Every example uses placeholders only (you@example.com).

1. Import your account (start here)

You need at least one credential in the pool. Easiest path: whatever auggie is already logged in as on this machine.

# After normal `auggie login` (or any existing ~/.augment/session.json)
augpool import --self --email you@example.com

Or point at a session file you already have:

augpool import --session ./session.json --email you@example.com

# stdin JSON
augpool import --session - --email you@example.com < session.json

# replace if that email is already in the pool
augpool import --session ./session.json --email you@example.com --force

Auggie session JSON looks like { "accessToken", "tenantURL", "scopes"? } (typical path: ~/.augment/session.json). The file has no email field, so --email is always required for --self / --session.

augpool list          # confirm you’re in the pool
augpool               # run auggie under the pool (= augpool run -- auggie)
augpool -p -q "ping"

2. Export your account (share with teammates)

# By email (preferred — no Analytics wait)
augpool export you@example.com
# → one line, unpadded base64url, shell-safe (no quotes):
# eyJlbWFpbCI6InlvdUBleGFtcGxlLmNvbSIs...

# Or whoever is currently written into ~/.augment/session.json
augpool export --self

Send that one token over a private channel. It is a full credential.

Optional shapes:

augpool export --json you@example.com    # pretty envelope
eval "$(augpool export --env you@example.com)"   # shell inject (history risk)

3. Import from other users (grow the pool)

They run step 2 and paste you a blob. You do not pass --email — it’s inside the blob.

augpool import eyJlbWFpbCI6InRlYW1tYXRlQGV4YW1wbGUuY29tLC4uLg
augpool import --force eyJ...    # overwrite if that email already exists

If they give you a session file instead of a blob, you supply their email:

augpool import --session ./teammate-session.json --email teammate@example.com
# same thing:
augpool add --email teammate@example.com --session ./teammate-session.json
augpool list          # ranked least-used first

Rules

Mode Needs
Share blob (eyJ…) token only (email embedded)
--self --email
--session --email

Pass only one of blob / --self / --session.

Treat blobs and session files like passwords. Import others only with consent. Never commit them. Never paste them into public chat.

Blob shape (v2): { v, email, label, session } — unpadded base64url, no prefix.


Default: auggie wrapper

Bare augpool is augpool run -- auggie …:

augpool                              # interactive
augpool -p -q "hello"                # print mode
augpool --email you@example.com …    # force account
augpool list                         # subcommands still work

kandev / ACP

augpool --acp --allow-indexing
# equivalent:
augpool run -- npx -y @augmentcode/auggie --acp --allow-indexing

For --acp / --mcp, augpool does not buffer stdio: pick account → inject auth → os.exec the child so the host owns the protocol pipes.

Agent boot must resolve augpool on PATH (pipx, user install, or an env whose bin/ is always on PATH — not an unactivated venv).


IDE session file

augpool use                      # least-used → ~/.augment/session.json
augpool use you@example.com      # force
augpool restore                  # undo last use

Prefer augpool / augpool run for CLI so the global session file stays untouched.


Analytics ranking

Least-used score uses each account’s session token against:

GET https://api.augmentcode.com/analytics/v0/credit-usage-by-user

Credit window is the current UTC calendar month, from day 1 through today.

  • Cache: ~/.augpool/cache/ (default TTL ~5 minutes)
  • Auto-pick (list / next / bare run) refreshes when stale
  • Explicit targets (export you@…, use you@…) skip refresh
  • No Analytics access → local use counters
augpool refresh
augpool list --refresh

Usage dashboard

usage turns the pool's Analytics cache and local counters into a compact, Tokscale-inspired terminal view:

augpool usage
augpool usage --refresh       # pull Analytics first
augpool usage --json          # structured report for scripts
augpool usage --no-color      # also respects NO_COLOR
augpool usage
2026-08-01 → 2026-08-06 · updated 2m ago

3 accounts · 8.4k credits · 17 sessions

Sessions over time · 30d UTC · 12 tracked
07-08 ·····················▁··▃·█▂ 08-06
────────────────────────────────────────────────────────────────────────
● teammate@example.com                         1.8k  21.4%  active
  █████████░░░░░░░░░░░░░░░░░░░░░░░░  6 sessions · used 4m ago

Credits are Augment Analytics consumption for the current UTC calendar month. Caches from a different month are refreshed even when still inside the normal TTL. Sessions are local account selections (run/use events) recorded by augpool; they are not Augment's vendor-side conversation count. The view also surfaces active, cooldown, disabled, weight, last-used, cache, and partial-refresh information when available. Without Analytics data, bars fall back to local sessions.

Dated session tracking starts after installing this version; augpool does not assign older lifetime counts to invented dates. It keeps 90 days of per-account UTC daily buckets and shows the latest 30 days in the dashboard. --json includes daily totals and per-account counts for the same 30-day window.


Commands

Command Purpose
import --self --email … Load ~/.augment/session.json
import --session PATH --email … Load a session file (- = stdin JSON)
import <blob> Import portable share blob
add --email … --session … Add / replace from session file
export [email] | --self Print share blob (--env, --json)
remove you@example.com Drop account
list Ranked table (--json, --refresh)
usage Account credit/session dashboard (--json, --refresh)
refresh Pull Analytics now
next Print least-used email
use [email] Write into ~/.augment/session.json
run -- <cmd…> Run with pooled auth + rate-limit failover
status Home, active account, ranks
restore Restore session file from backup

Layout

~/.augpool/
  pool.json            # registry (emails, paths, weights)
  state.json           # local uses, daily session history, cooldowns, locks
  cache/usage.json     # Analytics snapshot
  creds/<email>.json   # per-account session (mode 0600)
  backups/             # previous ~/.augment/session.json

Security

  • Cred files are mode 0600
  • Prefer augpool run over export --env
  • Never commit creds/, session JSON, or share blobs
  • A share blob is the full credential — rotate if it leaks

Tests

python3 -m pip install -e ".[dev]"
pytest -q

Limits

  • Auth is fixed for one auggie process lifetime; failover restarts the child (appends --continue when safe)
  • ACP / MCP protocol mode: single pick + exec (no mid-flight failover)
  • MCP OAuth tokens are stored by Auggie per Augment account, separate from this pool

Metadata

Release files for augpool 0.2.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 augpool 0.2.0
File Size Uploaded Provenance
augpool-0.2.0.tar.gz 42.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for augpool 0.2.0
File Interpreter ABI Platform
augpool-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 76.7 kB

Release files / augpool-0.2.0.tar.gz

Download URL augpool-0.2.0.tar.gz
Size 42.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8c15a7045ffdaa11798c51793f0b1d9bbd184f50043606fa0e7101774684ea93
BLAKE2b-256 checksum
How to use checksums
977c30a9df21c13e9d6692cf8afcfac5b614890edba0234d79c4c71b9f9f5699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release files / augpool-0.2.0-py3-none-any.whl

Download URL augpool-0.2.0-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92a34bef0a5e0644c22ea9eb80c9b4897e7be20008af2c801cd080b1475431d4
BLAKE2b-256 checksum
How to use checksums
bb71d4411484c38e80db18bc56e07d75f0b23dc5d1a61f48aa3727c1c010c3fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Security for augpool 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for augpool-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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