RakitKode

module
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT

README

rakit

rakit (Indonesian: "to assemble") — a Go agent engine for coding tasks, and the rakit CLI that drives it. One brain, many surfaces: embed the engine as a Go library, or use the CLI in your terminal like any other coding agent.

The engine is extracted from forge-ade's desktop agent: streaming LLM turns with multi-step tool calling, parallel tool scheduling, permission/approval pipelines, MCP (stdio + remote), the Agent Skills standard, plugins, memory, background tasks, and subagents.

Install

go install github.com/Haslab-dev/RakitKode/cmd/rakit@latest

CLI

# one-shot, streams to stdout
rakit run "fix the failing test in pkg/x"

# pipe a prompt, emit machine-readable events
git diff | rakit run --json "review this diff"

# interactive session
rakit

# resume the most recent session
rakit run -c "what did we change?"

# auto-approve tool calls (trusted/sandboxed use only)
rakit run --yolo "bump all deps and run tests"

Providers come from $RAKIT_HOME (default ~/.rakit): providers_config.json (same format as forge-ade) or standard env keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, …). Coming from forge-ade? rakit import copies provider profiles, MCP servers, and skills from ~/.forge-ade.

Library

package main

import (
	"context"
	"fmt"

	"github.com/Haslab-dev/RakitKode/engine"
	"github.com/Haslab-dev/RakitKode/events"
)

func main() {
	e, err := engine.New(engine.Options{Workspace: "."})
	if err != nil {
		panic(err)
	}
	e.Bus().Subscribe(events.AgentToolStart, func(ev events.Event) {
		fmt.Println("tool:", ev.Data["name"])
	})
	out, err := e.Run(context.Background(), "list the TODOs in this repo")
	fmt.Println(out, err)
}

The engine package is a convenience facade; every layer is public — agent.Manager, harness, tools.Registry, llm.LLMClient, mcp.Manager, skills, plugins — so hosts (desktop apps, daemons, bots) can compose exactly what they need.

Layout

Package Role
engine facade: one constructor, Run/RunIn one-shot turns
agent session lifecycle, turn loop, approvals, subagents
harness provider-agnostic turn runtime, permissions, scheduling
llm OpenAI-compatible multi-provider client with streaming
tools canonical tool set + registry (read/write/edit/bash/search/…)
mcp MCP client manager (stdio + HTTP), tool bridging
skills SKILL.md discovery across workspace/global/plugin scopes
store per-project storage root ($RAKIT_HOME, default ~/.rakit)
events in-process pub/sub bus every component emits through

Status

v0.1 — API may still shift before v1. Headless + interactive modes shipped; rich TUI in progress.

License

MIT — see LICENSE.

Directories

Path Synopsis
Package agentclirc reads the on-disk configuration of external agent CLIs (pi, omp, opencode, codex, claude, antigravity, gemini) so ForgeADE can surface and manage their providers, models, MCP servers, and skills.
Package agentclirc reads the on-disk configuration of external agent CLIs (pi, omp, opencode, codex, claude, antigravity, gemini) so ForgeADE can surface and manage their providers, models, MCP servers, and skills.
Package agentconfig implements the canonical agent configuration standard: one source of truth for Providers, Models and MCP Servers, plus adapters that generate each supported coding agent's native configuration (OpenCode, Pi, Oh My Pi, Claude Code, Codex) without clobbering settings the adapters do not manage.
Package agentconfig implements the canonical agent configuration standard: one source of truth for Providers, Models and MCP Servers, plus adapters that generate each supported coding agent's native configuration (OpenCode, Pi, Oh My Pi, Claude Code, Codex) without clobbering settings the adapters do not manage.
cmd
rakit command
Command rakit is the standalone CLI for the rakit agent engine — a coding agent for the terminal, usable headlessly (rakit run) or interactively (rakit).
Command rakit is the standalone CLI for the rakit agent engine — a coding agent for the terminal, usable headlessly (rakit run) or interactively (rakit).
rakit/tui
Package tui implements the interactive terminal UI for the rakit engine: a streaming transcript viewport keyed by turn, a multi-line input, a slash command menu, an interactive model picker, an inline tool-approval prompt, and structured ask rendering.
Package tui implements the interactive terminal UI for the rakit engine: a streaming transcript viewport keyed by turn, a multi-line input, a slash command menu, an interactive model picker, an inline tool-approval prompt, and structured ask rendering.
Package conffmt formats configuration file content: pretty JSON, compact JSONL, and a comment/order-preserving TOML tidy.
Package conffmt formats configuration file content: pretty JSON, compact JSONL, and a comment/order-preserving TOML tidy.
Package cordis is a Go port of the Cordis plugin runtime model: plugins as mountable units with fibers (state machines), effect-scoped cleanup, named services resolved by injection, typed events, declarative config from cordis.yml, and hot reload by unload-then-load.
Package cordis is a Go port of the Cordis plugin runtime model: plugins as mountable units with fibers (state machines), effect-scoped cleanup, named services resolved by injection, typed events, declarative config from cordis.yml, and hot reload by unload-then-load.
Code generated by scripts/train_small_model.py; DO NOT EDIT.
Code generated by scripts/train_small_model.py; DO NOT EDIT.
Package engine is the high-level entrypoint for embedding the rakit agent: it wires the LLM client, tool registry, skills, plugins, MCP, and the agent manager behind one constructor.
Package engine is the high-level entrypoint for embedding the rakit agent: it wires the LLM client, tool registry, skills, plugins, MCP, and the agent manager behind one constructor.
Package events defines the engine's event bus and the wire contract for agent events (CONTRACT.md, Tier 1): event names and payload keys are part of the public interface.
Package events defines the engine's event bus and the wire contract for agent events (CONTRACT.md, Tier 1): event names and payload keys are part of the public interface.
Package harness implements the ForgeADE agent harness in Go: an immutable turn state machine, message history, tool registry/scheduler/executor with permission gating, MCP, skills, subagents, and plugins.
Package harness implements the ForgeADE agent harness in Go: an immutable turn state machine, message history, tool registry/scheduler/executor with permission gating, MCP, skills, subagents, and plugins.
Package ignore provides a shared list of dependency, build-output and tooling directories that are always skipped when scanning, searching or watching a workspace.
Package ignore provides a shared list of dependency, build-output and tooling directories that are always skipped when scanning, searching or watching a workspace.
Package index implements ForgeADE Workspace Index (FWI): a lightweight indexing engine for editor features (go-to-definition, completion, outline) without depending on LSP or AI.
Package index implements ForgeADE Workspace Index (FWI): a lightweight indexing engine for editor features (go-to-definition, completion, outline) without depending on LSP or AI.
Package sandbox provisions a per-project scratch workspace under ~/.forge/sandbox/<slug> so the built-in agent has somewhere to edit temp files, work through thinking, prototype code and write logs without touching the user's workspace.
Package sandbox provisions a per-project scratch workspace under ~/.forge/sandbox/<slug> so the built-in agent has somewhere to edit temp files, work through thinking, prototype code and write logs without touching the user's workspace.
Package store resolves per-project storage under a single home root so no helper state leaks into user workspaces.
Package store resolves per-project storage under a single home root so no helper state leaks into user workspaces.

Jump to

Keyboard shortcuts

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