HelloAgents-Go

August 7, 2026 ยท View on GitHub

English | ็ฎ€ไฝ“ไธญๆ–‡

HelloAgents-Go

๐Ÿค– Production-Grade Multi-Agent Framework (Go Implementation) - 16 core capabilities including Tool Response Protocol, Context Engineering, Session Persistence, Sub-Agent Mechanism, and more

Go 1.22+ License: CC BY-NC-SA 4.0

HelloAgents-Go is a faithful Go reimplementation of the HelloAgents Python version, a production-grade multi-agent framework built on the native OpenAI API. It integrates 16 core capabilities including Tool Response Protocol (ToolResponse), Context Engineering (HistoryManager/TokenCounter), Session Persistence (SessionStore), Sub-Agent Mechanism (TaskTool), Optimistic Locking (File Editing), Circuit Breaker (CircuitBreaker), Skills Externalization, TodoWrite Progress Management, DevLog Decision Recording, Streaming Output (SSE), Async Lifecycle, Observability (TraceLogger), Logging System (Four Paradigms), LLM/Agent Base Class Refactoring, providing comprehensive engineering support for building complex agent applications.

๐Ÿ“Œ Version Notes

Important Notice: This repository is the Go reimplementation of HelloAgents

  • ๐Ÿ Python Original: HelloAgents The original Python implementation paired with the Datawhale Hello-Agents Tutorial.

  • ๐Ÿš€ Go Version (This Repository): Based on Python version V1.0.0, faithfully reimplements all 16 core capabilities using Go, with fully aligned module and functional semantics.

  • ๐Ÿ“ฆ Historical Versions: Releases Page Provides all Python versions from v0.1.1 to v0.2.9.

๐Ÿš€ Quick Start

Installation

git clone https://github.com/your-repo/helloagents-go.git
cd helloagents-go
go mod download

Basic Usage

package main

import (
	"fmt"
	"log"

	"helloagents-go/hello_agents/agents"
	"helloagents-go/hello_agents/core"
	"helloagents-go/hello_agents/tools"
	"helloagents-go/hello_agents/tools/builtin"
)

