Skip to content
Edit this page View source of this page

Pegg Overview

Pegg is a provider-agnostic AI coding agent written in Go. It runs as an interactive terminal application, a headless CLI, an HTTP API server, an Agent Client Protocol server, a VS Code extension, or as an embeddable Go SDK.

The agent can read and edit files, run shell commands, search the web, manage todos, delegate work to subagents, load skills, follow project rules, and talk to MCP and language servers — all inside a sandboxed workspace.

What is Pegg

  • Multi-provider by design

    Bring your own key for 33 cloud providers, or point a generic OpenAI-compatible driver at any local or self-hosted endpoint. Models are discovered from the provider API and enriched with context-window, pricing, and capability metadata.

  • Built for the terminal

    A tcell-based TUI with streaming markdown, syntax-highlighted diffs, tool cards, a subagent view, live context/cost tracking, 26 themes, and @// pickers.

  • Permissions you control

    Five permission modes per tool, an LLM judge, a persistent allow/reject store, a VFS sandbox with .gitignore awareness, and double-Esc emergency stop.

  • Subagents and parallel work

    The orchestrator delegates to explorer and developer subagents, which run concurrently, persist their state, and can be resumed with follow-up messages.

  • Reminders

    System reminders keep every agent informed mid-turn: usage and context-window status, background subagent results, and more — injected automatically.

  • Scheduled automations

    Run the agent on a cron schedule — daily summaries, weekly checks, recurring reminders — with each run saved as its own session. Fires while the TUI, server, or connect daemon is running.

  • Project memory

    A markdown-based memory system: an observer distills every run into observations, a librarian curates them, and future runs get a budget-bounded memory panel of what was done, decided, and learned.

  • Team AI

    Centralize provider keys for a team. Owners add encrypted BYOK providers and defaults on the website; members connect with pegg team and use a pegg-team <team> provider backed by the team's keys.

  • Connect to the web

    Pair the app on your machine with the Pegg website and chat with your agent from a browser — sessions, settings, and tools stay local, and only a one-time pairing token is needed.

  • Extensible

    Skills, rules, MCP servers, LSP servers, custom tools, middlewares, providers, agents, and an event bus with WordPress-style hooks.

  • Automation ready

    Run one-shot headless prompts from CI, or expose the agent over a REST API (with SSE streaming) and ACP for editor integrations.

Model Access

Pegg does not require a hosted service. You configure providers locally and every BYOK request goes straight from your machine to the provider. Pegg Forever (pegg-forever) is an optional first-party gateway at https://forever.pegg.dev/v1.

  • Bring your own key — add providers with pegg login, the TUI settings page, or directly in ~/.pegg/pegg.json.
  • Pegg Forever — sign in with pegg login-pegg or paste an API key; the desktop and TUI first-run screens offer both. After login, Pegg can apply recommended models and settings from the Forever defaults document after showing you the changes.
  • Custom endpoints — use the generic openai, claude, or gemini driver with a base_url to target any compatible gateway.
  • Local runtimes — anything speaking the OpenAI chat-completions API works, for example a locally hosted inference server.

See Providers & Models for the full list and Config for the configuration reference.

Applications

These are end-user applications built on top of Pegg's agent core:

  • CLI

    Interactive chat or fully headless automation for CI/CD and scripting. Piped stdin becomes the prompt; output streams as plain text.

    pegg run "explain this repository"

  • TUI

    The default interface. Run pegg with no arguments on a terminal to open the chat UI with attachments, subagent transcripts, and live settings.

    pegg

  • Server

    A REST API with session management and Server-Sent Events streaming, plus an ACP endpoint for editor clients.

    pegg serve

  • ACP

    Speak JSON-RPC 2.0 with the agent over stdio, HTTP+SSE, or WebSocket.

    pegg serve --acp --stdio

  • VS Code

    Chat, sessions, tools, permissions, voice input, and editor actions inside VS Code, backed by the local Pegg engine.

    code --install-extension peggco.pegg-vscode

  • Intellij

    The Pegg plugin for JetBrains IDEs embeds the same agent engine used by the CLI, TUI, and VS Code extension

    idea installPlugins dev.pegg.ide

  • Desktop

    A cross-platform desktop client for Pegg built with Wails v2 and a React 19 + TypeScript frontend.

    https://github.com/peggco/pegg/releases

  • Go SDK

    Embed the engine in your own Go program: chat, completions, sessions, files, tools, and events.

    go get github.com/peggco/pegg/pkg/sdk

Next steps