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.2.tar.gz (11.5 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.2-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jugaad_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 11.5 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.2.tar.gz
Algorithm Hash digest
SHA256 9400635fdeda0809be303971c0e2f66b2336d2a27ab41438f82dd6e74307af89
MD5 6a0fce48ef5691384f179f245b23d5fc
BLAKE2b-256 f7e52da613813ad8da08088852aa667f6bec8bb7782063d450e63026543c4d65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jugaad_agent-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5c8344ea44d774e2a10cdd52c3c9267c7501b0fdd86af573a7964d70adbfa73
MD5 495cbd7c06b0d9966f05e8fac7d8a9a3
BLAKE2b-256 ef1f5cafc709b0208fc901d934582e75ce613924f57e6cd0236be2df3c0fa483

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