covoagent

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

README

covo-agent

covo-agent

简体中文 | English

covo-agent is a general-purpose AI agent for the terminal, with both general and code-focused modes. It supports everyday knowledge work, software development, automation, persistent context, and external-system collaboration through an interactive TUI, tools, memory, skills, safety controls, and extensible integrations.

Highlights

  • Interactive terminal workflow: streaming responses, tool activity, mouse selection, session history, model picker, themes, and shell completion.
  • Multiple execution modes: interactive TUI, one-shot output, and policy-controlled headless runs.
  • Coding tools: file search and editing, patch application, shell execution, code analysis, review, test generation, Git worktrees, and checkpoints.
  • Persistent context: sessions, memory providers, skills, goals, snapshots, commitments, profiles, and project-level configuration.
  • Provider flexibility: OpenAI, Anthropic, Gemini, Xiaomi, OpenRouter, and OpenAI-compatible custom providers.
  • Safety controls: approval gates, allow/deny policies, secret redaction, URL/path checks, OS sandbox profiles, audit logs, and doom-loop recovery.
  • Extensible integrations: MCP servers, ACP, LSP, plugins, extensions, communication gateways, and custom providers.

Requirements

  • Go 1.25.0 or newer for source builds.
  • An API key or login for at least one supported model provider.
  • Git is recommended for checkpoints, worktrees, review, and repository-aware features.
  • Chrome or Chromium is optional and enables the full browser tool experience.

Feature availability can vary across macOS, Linux, and Windows. Run covo-agent doctor to inspect the current environment.

Install

Install with Homebrew on macOS or Linux:

brew install --cask covoyage/tap/covo-agent

Install with Scoop on Windows:

scoop bucket add covoyage https://github.com/covoyage/scoop-bucket
scoop install covoyage/covo-agent

Release archives and checksums are also published on the GitHub Releases page.

Install the latest version with Go:

go install github.com/covoyage/covo-agent/cmd/covo-agent@latest

The binary is installed to GOBIN, or to $(go env GOPATH)/bin when GOBIN is not set. Make sure that directory is on your PATH.

Build From Source

Source builds use the dependency layout declared in go.mod. Prepare the referenced local modules, then clone and build the project:

mkdir covoyage && cd covoyage
git clone https://github.com/covoyage/covo-agent.git
cd covo-agent

go build -o bin/covo-agent ./cmd/covo-agent

Optionally install the binary on your PATH:

install -m 0755 bin/covo-agent "$HOME/.local/bin/covo-agent"

Quick Start

Configure a provider and model:

covo-agent setup
# or reopen the model/provider picker later
covo-agent model

Credentials can also be managed explicitly:

covo-agent auth add OPENAI_API_KEY=your-key
covo-agent auth list

Start the interactive TUI in a project directory:

cd your-project
covo-agent

Run a single prompt without the TUI:

covo-agent --oneshot "summarize the current repository"
covo-agent -z "review the uncommitted changes" --json

Run a constrained headless task:

covo-agent --headless \
  -z "find the cause of the failing tests" \
  --tools read,grep,glob,bash \
  --max-turns 8 \
  --allow 'bash:go test *' \
  --deny 'bash:rm *'

Execution Modes

Mode Example Use case
Interactive TUI covo-agent Iterative coding, tools, approvals, and session navigation
One-shot covo-agent -z "prompt" Scripts and a single terminal response
One-shot JSON covo-agent -z "prompt" --json Structured automation output
Headless covo-agent --headless -z "prompt" Non-interactive agent runs with explicit policies

Useful root flags include:

--provider <name>          Override the configured provider
--model <name>             Override the configured model
--mode general|code        Select the agent mode
--session-id <id>          Resume or create a named session
--sandbox <profile>        workspace, read-only, strict, devbox, off, or custom
--system-prompt <text>     Replace the default system prompt
--append-system-prompt     Append text to the default system prompt
--yolo                     Bypass approval prompts (high risk)

Use covo-agent --help for the complete and current flag list.

Command Map

Area Commands
Setup and health setup, model, config, auth, doctor, status, version, update
Sessions and knowledge session, memory, skill, dreaming, commitments, backup, restore, migrate
Coding workflow analyze, review, pr, testgen, worktree
Integrations mcp, acp, lsp, gateway, pairing, plugin, ext, package
Personalization profile, language, theme, features, template
Automation cron, heartbeat, completion

Every command has its own help page:

covo-agent session --help
covo-agent gateway --help
covo-agent mcp --help

Shell completion is available for Bash, Zsh, Fish, and PowerShell:

