1.7 KiB
1.7 KiB
go-agentic
AI service lifecycle and task management library for the Lethean agent platform. Provides per-agent token quota enforcement with Memory, SQLite, and Redis backends; an agent registry with heartbeat and reap semantics; a priority-based task router and dispatch loop with exponential backoff and dead-lettering; context building from git history and source files; and a claude CLI subprocess runner for commit and prompt tasks. Integrates with the Core dependency injection framework as a named service.
Module: forge.lthn.ai/core/go-agentic
Licence: EUPL-1.2
Language: Go 1.25
Quick Start
import "forge.lthn.ai/core/go-agentic"
// Allowance enforcement
svc := agentic.NewAllowanceService(agentic.NewSQLiteStore("~/.config/agentic/allowance.db"))
if err := svc.Check(agentID, model); err != nil {
// quota exceeded
}
// Dispatch loop
dispatcher := agentic.NewDispatcher(registry, router, svc, client)
go dispatcher.DispatchLoop(ctx, 60*time.Second)
Documentation
- Architecture — allowance management, agent registry, task router, dispatch loop, context builder
- Development Guide — building, testing, contributing
- Project History — completed phases and known limitations
Build & Test
go test ./...
go test -race ./...
go build ./...
Licence
European Union Public Licence 1.2 — see LICENCE for details.