Skip to main content

Tool-use agent with optional LLM brain via Ollama. Pure Python stdlib.

Project description

Qwerty v3 — Tool Agent with Optional LLM Brain

Pure Python stdlib. Zero dependencies. Optional AI via Ollama.

pip install qwerty-agentqwerty

How It Works

You → Qwerty TUI
       │
       ├── LLM Brain (Ollama) ← if installed
       │     └── understands you, calls tools, generates response
       │
       └── Direct tools ← fallback
             ├── /web, /wiki, /run, /read, /write
             ├── /search, /find, /list
             └── text normalization + fuzzy matching

Without Ollama: Qwerty works as a direct tool agent (commands like /web, /run, /read). With Ollama: Qwerty becomes an AI agent that understands natural language and decides when to use tools.

Quick Start

pip install qwerty-agent
qwerty "explain what a kernel is"

For AI mode:

# Install Ollama: https://ollama.com
ollama pull qwen2.5:7b
qwerty

Features

  • 12 tools: read, write, edit, replace, append, list, search, find, run, web search, wikipedia, learn
  • LLM Brain: optional Ollama integration — understands natural language, calls tools autonomously
  • Text normalization: shorthand expansion, contraction handling, character dedup, fuzzy matching
  • Constitution safety: blocks dangerous commands, secrets leaks, unauthorized file overwrites
  • Persistent memory: learned facts survive across sessions
  • Beautiful TUI: colors, dividers, timestamps, tab completion, command history
  • No dependencies: pure Python stdlib — runs on any system with Python 3.10+

Commands

Command Description
/web <query> Search the web
/wiki <topic> Look up Wikipedia
/run <cmd> Run shell command
/read <path> Read a file
/write <path> Write a file
/search <text> Search files for text
/find <pattern> Find files by name
/brain Check LLM connection
/status Agent status
/help Show help

Architecture

qwerty-agent/
├── qwerty_agent/
│   ├── agent.py        # Tool implementations + process()
│   ├── brain.py        # Ollama LLM connector
│   ├── interface.py    # TUI (colors, history, tab completion)
│   ├── protocol.py     # JSON-RPC / MCP server
│   └── constitution.json  # Safety rules
├── test_all.py         # 46 tests
├── pyproject.toml
└── README.md

Requirements

  • Python 3.10+
  • No pip packages needed
  • Ollama (optional) for AI mode

Tests

python test_all.py

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

qwerty_agent-3.0.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

qwerty_agent-3.0.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file qwerty_agent-3.0.0.tar.gz.

File metadata

  • Download URL: qwerty_agent-3.0.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for qwerty_agent-3.0.0.tar.gz
Algorithm Hash digest
SHA256 5c04573fbe8d937be7556257fd2e5ffc45cb5cc6b3c324c4516ebebde23c7ad4
MD5 dbc9e043e438381b40f0731b36cc6d73
BLAKE2b-256 84572f71e3b69646d308e37b34776b0bc9b13aa6f7f8de1f9de052304a7f5a1b

See more details on using hashes here.

File details

Details for the file qwerty_agent-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: qwerty_agent-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for qwerty_agent-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 076ec6ea976014a7f7e5770349447c807585dcd2399f8fd45143874f3396abcb
MD5 a975f9f23ff1817517f77039be92fab4
BLAKE2b-256 817ea18fe08d3479d97b88e3cac8f95c99def2c0ff7da181c6bb742c4360efe4

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