Skip to content

ssubedir/gogent

Repository files navigation

GoGent

An AI agent that thinks, acts, and iterates.

GoGent is an intelligent agent that uses the ReAct pattern to solve complex problems. It reasons through tasks step-by-step, uses tools to interact with your system, and can delegate work to specialized workers. Built in Go with MCP support and a flexible skills system.


How It Works

GoGent uses the ReAct pattern — it doesn't just generate text, it reasons through problems:

  1. Think → Analyze what needs to be done
  2. Act → Use tools to gather info or make changes
  3. Observe → See results and decide next steps

This loop continues until the task is complete. Along the way, it can read files, run commands, search the web, and delegate to specialized workers.


What Can It Do?

Code & Files

  • Analyze and explain codebases
  • Write, edit, and refactor code
  • Review for bugs and security issues

Research

  • Search the web for information
  • Fetch and summarize URLs
  • Synthesize findings into reports

Orchestration

  • Break complex tasks into subtasks
  • Delegate to specialized workers
  • Coordinate parallel work

Installation

Unix/macOS:

./install.sh

Installs to /usr/local/bin by default. Custom location:

INSTALL_DIR=~/.local/bin ./install.sh

Windows:

.\build.ps1

Outputs to dist/ folder.

Or build manually:

go build -o gogent ./cmd/gogent

Quick Start

Create a config file (.gogent.yaml or ~/.gogent/config.yaml):

default_provider: openai
providers:
  openai:
    api_key: ${OPENAI_API_KEY}
    model: gpt-4o

Run:

gogent run "Explain this codebase"

Commands

gogent run    # Run Cli
gogent tools  # List all tools
gogent skills # List loaded skills
gogent mcp    # Show MCP servers

Extending GoGent

Skills

Drop a SKILL.md file in a skills/ folder to add specialized knowledge:

---
name: code-review
description: Use when reviewing code or finding bugs
triggers: [review, bugs]
---

# Code Review Skill

Check security, performance, and code quality...

MCP Servers

Connect external tools via Model Context Protocol:

{
  "servers": {
    "github": {
      "command": "mcp-server-github",
      "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
    }
  }
}

Providers

Works with any OpenAI-compatible API:

  • OpenAImodel: gpt-4o
  • Ollamabase_url: http://localhost:11434/v1
  • LM Studiobase_url: http://localhost:1234/v1
  • vLLMbase_url: http://localhost:8000/v1
  • Custom — Any base_url + model

Built-in Tools

Tool What it does
read_file Read file contents
write_file Create or overwrite files
edit_file Replace text in files
list_files Browse directories
execute_shell Run shell commands
web_fetch Fetch URLs
web_search Search the web

Contributing

Fork, branch, run make test, commit, push, open a PR.


License

MIT

About

A lightweight, self-hosted(able), ReAct-style autonomous general-purpose agent written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages