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/dhruva3223/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.3.tar.gz (11.4 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.3-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jugaad_agent-0.1.3.tar.gz
  • Upload date:
  • Size: 11.4 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.3.tar.gz
Algorithm Hash digest
SHA256 2feb44021ea4cf10f1c662b741d008a857f36cec102c290a1cebb3b062f0f4ce
MD5 0ab736bf69663ee11db67924b9bb5433
BLAKE2b-256 bbd29bce225ebb60bf22c16db8615a40b7230b24cc59ab99780b4fb534b58acc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jugaad_agent-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7103a4ede0c05f39f2703553b11fb64f3a9e8d7c286564a44a97839b33d25261
MD5 ee9a21877ebe3c85ee8cd4096d00bbb5
BLAKE2b-256 6735e2046f7b61bd20dae0629f74cbb69b23988758c931d515627d9b014289e1

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