goa

โŸก Goa โ€” Terminal-native AI Coding Agent

๐ŸŒ Website: https://pijalu.github.io/goa/ (source in web/, deployed via GitHub Pages)

Goa is a terminal-native AI coding agent with full LLM transparency, multi-agent collaboration, and an ANSI TUI engine (inspired by pi / OpenCode / kimi-code). It uses the merged Agent SDK in internal/agentic/ to orchestrate conversations with any OpenAI-compatible LLM provider (OpenAI, llama.cpp, LM Studio, Ollama) and exposes a powerful tool system for interacting with your codebase.

Status: Active development. See bugs.md for current issues.

Quick Start

# Build from source
make build

# First run launches the interactive setup wizard
./goa

On first run, Goa walks you through:

  1. Configuring an LLM provider (endpoint, model, API key)
  2. Selecting an agent profile (coder, planner, reviewer)
  3. Choosing an execution mode (yolo, confirm, review)

Features

Feature Description
๐Ÿง  Multi-provider Connect to any OpenAI-compatible LLM endpoint
๐Ÿ›  Tool System Read, write, edit, search, bash, SSH, background exec, git utilities
๐Ÿ“ Config Cascade Embedded defaults โ†’ home โ†’ project โ†’ local โ†’ env โ†’ CLI overrides
๐Ÿ‘ค Agent Profiles Built-in profiles: coder, planner, reviewer โ€” custom via extends
๐Ÿงฉ Skills Reusable prompt templates โ€” inline (system prompt injection) or sub-agent
๐Ÿ” Multi-Agent Pair (planner โ†’ coder) and reviewer (coder โ†’ reviewer) collaboration
๐Ÿ“‹ Workflows Multi-stage, multi-agent workflows with team collaboration and AgentBus
๐Ÿงช Loop Detection 5 heuristics (identical calls, token budget, timeout, activity, error rate)
๐Ÿ’พ Session Persistence Full JSONL session history with /save and /restore
๐Ÿ“ฆ Diagnostic Export Self-contained ZIP bundle via /export with events, logs, config, and issue description
๐Ÿ–ฅ Rich TUI Chat, thinking stream, tool ledger, log, token budget, side panel, modals
๐Ÿ”Œ JS Plugins Extend Goa with JavaScript plugins via Goja
๐Ÿ”„ Execution Modes yolo (auto-approve), confirm (pause before each tool), review (queue edits)
๐Ÿ”’ Git Worktree Isolation Sandboxed agent filesystem via git worktree
๐ŸŽจ Configurable Spinner Choose from 50+ spinner styles via /config or tui.spinner
๐Ÿ” Priority Search Search results ordered by file type (source first) with match counts
โŒจ๏ธ History Persistence Input history saved across sessions
๐Ÿ—‘๏ธ Model/Provider Mgmt Delete models/providers via /config:remove or backspace in pickers
โšก Direct Tool Execution Run tools directly via /tools:<name>:<key>=<value>,...

Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Goa Process                              โ”‚
โ”‚                                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                  TUI Layer (ANSI engine)                  โ”‚  โ”‚
โ”‚  โ”‚   Header โ”‚ ChatViewport โ”‚ StatusBar โ”‚ Editor โ”‚ Footer     โ”‚  โ”‚
โ”‚  โ”‚   Overlays โ”‚ Selector โ”‚ Markdown                          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                         โ”‚ agentic.OutputEvent / raw key events  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                    Goa Core Engine                        โ”‚  โ”‚
โ”‚  โ”‚   CommandRouter โ”‚ AgentManager โ”‚ ConfigLoader โ”‚ DocEngine โ”‚  โ”‚
โ”‚  โ”‚   LoopDetector โ”‚ ExecutionController โ”‚ SessionStore       โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚         โ”‚                            โ”‚                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   Agent SDK      โ”‚        โ”‚   Tool Registry               โ”‚  โ”‚
โ”‚  โ”‚  Agent/Session   โ”‚        โ”‚  read_file โ”‚ edit_file ยทยทยท    โ”‚  โ”‚
โ”‚  โ”‚  SkillRunner     โ”‚        โ”‚  bash โ”‚ ssh_bash โ”‚ bg_exec    โ”‚  โ”‚
โ”‚  โ”‚  AgentBus        โ”‚        โ”‚  memento โ”‚ search โ”‚ goa_cmd   โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚         โ”‚                                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                   Provider Layer                         โ”‚   โ”‚
โ”‚  โ”‚  OpenAIProvider (any compatible endpoint)                โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                  Supporting Systems                       โ”‚  โ”‚
โ”‚  โ”‚  MemoryStore โ”‚ ProfileResolver โ”‚ ProviderManager          โ”‚  โ”‚
โ”‚  โ”‚  SkillRegistry โ”‚ Plugin Loader โ”‚ WorktreeManager          โ”‚  โ”‚
โ”‚  โ”‚  SessionStore                                             โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Dependencies

