Help us shape the future of Go! Take the 2026 Go Developer Survey

agent-task-executor

command module
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: BSD-2-Clause Imports: 26 Imported by: 0

README

Agent Task Executor

Kafka event consumer + Kubernetes Job spawner for the bborbe/agent task system. It consumes task.CreateCommand events, matches each task's assignee to a registered agent Config CR (agent.benjamin-borbe.de/v1), and spawns one Kubernetes Job per task/phase using that agent's image, env, resources and secrets — propagating BRANCH / TOPIC_PREFIX to the child Job.

Image tags: an agent Config.spec.image that already carries a tag (a semver pin, e.g. …/agent-claude:v0.1.1) is used as-is; an untagged image gets the running branch appended (…/agent-backtest → …/agent-backtest:dev). Deployed via the agent Helm chart; published image docker.io/bborbe/agent-task-executor.

Cluster routing

A task can name the cluster that runs it with the optional cluster: frontmatter field. The canonical values are nukedev, nukeprod and sun.

  • CLUSTER: the cluster this executor runs in. A task whose cluster names a different cluster is skipped, logged as skip task <id>: foreign cluster <name>, and counted as agent_executor_task_events_total{result="skipped_foreign_cluster"}. A task without cluster: runs as before.
  • CONSUMER_GROUP: the Kafka consumer group (default agent-task-executor). Each cluster must use its own group, e.g. agent-task-executor-sun, so that every cluster receives every task event. Keep an existing cluster on its current group, because a new group starts from the oldest retained offset and re-reads the topic.

Reconcile loop configuration

The reconcile loop re-derives running tasks from the vault (via git-rest) and live Jobs, so a task deferred behind maxConcurrentJobs whose in-memory deferral was lost across an executor restart resumes without a Kafka event or vault edit. It is configured by:

Env var Default Meaning
GITREST_URL http://vault-obsidian-openclaw:9090 git-rest HTTP API base URL the reconcile loop reads vault task files through.
GITREST_GATEWAY_SECRET empty (auth disabled) NAME of the K8s Secret carrying the git-rest gateway secret (data key gateway-secret) — never the secret value. The executor reads the value from the Secret at startup and uses it only in memory. The executor's ServiceAccount must be able to get this Secret (chart-side Role grant).
TASK_GLOB empty (required) git-rest single-level glob selecting the vault task files the reconcile loop evaluates. Required: the executor refuses to start when it is empty, because git-rest treats an empty glob as match-everything over the whole vault.

Dev: https://dev.quant.benjamin-borbe.de/admin/agent-task-executor/setloglevel/3 https://dev.quant.benjamin-borbe.de/admin/agent-task-executor/agents https://dev.quant.benjamin-borbe.de/admin/agent-task-executor/healthcheck-trigger

Prod: https://prod.quant.benjamin-borbe.de/admin/agent-task-executor/setloglevel/3 https://prod.quant.benjamin-borbe.de/admin/agent-task-executor/agents https://prod.quant.benjamin-borbe.de/admin/agent-task-executor/healthcheck-trigger

License

This project is licensed under the BSD-style license. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
k8s
apis/agent.benjamin-borbe.de/v1
Package v1 is the v1 version of the Config API.
Package v1 is the v1 version of the Config API.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/agent.benjamin-borbe.de/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/agent.benjamin-borbe.de/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
Code generated by counterfeiter.
Code generated by counterfeiter.
pkg
probe/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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