echoryn

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT

README ΒΆ

Project Echoryn

Recreating Openclaw in Go, building soul containers for AI virtual characters.

🚧 Work in progress (WIP) – this project is not finished yet.

Header

Go Version License Go Report Card zread

✨ Overview

Echoryn is a distributed AI virtual character container platform designed to provide AI agents with a "soul container" that brings them into our world. Inspired by the Openclaw project and Ultron from The Avengers, Echoryn adopts a central intelligence (Hivemind) with replaceable machine bodies (Golem) architecture, similar to Kubernetes coordination patterns.

Like Ultron can switch between different mechanical bodies to execute tasks, Echoryn's Hivemind (collective intelligence) acts as the central agent, coordinating multiple Golem (worker) nodes to achieve distributed task execution for AI agents. Hivemind handles decision-making, memory, and scheduling, while Golem serves as interchangeable "bodies" performing concrete operations.

The platform provides a complete infrastructure for AI agents, including LLM integration, plugin systems, memory management, and distributed task execution.

Language Versions

πŸš€ Features

Core Architecture

  • Hivemind: Central coordination server for node management and task scheduling
  • Golem: Worker nodes that execute skills and tasks locally
  • Echoctl: Command-line management tool (similar to kubectl)

AI Capabilities

  • Multi-LLM Provider Support: OpenAI, Claude, DeepSeek, Gemini, Ollama, and more
  • Model Context Protocol (MCP): Standardized tool and resource integration
  • CloudWeGo Eino Integration: Advanced LLM framework with reasoning capabilities
  • Memory System: Vector search, semantic memory, and context management

Plugin System

  • Kubernetes-inspired Plugin Framework: Interface-driven extensibility
  • Slot Mechanism: Ensures only one plugin of a specific type is active
  • Multiple Integration Types: Tools, hooks, services, CLI commands, prompts
  • Automatic Discovery: Framework auto-detects plugin interfaces

Developer Experience

  • gRPC-based Communication: Bidirectional streaming for real-time task distribution
  • Comprehensive Configuration: Support for JSON, environment variables, and flags
  • Built-in Observability: OpenTelemetry integration for monitoring and tracing
  • Production-ready Design: Graceful shutdown, health checks, and lifecycle management
  • Modern TUI: Beautiful terminal interfaces using BubbleTea and LipGloss

πŸ—οΈ Architecture

System Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       Hivemind (Brain)                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Node Mgmt  β”‚  β”‚ Task Sched  β”‚  β”‚  Plugin Registry  β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  LLM Proxy  β”‚  β”‚  Memory     β”‚  β”‚   API Gateway     β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
            gRPC (bidirectional streaming)
                           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       Golem (Worker)                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Skill Exec β”‚  β”‚  Local Res  β”‚  β”‚   Heartbeat       β”‚    β”‚ 
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Tool Runnerβ”‚  β”‚  Task Queue β”‚  β”‚   State Sync      β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Directory Structure

echoryn/
β”œβ”€β”€ cmd/                    # Executable entry points
β”‚   β”œβ”€β”€ hivemind/          # Main server (Hivemind)
β”‚   β”œβ”€β”€ golem/             # Worker node (Golem)
β”‚   └── echoctl/           # Command-line management tool
β”œβ”€β”€ internal/              # Internal packages
β”‚   β”œβ”€β”€ hivemind/          # Hivemind implementation
β”‚   β”œβ”€β”€ golem/             # Golem implementation
β”‚   └── echoctl/           # CLI implementation
β”œβ”€β”€ pkg/                   # Public library packages
β”‚   β”œβ”€β”€ app/               # Application framework
β”‚   β”œβ”€β”€ cli/               # CLI utilities
β”‚   β”œβ”€β”€ http/              # HTTP utilities
β”‚   β”œβ”€β”€ logger/            # Logging system
β”‚   └── utils/             # Utility functions
β”œβ”€β”€ idl/                   # Interface definition language
β”‚   └── golem/             # Golem gRPC protocol definitions
β”œβ”€β”€ conf/                  # Configuration files
β”œβ”€β”€ docs/                  # Documentation
β”œβ”€β”€ scripts/               # Build scripts
└── golem-worker/          # Golem workspace directory

