AI service lifecycle, allowance management, CLI task client
This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Snider 158423d7a1
Some checks failed
Security Scan / security (push) Successful in 10s
Test / test (push) Failing after 32s
chore: remove boilerplate Taskfile
All tasks (test, build, lint, fmt, vet, cov) are handled natively
by `core go` commands. Taskfile was redundant wrapper.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 14:45:49 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:02 +00:00
cmd refactor: swap pkg/framework imports to pkg/core 2026-03-06 14:10:58 +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
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
allowance.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +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: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
allowance_redis_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
allowance_service.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
allowance_sqlite.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
allowance_sqlite_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
allowance_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
brain.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
brain_test.go feat: add OpenBrain and EaaS scoring API client methods 2026-03-03 19:32:17 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:02:20 +00:00
client.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
client_test.go feat: add plan/session/phase API client and PlanDispatcher 2026-03-04 13:58:55 +00:00
completion.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +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 refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +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 refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
context_git_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
context_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
coverage_boost_test.go refactor: swap pkg/framework imports to pkg/core 2026-03-06 14:10:58 +00:00
dispatcher.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
dispatcher_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +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 refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
events_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
go.mod refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
go.sum refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
lifecycle_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
logs.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
logs_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
plan_dispatcher.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
plans.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
README.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
registry.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
registry_redis.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
registry_redis_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
registry_sqlite.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
registry_sqlite_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
registry_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
router.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
router_test.go feat(coordination): add agent registry, task router, and dispatcher 2026-02-20 07:16:53 +00:00
score.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
score_test.go feat: add OpenBrain and EaaS scoring API client methods 2026-03-03 19:32:17 +00:00
service.go refactor: swap pkg/framework imports to pkg/core 2026-03-06 14:10:58 +00:00
service_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
sessions.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +00:00
status.go refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +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 refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n 2026-03-06 12:35:42 +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 refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00

Go Reference License: EUPL-1.2 Go Version

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.