Skip to main content

JugaadAgent

Local-first, self-healing Ubuntu terminal agent. Natural language in, bash out — LangGraph state loops, Ollama, risk guardrails, and Ubuntu diagnostics on failure.

Install

Requires Python 3.10+, Linux, and Ollama running locally.

pip install jugaad-agent

Recommended for CLI tools (isolated, no venv juggling):

pipx install jugaad-agent

Pull a model once Ollama is running:

ollama serve          # if not already running
ollama pull qwen2.5-coder:latest

From source (development)

git clone https://github.com/jugaad-agent/jugaad-agent.git
cd jugaad-agent
pip install -e ".[dev]"

Usage

jaa                              # interactive
jaa "create a folder demo and list it"
jaa "free port 8080" --dry-run
jaa "install htop" --yes         # auto-approve risky commands
jaa -m llama3.2:3b "echo hi"     # set + remember default model
jaa "echo hi"                    # reuses last -m choice
python -m jugaad_agent "echo hi"

jugaad is an alias for jaa.

Flag Description
--model, -m Ollama model (saved under ~/.config/jugaad-agent/)
--max-retries Self-heal ceiling (default 3)
--dry-run Generate without executing
--yes, -y Skip HITL for MEDIUM/HIGH risk

Model selection

Priority: -m / --model (persisted) → JUGAAD_MODEL env (this run only) → saved preference → qwen2.5-coder:latest.

Environment

Variable Default Meaning
JUGAAD_MODEL (unset) One-run model override (does not save)
JUGAAD_BASE_URL http://127.0.0.1:11434 Ollama endpoint
JUGAAD_MAX_RETRIES 3 Max self-heal attempts

Copy .agent_rules.md.example to .agent_rules.md in your project directory for workspace-specific preferences.

How it works

memory → generator → guardrail → executor
              ↑            fail + retries
Module Role
state.py Pydantic state + history reducer
nodes.py LLM generation + shell execution
guardrails.py Risk scan + human approval
diagnostics.py Enrich stderr (lsof, missing binaries)
memory.py Load .agent_rules.md
graph.py LangGraph topology

Safety

LOW risk commands run automatically. MEDIUM/HIGH risk opens a [Y]es / [N]o / [E]dit prompt. This tool executes real shell commands on your machine — review every approval.

Publish (maintainers)

pip install build twine
python -m build
twine check dist/*
twine upload dist/*

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jugaad_agent-0.1.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

jugaad_agent-0.1.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jugaad_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.0rc1

File hashes

Hashes for jugaad_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2010928580df038d3ed72c1ab396eaaae0ee84e3d285de49078902ed6f644e1f
MD5 0f170989b6ee4a081721ed26ddd2ed54
BLAKE2b-256 767d439eb07a31de6e196c4bde8ca8915738a60184566338c25eadeaa3ade1d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jugaad_agent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.0rc1

File hashes

Hashes for jugaad_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51ced810e8ba1ae4b163f9869c6c199316d2ac6a33471934044b21deaac020db
MD5 376f58210ca80adc50663e323a8d8164
BLAKE2b-256 644952fd5eb82757ac810719ea62ae4850a2563b2807d80ac97d3e15f157c4f4

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