covo-agent completion zsh > "${fpath[1]}/_covo-agent"
covo-agent completion bash > ~/.local/share/bash-completion/completions/covo-agent

Configuration

The default global configuration is stored in:

~/.covo-agent/config.yaml

A project can override global values with .covo-agent.yaml. The loader searches upward from the current directory and stops at the Git root or the user home directory.

Minimal configuration:

provider: openai
model: gpt-5.6
mode: code

Environment variables in YAML are expanded, so secrets can remain outside the config file:

custom_providers:
  - name: Local
    protocol: openai/chat
    base_url: ${CUSTOM_BASE_URL}
    api_key_env: CUSTOM_API_KEY

Credentials managed by covo-agent auth are stored in ~/.covo-agent/.env with restrictive file permissions. Project and process environment variables may override configured values.

Profiles use isolated data directories under:

~/.covo-agent/profiles/<profile>/

Set COVO_PROFILE or use the profile command to select one.

Data Locations

Path Purpose
~/.covo-agent/config.yaml Global configuration
~/.covo-agent/.env Provider credentials and environment values
.covo-agent.yaml Project-level overrides
~/.covo-agent/sessions/ Persistent sessions and lifecycle sidecars
~/.covo-agent/skills/ Installed and user-created skills
~/.covo-agent/covo-agent.log Interactive runtime warnings and diagnostics
~/.covo-agent/profiles/ Isolated profile data

Safety

Tool actions that can mutate files, execute commands, or affect external systems pass through approval and policy layers. For automation, use explicit allow and deny rules and a sandbox profile.

covo-agent --headless -z "run the test suite and fix one failure" \
  --sandbox workspace \
  --allow 'edit:*' \
  --allow 'bash:go test *' \
  --deny 'bash:git push*'

--yolo disables dangerous-operation approval prompts. Use it only in an environment where unrestricted tool execution is acceptable.

Telemetry export is opt-in. Set COVO_OTEL_ENDPOINT or COVO_OTEL_ENABLED=true to enable it. Audit and telemetry payloads pass through secret redaction before export.

Troubleshooting

Run the environment and configuration checks:

covo-agent doctor
covo-agent doctor --fix

Common checks include:

  • home, configuration, credential, session, and skill paths;
  • provider key and model configuration;
  • Git and browser availability;
  • terminal color, clipboard, multiplexer, and keyboard capabilities.

Interactive warnings are written to ~/.covo-agent/covo-agent.log so they do not corrupt the alternate-screen TUI.

Development

Before building, make sure the local module paths declared in go.mod are available in the workspace.

go build ./...
go test ./...
go vet ./...

Build the runnable binary after making changes:

go build -o bin/covo-agent ./cmd/covo-agent

Before submitting changes, run the build, test, and vet commands above and rebuild the executable.

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

Documentation

Overview

Package covoagent holds resources embedded into the covo-agent binary so that single-binary distributions ship everything they need.

The embed directive must live at the module root because go:embed cannot reference parent directories (skills/ sits at the repo root, above the packages that consume it).

Index

Constants

This section is empty.

Variables

View Source
var BundledSkillsFS embed.FS

