harnessclaw-engine  by harnessclaw

Go LLM engine for AI assistants

Created 1 month ago
262 stars

Top 96.9% on SourcePulse

GitHubView on GitHub
Project Summary

This Go-based engine provides a robust framework for building LLM-powered programming assistants. It targets developers and power users seeking a flexible, extensible platform for integrating advanced AI capabilities like multi-turn dialogues, tool execution, and permission management into their applications, primarily via WebSocket.

How It Works

The core of HarnessClaw is its 5-phase query loop: Preprocessing (including LLM-based context auto-compaction), LLM Streaming Call, Error Recovery with exponential backoff, Tool Execution (supporting parallel and serial operations), and a Continuation Check. This architecture is designed for efficiency and resilience, handling complex interactions and potential failures gracefully. It supports multiple input channels (WebSocket, HTTP, Feishu) and features a pluggable provider system for various LLMs, along with a comprehensive tool system and a granular 6-step permission pipeline.

Quick Start & Requirements

  • Primary install/run: Use make build to compile, then run the executable (e.g., ./dist/harnessclaw-engine -config ./configs/config.yaml). Alternatively, make run can be used.
  • Prerequisites: Go 1.26+ is recommended for building. ripgrep is a runtime dependency for the Grep tool. golangci-lint is optional for code linting.
  • Links: WebSocket Protocol Specification v1.4 is detailed in docs/protocols/websocket.md.

Highlighted Details

  • 5-Phase Query Loop: Automates complex LLM interaction flows including context compaction, streaming, error recovery, and tool execution.
  • WebSocket Protocol v1.4: Features explicit session management, bidirectional tool calling, and a permission request/response stream.
  • Built-in Tools: Includes 7 essential tools: Bash, FileRead, FileEdit, FileWrite, Grep, Glob, and WebFetch.
  • Skill System: Allows loading and extending functionality via SKILL.md files with YAML frontmatter.
  • Multi-Provider Support: Integrates with Anthropic, OpenAI, Bedrock, and Vertex models through a Bifrost adapter.
  • Context Compaction: Employs LLM-based summarization and a circuit breaker pattern to manage token usage.

Maintenance & Community

Community support is available via GitHub Discussions and a dedicated Discord server. Bug reports should be filed under GitHub Issues.

Licensing & Compatibility

The project is licensed under the Apache-2.0 license, which permits commercial use and integration into closed-source projects.

Limitations & Caveats

Integration tests require access to real LLM APIs. While Go 1.26+ is recommended, the project structure and feature set suggest a mature and stable offering.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
8
Star History
273 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.