πŸš€ Quick Start

Prerequisites

  • Go 1.25.0 or higher
  • Git for version control
  • Make for build automation
  • SQLite (optional, for local storage)

Installation

# Clone the repository
git clone https://github.com/kiosk404/echoryn.git
cd echoryn

# Install dependencies and build
make all

This will:

  1. Run go mod tidy to manage dependencies
  2. Format the code
  3. Run lint checks
  4. Build all binaries

Running Echoryn

echoryn

1. Start Hivemind Server
# Using make (development)
make run.hivemind

# Or directly with configuration
./output/platforms/linux/amd64/hivemind --config conf/hivemind-server.json
2. Start Golem Worker
# In a separate terminal
make run.golem

# Or directly with configuration
./output/platforms/linux/amd64/golem --config conf/golem-worker.json
3. Use Echoctl for Management
# List available tokens
./output/platforms/linux/amd64/echoctl token list

# Create a new token
./output/platforms/linux/amd64/echoctl token create --name "admin"

# Get system information
./output/platforms/linux/amd64/echoctl info

πŸ“¦ Build Options

Echoryn uses a comprehensive Makefile for build automation:

# Build all binaries
make build

# Run Hivemind
make run

# Build specific binaries
make build BINS="hivemind echoctl"

# Generate Protobuf code
make proto

# Clean build output
make clean

βš™οΈ Configuration

Hivemind Configuration (conf/hivemind-server.json)

{
  "grpc": {
    "bind-address": "0.0.0.0",
    "bind-port": 11788,
    "max-msg-size": 4194304
  },
  "serving": {
    "mode": "debug",
    "healthz": true,
    "bind-address": "0.0.0.0",
    "bind-port": 11789
  },
  "models": {
    "mode": "merge",
    "default-provider": "deepseek",
    "default-model": "deepseek-chat",
    "providers": {
      "deepseek": {
        "base-url": "https://api.deepseek.com/v1",
        "api-key": "${DEEPSEEK_API_KEY}",
        "models": [...]
      }
    }
  },
  "plugins": {
    "enabled": true,
    "slots": {
      "memory": "memory-core"
    },
    "entries": {...}
  }
}

Golem Configuration (conf/golem-worker.json)

{
  "hivemind": {
    "address": "localhost:11788",
    "token": "${GOLEM_TOKEN}",
    "heartbeat-interval": "30s"
  },
  "skills": {
    "enabled": true,
    "workspace-dir": ".echoryn/golem"
  }
}

Environment Variables

# LLM API Keys
export DEEPSEEK_API_KEY="your-api-key"
export OPENAI_API_KEY="your-api-key"
export ANTHROPIC_API_KEY="your-api-key"

# Golem Configuration
export GOLEM_TOKEN="your-golem-token"

# Logging
export LOG_LEVEL="info"

πŸ”Œ Plugin System

Echoryn features a powerful plugin system inspired by Kubernetes scheduler framework:

Plugin Types

  • Tools: Extend agent capabilities with new functions
  • Hooks: Intercept and modify system behavior at key points
  • Services: Long-running background services
  • CLI Commands: Add new commands to echoctl
  • Prompt Sections: Extend system prompts with dynamic content
  • Runtime APIs: Provide APIs for agent runtime

Creating a Plugin

  1. Implement the Plugin Interface:

    package myplugin
    
    import (
        "context"
        "github.com/kiosk404/echoryn/internal/hivemind/service/plugin"
    )
    
    type MyPlugin struct{}
    
    func (p *MyPlugin) Name() string { return "my-plugin" }
    func (p *MyPlugin) Init(ctx context.Context) error { return nil }
    func (p *MyPlugin) Start(ctx context.Context) error { return nil }
    func (p *MyPlugin) Stop(ctx context.Context) error { return nil }
    
  2. Register Your Plugin:

    func init() {
        plugin.Register(&MyPlugin{})
    }
    
  3. Configure in Hivemind:

    {
      "plugins": {
        "enabled": true,
        "entries": {
          "my-plugin": {
            "config": {
              "enabled": true,
              "my-setting": "value"
            }
          }
        }
      }
    }
    

See the Plugin System Specification for detailed information.

πŸ› οΈ Development

Setting Up Development Environment

# Clone the repository
git clone https://github.com/kiosk404/echoryn.git
cd echoryn

# Install Go dependencies
go mod download

# Install development tools
make tools.install

# Build and run tests
make all

Project Structure

  • cmd/: Main application entry points
  • internal/: Private application code
  • pkg/: Public libraries
  • idl/: Protocol definitions (gRPC)
  • conf/: Configuration examples
  • docs/: Documentation
  • scripts/: Build and development scripts

Code Style

  • Use gofmt, goimports, and golines for formatting
  • Follow standard Go conventions
  • Write comprehensive tests
  • Document public APIs

Testing

# Run all tests
make test

# Run tests with coverage
make cover

# Run specific test
go test ./internal/hivemind/...

πŸ“š Documentation

Core Specifications

Module Specifications (in .docs/ directory)

  • ECHORYN_HIVEMIND_AGENTS.md - Agents runtime engine
  • ECHORYN_HIVEMIND_LLM.md - LLM multi-model management
  • ECHORYN_HIVEMIND_MEMORY.md - Memory system
  • ECHORYN_HIVEMIND_PLUGIN.md - Plugin framework
  • ECHORYN_HIVEMIND_MCP.md - MCP tool calling

Code Documentation

  • Comprehensive API documentation in code comments
  • GoDoc generated documentation (coming soon)

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Report Issues: Use the GitHub issue tracker to report bugs or request features
  2. Submit Pull Requests: Fork the repository and submit PRs with improvements
  3. Improve Documentation: Help enhance documentation and examples
  4. Share Ideas: Discuss potential improvements in issues

Development Workflow

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Openclaw: Inspiration and architectural patterns
  • CloudWeGo Eino: Advanced LLM framework
  • Kubernetes: Plugin system design inspiration
  • Model Context Protocol (MCP): Standardized tool integration

Made with ❀️ by the Echoryn contributors

Bringing AI virtual characters into our world, one container at a time

Directories ΒΆ