BundledSkillsFS contains the built-in skills/ tree. It is unpacked at runtime when no on-disk bundled skills directory is found (e.g. a standalone binary with no skills/ folder alongside it). The "all:" prefix ensures dotfiles and underscore-prefixed support files are included.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
covo-agent command
internal
acp
agent/harness
Package harness provides a test harness for multi-turn agent scenarios.
Package harness provides a test harness for multi-turn agent scenarios.
agent/safety
Package agent provides runtime threat detection for tool calls.
Package agent provides runtime threat detection for tool calls.
app
Package app owns process-level runtime state and application composition.
Package app owns process-level runtime state and application composition.
audit
Package audit provides a persistent audit log for agent tool calls and lifecycle events.
Package audit provides a persistent audit log for agent tool calls and lifecycle events.
circuitbreaker
Package circuitbreaker implements a sliding-window HTTP circuit breaker.
Package circuitbreaker implements a sliding-window HTTP circuit breaker.
cli
cli/keychain
Package keychain provides platform-native credential storage using the system keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service).
Package keychain provides platform-native credential storage using the system keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service).
codegraph
Package codegraph builds a dependency graph of Go packages in a workspace.
Package codegraph builds a dependency graph of Go packages in a workspace.
crash
Package crash provides a system-level crash handler that captures panics, generates detailed crash reports, and persists them for later analysis.
Package crash provides a system-level crash handler that captures panics, generates detailed crash reports, and persists them for later analysis.
diag
Package diag provides terminal diagnostics for color support, clipboard, tmux, and keyboard behavior.
Package diag provides terminal diagnostics for color support, clipboard, tmux, and keyboard behavior.
diff
Package diff provides a minimal unified-diff implementation based on the Longest Common Subsequence (LCS) algorithm.
Package diff provides a minimal unified-diff implementation based on the Longest Common Subsequence (LCS) algorithm.
doomloop
Package doomloop provides cross-turn doom loop detection.
Package doomloop provides cross-turn doom loop detection.
evolution
Package evolution provides OSV (Open Source Vulnerabilities) integration.
Package evolution provides OSV (Open Source Vulnerabilities) integration.
headless
Package headless provides enhanced headless (non-interactive) mode with tool filtering, max-turns, allow/deny lists, and streaming JSON output.
Package headless provides enhanced headless (non-interactive) mode with tool filtering, max-turns, allow/deny lists, and streaming JSON output.
hunk
Package hunk tracks file changes with source attribution (Agent vs External).
Package hunk tracks file changes with source attribution (Agent vs External).
i18n
Package i18n provides lightweight internationalization for covo-agent.
Package i18n provides lightweight internationalization for covo-agent.
inbox
Package inbox provides a persistent, crash-resilient message queue for cross-session (typically sub-agent → parent) asynchronous notification.
Package inbox provides a persistent, crash-resilient message queue for cross-session (typically sub-agent → parent) asynchronous notification.
kanban
Package kanban provides a task board system for structured work decomposition, state tracking, and parallel execution coordination.
Package kanban provides a task board system for structured work decomposition, state tracking, and parallel execution coordination.
lifecycle
Package lifecycle provides an extensible agent lifecycle hook system.
Package lifecycle provides an extensible agent lifecycle hook system.
lsp
marketplace
Package marketplace provides a unified plugin marketplace for discovering, installing, and managing plugins (skills, commands, agents, hooks, MCP servers).
Package marketplace provides a unified plugin marketplace for discovering, installing, and managing plugins (skills, commands, agents, hooks, MCP servers).
mdstream
Package mdstream provides a streaming-aware Markdown renderer with LaTeX math formula rendering and syntax highlighting adaptation.
Package mdstream provides a streaming-aware Markdown renderer with LaTeX math formula rendering and syntax highlighting adaptation.
pkg
plugin/builtin
Package builtin owns the catalog of platform plugins compiled into covo-agent.
Package builtin owns the catalog of platform plugins compiled into covo-agent.
promptqueue
Package promptqueue implements a multi-prompt queue with merge rules.
Package promptqueue implements a multi-prompt queue with merge rules.
safego
Package safego provides a panic-recovering goroutine launcher.
Package safego provides a panic-recovering goroutine launcher.
security
Package security provides shared security primitives used by multiple internal packages.
Package security provides shared security primitives used by multiple internal packages.
session/sqlitefs
Package sqlitefs provides filesystem-aware SQLite journal mode selection.
Package sqlitefs provides filesystem-aware SQLite journal mode selection.
snapshot
Package snapshot provides file-level snapshot and revert capability using a content-addressed git tree store in an isolated repository.
Package snapshot provides file-level snapshot and revert capability using a content-addressed git tree store in an isolated repository.
syspower
Package syspower provides cross-platform system sleep/wake notifications.
Package syspower provides cross-platform system sleep/wake notifications.
telemetry
Package telemetry provides OpenTelemetry-compatible telemetry export for covo-agent.
Package telemetry provides OpenTelemetry-compatible telemetry export for covo-agent.
trust
Package trust implements a folder-trust gate that protects users from running covo-agent in untrusted directories containing repo-local code execution configurations (hooks, MCP servers, .envrc, etc.).
Package trust implements a folder-trust gate that protects users from running covo-agent in untrusted directories containing repo-local code execution configurations (hooks, MCP servers, .envrc, etc.).
tui
Package tui 提供 covo-agent 业务 UI 适配层。
Package tui 提供 covo-agent 业务 UI 适配层。
workflow
Package workflow provides a declarative workflow engine for orchestrating multi-phase agent tasks with conditions, budgets, pause/resume, and output schemas.
Package workflow provides a declarative workflow engine for orchestrating multi-phase agent tasks with conditions, budgets, pause/resume, and output schemas.
worktree
Package worktree provides fast git worktree creation using CoW cloning.
Package worktree provides fast git worktree creation using CoW cloning.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL