gptme/gptme

Your agent in your terminal, equipped with local tools: writes code, uses the terminal, browses the web. Make your own persistent autonomous agent on top!

What it solves

gptme is a personal AI agent designed to operate wherever a terminal exists—including laptops, SSH sessions, headless servers, and CI pipelines. It bridges the gap between a chat interface and a functional workspace by providing an AI with direct access to the shell, Python, and the web, allowing it to act as a coding assistant, a data analyst, or a fully autonomous background agent.

How it works

The agent operates as a CLI tool that can be configured with various LLM providers (Anthropic, OpenAI, Google, xAI, DeepSeek, or local models via llama.cpp). It uses a tool-calling loop where the AI can execute shell commands, run Python code, read/write files, and browse the web via Playwright. It features a "lessons system" that injects contextual guidance based on keywords or patterns to improve behavior over time. For autonomous operation, it can be scaffolded as a systemd service to run on a schedule, maintaining a persistent workspace with a journal and task queue.

Who it’s for

  • Developers who want an AI coding agent that can actually execute and test code in their local environment.
  • System Administrators looking to automate terminal tasks using natural language.
  • Researchers needing to automate data collection and analysis pipelines.
  • AI Engineers building persistent, autonomous agents that can run headless on servers.

Highlights

  • Broad Toolset: Built-in tools for shell execution, Python REPL, file manipulation (patch/morph), web browsing, and vision.
  • Provider Agnostic: Supports major cloud APIs, OpenRouter, and fully local LLMs.
  • Autonomous Capabilities: Support for persistent agents with run loops, task management, and meta-learning via a dedicated agent template.
  • Extensible Architecture: Customization via Python plugins, lightweight "skills," and a lessons system for behavioral guidance.
  • Interoperability: Acts as both an MCP client (loading external tools) and an MCP server (exposing its tools to other clients like Claude Desktop or Cursor).

Related

  • Project
  • Project
  • Project
  • Project
  • Dispatch