AI service lifecycle, allowance management, CLI task client
Find a file
Snider ad0cf5c932 chore: resolve forge deps from registry, remove local replaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 19:19:48 +00:00
docs docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:02:20 +00:00
prompts feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
allowance.go fix(config): change DefaultBaseURL to localhost, annotate reserved fields 2026-02-20 11:37:18 +00:00
allowance_edge_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
allowance_error_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
allowance_redis.go feat(allowance): add Redis backend for AllowanceStore 2026-02-20 11:23:13 +00:00
allowance_redis_test.go feat(allowance): add Redis backend for AllowanceStore 2026-02-20 11:23:13 +00:00
allowance_service.go feat(events): Phase 8 — event hooks for task lifecycle and quota notifications 2026-02-20 12:02:30 +00:00
allowance_sqlite.go feat: Phase 2 — SQLite AllowanceStore backend + config wiring 2026-02-20 07:07:49 +00:00
allowance_sqlite_test.go feat(allowance): add Redis backend for AllowanceStore 2026-02-20 11:23:13 +00:00
allowance_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:02:20 +00:00
client.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
client_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
completion.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
completion_git_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
completion_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
config.go feat(registry): Phase 5 — persistent agent registry (SQLite + Redis + config factory) 2026-02-20 11:40:46 +00:00
config_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
context.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
context_git_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
context_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
coverage_boost_test.go fix(test): mock claude binary in HandleTask tests 2026-02-20 11:28:03 +00:00
dispatcher.go feat(events): Phase 8 — event hooks for task lifecycle and quota notifications 2026-02-20 12:02:30 +00:00
dispatcher_test.go feat(dispatch): Phase 7 — priority-ordered dispatch with retry backoff and dead-letter 2026-02-20 11:47:47 +00:00
embed.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
embed_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
events.go feat(events): add Close() method to ChannelEmitter 2026-02-20 12:46:48 +00:00
events_integration_test.go feat(events): Phase 8 — event hooks for task lifecycle and quota notifications 2026-02-20 12:02:30 +00:00
events_test.go feat(events): Phase 8 — event hooks for task lifecycle and quota notifications 2026-02-20 12:02:30 +00:00
go.mod chore: resolve forge deps from registry, remove local replaces 2026-02-21 19:19:48 +00:00
go.sum chore: resolve forge deps from registry, remove local replaces 2026-02-21 19:19:48 +00:00
lifecycle_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
logs.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
logs_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
README.md docs: add README with quick start and docs links 2026-02-20 15:11:19 +00:00
registry.go feat(coordination): add agent registry, task router, and dispatcher 2026-02-20 07:16:53 +00:00
registry_redis.go feat(registry): Phase 5 — persistent agent registry (SQLite + Redis + config factory) 2026-02-20 11:40:46 +00:00
registry_redis_test.go feat(registry): Phase 5 — persistent agent registry (SQLite + Redis + config factory) 2026-02-20 11:40:46 +00:00
registry_sqlite.go feat(registry): Phase 5 — persistent agent registry (SQLite + Redis + config factory) 2026-02-20 11:40:46 +00:00
registry_sqlite_test.go feat(registry): Phase 5 — persistent agent registry (SQLite + Redis + config factory) 2026-02-20 11:40:46 +00:00
registry_test.go feat(coordination): add agent registry, task router, and dispatcher 2026-02-20 07:16:53 +00:00
router.go feat(coordination): add agent registry, task router, and dispatcher 2026-02-20 07:16:53 +00:00
router_test.go feat(coordination): add agent registry, task router, and dispatcher 2026-02-20 07:16:53 +00:00
service.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
service_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
status.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
status_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
submit.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
submit_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
types.go feat(dispatch): Phase 7 — priority-ordered dispatch with retry backoff and dead-letter 2026-02-20 11:47:47 +00:00

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

Build & Test

go test ./...
go test -race ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.