Skip to main content

Local agentic AI CLI powered by llama.cpp

Project description

llama-agentic

A local agentic AI CLI powered by llama.cpp. It runs on your machine, uses GGUF models, and exposes tools for files, shell commands, git, web access, memory, plugins, MCP servers, and A2A agents.

Think of it as a terminal coding agent driven by your local model instead of a hosted API.

You:   Refactor the auth module to use JWT, run the tests, and commit

Agent: ⚙ view_file   ✓  Read agent/auth.py
       ⚙ edit_file   ✓  Applied JWT changes
       ⚙ run_shell   ✓  pytest tests/test_auth.py
       ⚙ git_commit  ✓  refactor: replace session auth with JWT
       Done — all tests pass and changes are committed.

What it does

  • Runs a ReAct loop: reason, choose a tool, observe results, repeat
  • Works with local llama.cpp models through the OpenAI-compatible server API
  • Includes built-in tools for files, editing, shell, Python, git, web, and memory
  • Supports MCP servers so you can add GitHub, databases, browsers, Slack, and more
  • Supports A2A agents so your local agent can delegate to remote JSON-RPC A2A agents
  • Loads LLAMA.md automatically for project-specific context
  • Supports persistent memory, session save/load, watch mode, and plugin loading

Documentation

The repo docs are the primary guide set:

Guide Description
Documentation Index Overview of all guides
Getting Started Install, setup, download a model, first run
User Guide REPL usage, sessions, memory, watch mode
Tools Reference Built-in tools and examples
Configuration Environment variables and config hierarchy
Plugin Development Add custom tools
MCP Integration Configure and use MCP servers

Requirements

Requirement Version Install
macOS or Linux macOS 12+ / Ubuntu 22+
Python 3.11+ python.org
llama.cpp latest brew install llama.cpp
uv latest curl -LsSf https://astral.sh/uv/install.sh | sh

Apple Silicon works well with Metal GPU offload by default.


Installation

From PyPI

pip install llama-agentic
# or
uv tool install llama-agentic

From source

git clone https://github.com/minrahim1999/llama-agentic.git
cd llama-agentic
uv tool install --editable .

Verify

llama-agent --help

Quick Start

1. Run first-time setup

llama-agent

This creates ~/.config/llama-agentic/config.env and can help detect llama-server, choose settings, and offer a starter model download. It also saves a preferred LLAMA_MODEL_PATH so auto-start uses a deterministic GGUF file instead of guessing from the cache.

2. Download a model

llama-agent download
llama-agent download qwen2.5-coder-7b

Downloaded models are added to the cache and the selected file is persisted to LLAMA_MODEL_PATH automatically.

Recommended model:

llama-agent download qwen2.5-coder-7b

3. Start or verify the server

llama-agent doctor
llama-agent autostart enable
llama-agent autostart start

autostart enable and autostart start prefer the configured LLAMA_MODEL_PATH when it is set.

Or start it manually:

./scripts/start_server.sh /path/to/model.gguf

4. Generate project context

cd your-project
llama-agent --init

5. Start a session

llama-agent
llama-agent --task "Find and fix the failing tests"

Common Commands

llama-agent                                       # interactive REPL
llama-agent --task "review the latest changes"    # one-shot task
llama-agent --resume sessions/chat_2026-01-15.json
llama-agent doctor                                # environment checks
llama-agent download qwen2.5-coder-7b             # download a model
llama-agent models                                # list cached models and the selected one
llama-agent mcp list                              # list configured MCP servers
llama-agent a2a list                              # list configured A2A agents

Common REPL commands:

  • /help
  • /init
  • /refresh
  • /add <glob>
  • /tools
  • /memory
  • /sessions
  • /cost
  • /exit

See docs/user-guide.md for the full command list.


Key Features

  • Diff-aware editing: edit_file previews changes before writing and keeps .bak backups
  • Confirmation-gated actions: destructive tools require approval unless UNSAFE_MODE=true
  • Persistent memory: store facts across sessions
  • Session management: save, load, resume, and inspect history
  • MCP integration: dynamically register tools from external MCP servers over the currently supported transports
  • A2A integration: register remote A2A agents as callable tools and inspect their Agent Cards
  • Plugin system: load custom tools from configured plugin directories
  • .llamaignore support: block reads and writes to protected paths

Development

uv sync --dev
uv run pytest tests/ -v --tb=short
uv run ruff check agent/ tests/
uv build

Project layout and development conventions are documented in AGENTS.md.


License

MIT. See LICENSE.

Project details


Download files

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

Source Distribution

llama_agentic-0.3.2.tar.gz (217.9 kB view details)

Uploaded Source

Built Distribution

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

llama_agentic-0.3.2-py3-none-any.whl (90.1 kB view details)

Uploaded Python 3

File details

Details for the file llama_agentic-0.3.2.tar.gz.

File metadata

  • Download URL: llama_agentic-0.3.2.tar.gz
  • Upload date:
  • Size: 217.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llama_agentic-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9361d06507440c18dab34427e490ffca6df7a730bf67680c5dd4a1a797144eb4
MD5 8c97e01f3f9919874a0354e8465f4582
BLAKE2b-256 5fbe5f1f411e326f7288723b1909d154465723bb4809a39a5cdaf35c6a4bfe6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_agentic-0.3.2.tar.gz:

Publisher: publish.yml on minrahim1999/llama-agentic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_agentic-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: llama_agentic-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 90.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llama_agentic-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9fef7cac762dd2f9a2bf3a6bc17d0485ef0949377185d0124e0c5db40e241a22
MD5 5e4501874c6a619a2e83c57d4a013b18
BLAKE2b-256 e593ced8957a58babc1db7f88d0fddf9dde8af5d24ca9b1b781ccd68eba99e21

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_agentic-0.3.2-py3-none-any.whl:

Publisher: publish.yml on minrahim1999/llama-agentic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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