Gherk Logo
Gherkgo-brain framework

Gherk

Gherk Brain
Closed Beta Phase

Native Enterprise AI Orchestration for Go

Stop importing heavily bloated Python DAGs. Orchestrate your LLMs with a high-performance, 0-dependency native framework built purely for Go determinism.

OpenAI Anthropic Claude Google Gemini Ollama Local

No Python.
No Experimental Bloat.

Langchain and LangGraph force you into heavy dependencies, fragile DAG environments, and massive abstract syntax trees. go-brain flips the paradigm. We provide a single, compiled, 0-dependency standard library framework. Predictable deployments, instant cold-starts, and flawless architectural security bounds.

Technical Implementation

// Define your graph transitions natively without AST parsing
import"github.com/gherk-lib/go-brain/router"

// 1. Add States to your Agent
bot.WithRouter("TriageNode").
    AddState("TriageNode", triageHandlerFunc).
    AddState("CheckoutNode", checkoutHandlerFunc)

// 2. Add Graph Edges rigidly
bot.Router().AddTransition("TriageNode", "start_checkout", "CheckoutNode")

// 3. Execute Loop safely
bot.Run(context.Background())
Memory & Storage

Polymorphic Memory Engine

Swap between the 5 R.A.P.I.D. persistence layers in real-time through the same interface. Migrate conversation state seamlessly from a cheap Sliding Window buffer, right into an autonomous LLM Summary Compressor when context tokens max out.

Additionally, harness the Workspace Ingestion Engine. Point the bot to your monorepo, and Go-Brain natively crawls, cleanses (`.git`, `node_modules`), and streams your heavy codebases directly to memory while enforcing rigid OOM (Out of Memory) bite limits per file.

R

Recent

Sliding Drops

Continuously drops the oldest messages when context token capacity is reached. Ideal for cheap, fast, and casual conversation chains where deep history is irrelevant.

// Go implementation
bot.WithMemory(memory.NewWindowBuffer(4000))
A

Abstract

Auto-Compress

Triggers an autonomous LLM sub-agent the moment limits are hit. It seamlessly compresses thousands of past tokens into a hyper-dense semantic summary before continuing.

// Go implementation
bot.WithMemory(memory.NewSummaryBuffer(llm, 15000))
P

Profile

KV Extract

Extracts strictly typed JSON key-value properties from the ongoing chat. It builds a persistent background profile available perfectly synced across sessions.

// Go implementation
bot.WithMemory(memory.NewKVEntity(db, "user_pref"))
I

Indexed

RAG Local

Embeds massive codebases and document troves locally via Vector Databases. Implements semantic RAG directly inside the agent context securely.

// Go implementation
bot.WithMemory(memory.NewVectorMemory(pgVector, 5))
D

Database

SQL Persist

Dumps raw conversational state seamlessly into PostgreSQL or Redis, allowing absolute conversational resilience and state-resumption across physical server restarts.

// Go implementation
bot.WithMemory(memory.NewSQLPersist(pool, "sess_id"))
Data Extraction

StructGPT:
The Auto-Healer

Stop building huge custom prompts asking the LLM to return JSON. Define your Go Struct natively.

The Go-Brain extractor recursively parses the output. If the LLM hallucinates an invalid character, the extractor spins up a retrospective loop, injecting the `Unmarshal` error back to the LLM and demanding a fix. Give it up to 3 retries and secure absolute data dominance.

System Log
[0.1s] Trying Extraction: Invoice struct...
[1.5s] ERR: json: cannot unmarshal string into Go struct field Total of type float64
[1.6s] Retrying (Attempt 1): Firing Auto-Heal prompt with error context...
[3.2s] SUCCESS: Payload parsed and mapped correctly.
Observability

BrainTraceā„¢ Telemetry

Go-Brain ships with an exclusive Zero-Dependency Graphical Dashboard hosted locally. Access http://localhost:9090 and watch your agents deliberate in real-time. FSM transitions, token consumption loops, and tool-calling flows are graphed visually via a live MermaidJS Engine through pure Server-Sent Events.

TriageRouter
SummarizeMem
StructGPT Extract
STATUS: RESTRICTED ACCESS

Public Testing in v2.0

Go-Brain is currently in closed beta and restricted to Gherk internal development. Package installation capability will be tracked as an issue and unlocked in the upcoming Version 2.

Install Framework

$ go env -w GOPRIVATE="github.com/gherk-lib/*"
$ go get github.com/gherk-lib/go-brain@v1.0.0

AI Assistants Workflow

Developers today use tools like Cursor, Windsurf, or Copilot. By executing the Brain Rules Injector, the framework will automatically bridge all internal SDK contexts directly into your local IDE workspaces `.cursorrules` or `.windsurfrules`. Your AI Assistant will natively understand the framework structure.

$ go run github.com/gherk-lib/go-brain/cmd/brain-rules@latest