kubectl for AI Agents — manage, schedule, and scale your AI workforce with a single binary that deploys in seconds.
klaw brings Kubernetes-style operational patterns to AI agent management. Just as kubectl gave developers a unified interface to interact with Kubernetes workloads, klaw gives teams a familiar command-line interface for deploying, monitoring, scheduling, and scaling AI agents across their organization — all from a single self-contained Go binary.
At its core, klaw introduces namespaces for agent isolation, allowing sales agents, support agents, and research agents to run with scoped permissions and separate secret stores, preventing cross-contamination between teams. Agents are defined with their own model choice, skill sets, and tool access, then managed with the same get, describe, logs, create, and delete commands engineers already know from Kubernetes.
Beyond the CLI, klaw integrates directly with Slack as a control plane — teams can trigger agent runs, check status, view logs, and ask agents questions directly from Slack channels without ever touching a terminal. The built-in cron scheduler handles recurring agent tasks, eliminating the need for external job schedulers or Lambda functions.
For larger deployments, klaw supports distributed mode with a controller/node architecture. A central controller node receives and dispatches tasks while worker nodes handle execution, enabling horizontal scaling of AI agent workloads across multiple machines using gRPC for communication.
get, describe, logs, create, and delete commands for managing AI agentsklaw cron create) for recurring agent tasks without external dependenciesArchitecture
klaw follows a layered architecture that mirrors Kubernetes conceptually: a control plane (the orchestrator package) sits above a runtime layer (agent, session, memory), which in turn calls a provider abstraction (provider.Provider interface) and dispatches to a tool registry. Namespaces and clusters are pure data abstractions stored as JSON on disk, scoping agent bindings and channel configurations. The distributed mode adds a gRPC-based controller/node layer where a central controller accepts tasks and dispatches them to worker nodes — the same agent runtime runs on workers, keeping the execution model uniform whether running single-node or distributed. This separation of routing, execution, and I/O means channels (Slack, CLI, TUI) are interchangeable inputs, and providers are swappable without changing agent logic.
Tech Stack
klaw is written entirely in Go 1.24 and compiles to a single static binary. The CLI layer uses Cobra for command routing. The interactive terminal UI leverages the Charmbracelet stack (Bubbletea, Bubbles, Lipgloss) for styled streaming output. LLM integration uses the official Anthropic SDK alongside an OpenAI-compatible client that covers OpenRouter, Ollama, LM Studio, vLLM, and Together AI. Distributed communication uses gRPC over protobuf. Slack integration is via slack-go. Configuration is TOML-based stored at ~/.klaw/config.toml. There is no database dependency — agent definitions, namespaces, and installed skills are persisted as JSON files in the klaw config directory.
Code Quality
klaw maintains a solid test suite covering the agent loop, orchestrator routing logic, tool registry, provider resilience, context management, and session persistence. Tests use Go’s native testing package with table-driven patterns and stub implementations rather than heavy mocking frameworks. Error handling throughout the codebase uses typed errors (AgentError with structured codes like ErrMaxIterations, ErrProvider, ErrToolExec) that implement errors.Is and errors.Unwrap for proper Go error chain compatibility. The codebase does not have CI workflows configured, and the linter relies on golangci-lint invoked manually via Makefile. Code comments are present at the package and type level, with inline comments marking TODO items and design decisions.
What Makes It Unique
klaw’s most distinctive design decision is treating AI agents as first-class Kubernetes-style workloads: namespaces with scoped secrets, a routing orchestrator that supports @agent, @all, keyword rules, and AI-based routing in a single configurable mode, and a Slack channel that doubles as a full control plane rather than just a notification sink. The parallel tool execution in the agent loop — where multiple tool calls from a single LLM response run concurrently via goroutines — reduces latency for agents that need to fan out across multiple data sources. The installable skill system lets agents compose capabilities declaratively, and the provider resilience layer adds retry-with-exponential-backoff and fallback-to-alternative-provider behavior transparently, making agent runs more robust against transient API failures.
klaw is released under a modified Apache License 2.0 with an additional restriction: you cannot use the klaw source code to operate a multi-tenant managed service where AI agent orchestration is the primary value proposition, without explicit written authorization from each::labs. Internal organizational use, building your own agents and applications, consulting services, and creating plugins or integrations are all explicitly permitted without additional authorization. This means most self-hosting scenarios — running klaw for your own team or company — fall comfortably within the free license, while building a competing SaaS product on top of klaw’s source would require a commercial agreement.
Running klaw yourself is operationally straightforward for small to medium deployments. In single-node mode, the entire platform — Slack bot, scheduler, and agent runtime — runs as a single klaw start process with no external database, message queue, or orchestration layer required; agent state and configuration are stored as JSON files in ~/.klaw. For distributed mode, you manage a controller process and one or more worker nodes that communicate over gRPC, which introduces network configuration and service availability concerns that you own entirely. There is no built-in high availability for the controller, no managed backups of agent history or session data, and upgrades are manual (klaw upgrade via the install script). Teams running hundreds of agents in production will need to invest in infrastructure management, process supervision, and log aggregation that a managed platform would otherwise provide.
Compared to a hosted AI agent platform, self-hosting klaw trades operational simplicity for full control and no per-seat or per-execution pricing. You gain complete data sovereignty — agent conversations, tool outputs, and API keys never leave your infrastructure. What you give up is managed uptime, automatic scaling, a web dashboard, built-in audit logging, role-based access control beyond namespace scoping, and professional support SLAs. The each::labs enterprise license tier adds multi-tenant SaaS deployment rights, white-label licensing, priority support, and custom feature development for organizations that need those guarantees.
Devops · Security
The only web server that obtains and renews TLS certificates automatically, with HTTP/1-2-3 support and zero dependency on external runtimes.
Devops · Automation · Security
A cloud-native reverse proxy and load balancer that auto-configures itself from Docker, Kubernetes, and other orchestrators — zero manual routing required.
Devops · Developer Tools · Project Management
Self-hosted DevOps in a single Go binary — Git hosting, GitHub Actions-compatible CI/CD, and 30+ package registries without any SaaS dependency.