func main() {
	llm, err := core.NewHelloAgentsLLM("", "", "", 0.7, nil, nil, nil)
	if err != nil {
		log.Fatal(err)
	}

	registry := tools.NewToolRegistry(nil)
	registry.RegisterTool(builtin.NewReadTool("./", registry), false)
	registry.RegisterTool(builtin.NewWriteTool("./"), false)
	registry.RegisterTool(builtin.NewTodoWriteTool("./", "memory/todos"), false)

	agent, err := agents.NewReActAgent("assistant", llm, "", registry, nil, nil, 0, nil)
	if err != nil {
		log.Fatal(err)
	}

	out, err := agent.Run("Analyze project structure and generate report", nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(out)
}

Environment Configuration

Create a .env file:

LLM_MODEL_ID=your-model-name
LLM_API_KEY=your-api-key-here
LLM_BASE_URL=your-api-base-url
LLM_TIMEOUT=60
// Auto-detect provider
llm, _ := core.NewHelloAgentsLLM("", "", "", 0.7, nil, nil, nil)
fmt.Printf("Detected provider: %s\n", llm.Provider)

๐Ÿ’ก Smart Detection: The framework automatically selects the appropriate provider based on the API key format and Base URL

Supported LLM Providers

The framework supports all major LLM services through 3 adapters:

1. OpenAI-Compatible Adapter (Default)

Supports all services providing OpenAI-compatible interfaces:

Provider TypeExample ServicesConfiguration Example
Cloud APIOpenAI, DeepSeek, Qwen, Kimi, GLMLLM_BASE_URL=api.deepseek.com
Local InferencevLLM, Ollama, SGLangLLM_BASE_URL=http://localhost:8000
Other CompatibleAny OpenAI-format interfaceLLM_BASE_URL=your-endpoint

2. Anthropic Adapter

ProviderDetection ConditionConfiguration Example
Claudebase_url contains anthropic.comLLM_BASE_URL=https://api.anthropic.com

3. Gemini Adapter

ProviderDetection ConditionConfiguration Example
Google Geminibase_url contains googleapis.com or generativelanguageLLM_BASE_URL=https://generativelanguage.googleapis.com

๐Ÿ’ก Auto-Adaptation: The framework automatically selects the adapter based on base_url, no manual configuration required.

๐Ÿ—๏ธ Project Structure

helloagents-go/
โ”œโ”€โ”€ hello_agents/              # Main package
โ”‚   โ”œโ”€โ”€ core/                  # Core components
โ”‚   โ”‚   โ”œโ”€โ”€ llm.go             # LLM base class and configuration
โ”‚   โ”‚   โ”œโ”€โ”€ llm_adapters.go    # Three adapters (OpenAI/Anthropic/Gemini)
โ”‚   โ”‚   โ”œโ”€โ”€ agent.go           # Agent base class (Function Calling architecture)
โ”‚   โ”‚   โ”œโ”€โ”€ config.go          # Configuration management
โ”‚   โ”‚   โ”œโ”€โ”€ session_store.go   # Session persistence
โ”‚   โ”‚   โ”œโ”€โ”€ lifecycle.go       # Async lifecycle
โ”‚   โ”‚   โ”œโ”€โ”€ streaming.go       # SSE streaming output
โ”‚   โ”‚   โ””โ”€โ”€ message.go         # Message definitions
โ”‚   โ”œโ”€โ”€ agents/                # Agent implementations
โ”‚   โ”‚   โ”œโ”€โ”€ simple_agent.go    # SimpleAgent
โ”‚   โ”‚   โ”œโ”€โ”€ react_agent.go     # ReActAgent
โ”‚   โ”‚   โ”œโ”€โ”€ reflection_agent.go # ReflectionAgent
โ”‚   โ”‚   โ”œโ”€โ”€ plan_solve_agent.go # PlanAndSolveAgent
โ”‚   โ”‚   โ””โ”€โ”€ factory.go         # Agent factory
โ”‚   โ”œโ”€โ”€ tools/                 # Tool system
โ”‚   โ”‚   โ”œโ”€โ”€ registry.go        # Tool registry
โ”‚   โ”‚   โ”œโ”€โ”€ response.go        # ToolResponse protocol
โ”‚   โ”‚   โ”œโ”€โ”€ circuit_breaker.go # Circuit breaker
โ”‚   โ”‚   โ”œโ”€โ”€ tool_filter.go     # Tool filtering (sub-agent mechanism)
โ”‚   โ”‚   โ””โ”€โ”€ builtin/           # Built-in tools
โ”‚   โ”‚       โ”œโ”€โ”€ file_tools.go  # File tools (optimistic locking)
โ”‚   โ”‚       โ”œโ”€โ”€ task_tool.go   # Sub-agent tool
โ”‚   โ”‚       โ”œโ”€โ”€ todowrite_tool.go # Progress management
โ”‚   โ”‚       โ”œโ”€โ”€ devlog_tool.go # Decision logging
โ”‚   โ”‚       โ””โ”€โ”€ skill_tool.go  # Skills externalization
โ”‚   โ”œโ”€โ”€ context/               # Context engineering
โ”‚   โ”‚   โ”œโ”€โ”€ history.go         # HistoryManager
โ”‚   โ”‚   โ”œโ”€โ”€ token_counter.go   # TokenCounter
โ”‚   โ”‚   โ”œโ”€โ”€ truncator.go       # ObservationTruncator
โ”‚   โ”‚   โ””โ”€โ”€ builder.go         # ContextBuilder
โ”‚   โ”œโ”€โ”€ observability/         # Observability
โ”‚   โ”‚   โ””โ”€โ”€ trace_logger.go    # TraceLogger
โ”‚   โ”œโ”€โ”€ logging/               # Logging system
โ”‚   โ”‚   โ””โ”€โ”€ logging.go         # AgentLogger
โ”‚   โ””โ”€โ”€ skills/                # Skills system
โ”‚       โ””โ”€โ”€ loader.go          # SkillLoader
โ”œโ”€โ”€ cmd/                       # Entry commands
โ”œโ”€โ”€ docs/                      # Documentation
โ”œโ”€โ”€ example/                   # Example code
โ”œโ”€โ”€ skills/                    # Skill files
โ””โ”€โ”€ tests/                     # Test cases

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the CC BY-NC-SA 4.0 license - see the LICENSE file for details.

License Key Points:

  • โœ… Attribution: You must give appropriate credit to the original author
  • โœ… ShareAlike: Modified works must use the same license
  • โš ๏ธ NonCommercial: Cannot be used for commercial purposes

For commercial use, please contact the project maintainers for authorization.

๐Ÿ™ Acknowledgements

  • Thanks to the HelloAgents Python version for the original implementation
  • Thanks to Datawhale for the excellent open-source tutorial
  • Thanks to all contributors of the Hello-Agents Tutorial
  • Thanks to all researchers and developers contributing to the advancement of agent technology

๐Ÿ“š Documentation Resources

Learn more about the 16 core capabilities of HelloAgents-Go v1.0.0:

Infrastructure

Core Capabilities

Enhanced Capabilities

Auxiliary Features

Core Architecture

Extension Capabilities


HelloAgents-Go - Making agent development simple and powerful ๐Ÿš€