Path Synopsis
cmd
echoctl command
golem command
hivemind command
internal
hivemind/service/agents/domain/service/runtime/subagent
Package subagent provides a self-contained module for sub-agent lifecycle orchestration.
Package subagent provides a self-contained module for sub-agent lifecycle orchestration.
hivemind/service/agents/domain/service/runtime/toolloop
Package toolloop implements tool call loop detection aligned with OpenClaw's tool-loop-detection.ts.
Package toolloop implements tool call loop detection aligned with OpenClaw's tool-loop-detection.ts.
hivemind/service/gateway
Package gateway implements the IM platform gateway layer for Echoryn.
Package gateway implements the IM platform gateway layer for Echoryn.
hivemind/service/golem
Package golem provides a unified Golem cluster management subsystem.
Package golem provides a unified Golem cluster management subsystem.
hivemind/service/llm/provider/thinking
Package thinking provides a Strategy pattern for mapping Echoryn's unified ThinkingLevel to provider-specific eino model configurations.
Package thinking provides a Strategy pattern for mapping Echoryn's unified ThinkingLevel to provider-specific eino model configurations.
hivemind/service/messagebus
Package messagebus provides the message routing layer for SubAgent inter-communication.
Package messagebus provides the message routing layer for SubAgent inter-communication.
hivemind/service/plugin/builtin
Package builtin registers all in-tree (built-in) plugins.
Package builtin registers all in-tree (built-in) plugins.
hivemind/service/plugin/builtin/diagnostics
Package diagnostics implements the "diagnostics" built-in plugin.
Package diagnostics implements the "diagnostics" built-in plugin.
hivemind/service/plugin/builtin/diagnostics/trace
Package trace provides LLM-aware distributed tracing for Echoryn.
Package trace provides LLM-aware distributed tracing for Echoryn.
hivemind/service/plugin/builtin/golem-cluster
Package golem_cluster provides the golem-cluster plugin for Hivemind.
Package golem_cluster provides the golem-cluster plugin for Hivemind.
hivemind/service/plugin/builtin/llmtask
Package llmtask implements the "llm-task" built-in plugin.
Package llmtask implements the "llm-task" built-in plugin.
hivemind/service/plugin/builtin/llmtask/entity
Package entity defines configuration and types for the llm-task plugin.
Package entity defines configuration and types for the llm-task plugin.
hivemind/service/plugin/builtin/skills
Package skills provides the skills built-in plugin for Hivemind.
Package skills provides the skills built-in plugin for Hivemind.
hivemind/service/plugin/builtin/web-search/gemini-web-search
Package gemini_websearch implements the "web-search" built-in plugin.
Package gemini_websearch implements the "web-search" built-in plugin.
hivemind/service/subagent/executor
Package executor provides the execution routing layer for SubAgent tasks.
Package executor provides the execution routing layer for SubAgent tasks.
hivemind/service/subagent/observer
Package observer provides execution observability for SubAgent tasks.
Package observer provides execution observability for SubAgent tasks.
hivemind/service/team
Package team provides the team collaboration module for multi-agent coordination.
Package team provides the team collaboration module for multi-agent coordination.
pkg
pkg/protocol
Package protocol provides the Go domain types used by the scheduler and other internal services to represent Golem nodes, tasks, and their lifecycle These types mirror the protobuf definitions in pkg/proto/golem/ but are pure Go structs - free of protobuf dependencies - so internal packages can use them without pulling in the generated code.
Package protocol provides the Go domain types used by the scheduler and other internal services to represent Golem nodes, tasks, and their lifecycle These types mirror the protobuf definitions in pkg/proto/golem/ but are pure Go structs - free of protobuf dependencies - so internal packages can use them without pulling in the generated code.
pkg
app
Package app defines an application framework used to create application.
Package app defines an application framework used to create application.
cli/tui
Package tui provides the interactive terminal user interface for the Echoryn chat command.
Package tui provides the interactive terminal user interface for the Echoryn chat command.
cli/tui/bubbletea
Package bubbletea provides a BubbleTea-based TUI for Echoryn.
Package bubbletea provides a BubbleTea-based TUI for Echoryn.
cli/tui/bubbletea/client
Package client provides client interfaces for the BubbleTea TUI.
Package client provides client interfaces for the BubbleTea TUI.
cli/tui/bubbletea/components
Package markdown provides Markdown rendering for terminal output.
Package markdown provides Markdown rendering for terminal output.
cli/tui/bubbletea/components/completion
Package completion provides auto-completion for commands and suggestions.
Package completion provides auto-completion for commands and suggestions.
cli/tui/bubbletea/components/list
Package list provides virtualized list rendering for large datasets.
Package list provides virtualized list rendering for large datasets.
cli/tui/bubbletea/components/markdown
Package markdown provides markdown rendering for terminal output.
Package markdown provides markdown rendering for terminal output.
cli/tui/bubbletea/components/spinner
Package spinner provides a loading spinner component.
Package spinner provides a loading spinner component.
cli/tui/bubbletea/components/textbuffer
Package textbuffer provides a multi-line text editor with cursor movement, history navigation, and auto-completion support.
Package textbuffer provides a multi-line text editor with cursor movement, history navigation, and auto-completion support.
cli/tui/bubbletea/theme
Package theme provides semantic theming for the TUI.
Package theme provides semantic theming for the TUI.
cli/tui/command
Package command provides slash command implementations for the TUI.
Package command provides slash command implementations for the TUI.
cli/tui/input
Package input provides the user input subsystem for the TUI.
Package input provides the user input subsystem for the TUI.
cli/tui/render
Package render provides output and rendering components for the TUI.
Package render provides output and rendering components for the TUI.
cli/tui/terminal
Package terminal provides low-level terminal state management.
Package terminal provides low-level terminal state management.
paths
Package paths provides centralized path resolution for the Echoryn runtime.
Package paths provides centralized path resolution for the Echoryn runtime.
skills/middleware
Package middleware provides the Skills middleware for integrating the skills system into Eino-based agents.
Package middleware provides the Skills middleware for integrating the skills system into Eino-based agents.
utils/workqueue
Package workqueue provides a rate-limited work queue modeled after k8s.io/client-go/util/workqueue.
Package workqueue provides a rate-limited work queue modeled after k8s.io/client-go/util/workqueue.

Jump to

Keyboard shortcuts

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