Dependency Purpose
Agent SDK (internal/agentic/) Core AI agent SDK (merged, no external dependency)
ANSI TUI (tui/) Custom TUI engine: Component/TUI/ProcessTerminal
golang.org/x/term Terminal raw mode
cobra CLI flag parsing
goja JavaScript plugin runtime
gopkg.in/yaml.v3 YAML parsing

Documentation

Document Description
ARCHITECTURE.md Full system architecture
SETUP.md Installation & setup guide
CONFIGURATION.md Config cascade & all settings
COMMANDS.md Command system reference
TOOLS.md Tool system reference
SKILLS.md Skills system reference
PROFILES.md Agent profiles & resolution
TUI.md TUI layout & usage
AGENTIC-SDK.md How Goa wraps the agentic SDK
WORKFLOWS.md Workflow system reference
DEVELOPMENT.md Development guide
bugs.md Known issues and roadmap
AGENTS.md AI agent coding guidelines
PROFILING.md Performance profiling guide

Project Structure

goa/
โ”œโ”€โ”€ main.go                  # Entry point
โ”œโ”€โ”€ cmd/goa/                 # Cobra CLI root
โ”œโ”€โ”€ config/                  # Config struct, cascade loader, defaults, wizard
โ”œโ”€โ”€ core/                    # Commands, registry, router, agent manager,
โ”‚   โ”‚                        # loop detector, execution controller, session store
โ”‚   โ””โ”€โ”€ commands/            # 30+ commands (auto-registered via init())
โ”œโ”€โ”€ internal/                # Shared types, enums, errors, git worktree manager
โ”œโ”€โ”€ tui/                     # ANSI TUI: engine, components, overlays, styles
โ”œโ”€โ”€ tools/                   # Tool registry & implementations
โ”œโ”€โ”€ memory/                  # Persistent memory store
โ”œโ”€โ”€ profiles/                # Profile resolution & built-in definitions
โ”œโ”€โ”€ provider/                # Provider management & model listing
โ”œโ”€โ”€ skills/                  # Skill registry, runner, inline injection
โ”œโ”€โ”€ multiagent/              # Pair & reviewer orchestrators, workflow engine
โ”œโ”€โ”€ workflows/               # Workflow definitions (directory-per-workflow)
โ”œโ”€โ”€ plugins/                 # JS plugin loader & Goja bridge
โ”œโ”€โ”€ internal/agentic/        # Merged Agent SDK
โ”œโ”€โ”€ chunks/                  # Milestone implementation briefs
โ”œโ”€โ”€ docs/                    # Documentation
โ”œโ”€โ”€ Makefile                 # Build, test, lint, cross-compile
โ””โ”€โ”€ bugs.md                  # Known issues and roadmap

Development

# Install prerequisites
go install github.com/uudashr/gocognit/cmd/gocognit@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest

# Build & test
make build
make test
make lint

# Run Goa
make run

See DEVELOPMENT.md for detailed development guidelines.

License

GNU GPLv3 โ€” see the LICENSE file for details.