Raw capture β€” raw/klaw-sh.md


url: https://github.com/klawsh/klaw.sh date_fetched: 2026-07-05 backfilled: true


kubectl for AI Agents

Enterprise AI agent orchestration. Manage, monitor, and scale your AI workforce.

One binary. Deploys in seconds. Scales to hundreds of agents.

Documentation β€’ What is klaw? β€’ Quick Start β€’ Slack Control β€’ Architecture

klaw is enterprise AI agent orchestration β€” like kubectl, but for AI agents.

# See all your agents
$ klaw get agents
NAME              NAMESPACE    STATUS    MODEL              LAST RUN
lead-scorer       sales        running   claude-sonnet-4    2m ago
competitor-watch  research     idle      gpt-4o             1h ago
ticket-handler    support      running   claude-sonnet-4    30s ago
report-gen        analytics    idle      claude-sonnet-4    6h ago
# Check what an agent is doing
$ klaw describe agent lead-scorer
Name:         lead-scorer
Namespace:    sales
Status:       Running
Model:        claude-sonnet-4-20250514
Skills:       crm, web-search
Tools:        hubspot, clearbit, web_fetch
Last Run:     2 minutes ago
Next Run:     in 58 minutes (cron: 0 * * * *)
# View real-time logs
$ klaw logs lead-scorer --follow
[14:32:01] Fetching new leads from HubSpot...
[14:32:03] Found 12 new leads
[14:32:05] Analyzing lead: john@acme.com
[14:32:08] Score: 85/100 (Enterprise, good fit)
[14:32:09] Updated HubSpot lead score
...
You: @klaw status
klaw: πŸ“Š Agent Status
      β”œβ”€β”€ lead-scorer (sales) β€” running, 2m ago
      β”œβ”€β”€ competitor-watch (research) β€” idle
      β”œβ”€β”€ ticket-handler (support) β€” running, 30s ago
      └── report-gen (analytics) β€” idle
You: @klaw run competitor-watch
klaw: πŸš€ Starting competitor-watch...
      Checking competitor.com/pricing...
      Found 2 pricing changes since yesterday.
      Posted summary to #competitive-intel

You're running AI agents in production:

But managing them is chaos:

Challenge Current State With klaw
Visibility "Is the agent running? What's it doing?" klaw get agents,klaw logs
Isolation Sales agent accessing support secrets Namespaces with scoped permissions
Scheduling Messy cron jobs, Lambda functions klaw cron createβ€” built-in
Scaling Manual server provisioning klaw node joinβ€” auto-dispatch
Debugging grep through CloudWatch klaw logs agent --follow
Deployment Complex setup, many dependencies Single binary, one command

OpenClaw works, but deployment is painful and scaling is worse.

klaw brings Kubernetes-style operations to AI agents. One binary. Deploys in seconds.

l -fsSL https://klaw.sh/install.sh | sh

Pick one provider

export ANTHROPIC_API_KEY=sk-ant-... # Direct Anthropic export OPENROUTER_API_KEY=sk-or-... # OpenRouter (100+ models) export EACHLABS_API_KEY=... # each::labs (300+ models)

Interactive chat

klaw chat

Or start the full platform (Slack + scheduler + agents)

export SLACK_BOT_TOKEN=xoxb-... export SLACK_APP_TOKEN=xapp-... klaw start

Create the agent

klaw create agent lead-scorer \ --namespace sales \ --model claude-sonnet-4-20250514 \ --skills crm,web-search

Schedule hourly runs

klaw cron create score-leads \ --schedule "0 * * * *" \ --agent lead-scorer \ --task "Analyze new leads in HubSpot, score 1-100 based on fit, update Lead Score field"

Check status anytime

klaw get agents -n sales klaw logs lead-scorer

klaw create agent competitor-watch \ --namespace research \ --model gpt-4o \ --skills web-search,web-fetch,slack klaw cron create competitor-daily \ --schedule "0 9 * * *" \ --agent competitor-watch \ --task "Check competitor.com/pricing for changes. Post diff to #competitive-intel"

klaw create agent ticket-handler \ --namespace support \ --model claude-sonnet-4-20250514 \ --skills zendesk,slack

This agent responds to Slack mentions automatically

@klaw check ticket #12345

@klaw draft response for angry customer

klaw create agent report-gen \ --namespace analytics \ --model claude-sonnet-4-20250514 \ --skills sql,slack,charts klaw cron create weekly-report \ --schedule "0 8 * * MON" \ --agent report-gen \ --task "Query last week's metrics, generate summary with charts, post to #team-updates"

klaw turns Slack into your AI command center:

Agent management

@klaw status # List all agents @klaw describe lead-scorer # Agent details @klaw logs ticket-handler # Recent logs

Run tasks

@klaw run lead-scorer # Trigger immediately @klaw ask lead-scorer "score this: john@bigco.com"

Scheduling

@klaw cron list # View scheduled jobs @klaw cron disable daily-report # Pause a job

Quick queries

@klaw "summarize today's support tickets" @klaw "what did competitor-watch find yesterday?"

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ KLAW CONTROL PLANE β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ NAMESPACES (Isolation) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ SALES β”‚ β”‚ RESEARCH β”‚ β”‚ SUPPORT β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ lead-scorer β”‚ β”‚ competitor- β”‚ β”‚ ticket- β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ watch β”‚ β”‚ handler β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ tools: β”‚ β”‚ β”‚ β”‚ tools: β”‚ β”‚ β”‚ β”‚ tools: β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β€’ hubspot β”‚ β”‚ β”‚ β”‚ β€’ web β”‚ β”‚ β”‚ β”‚ β€’ zendesk β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β€’ clearbitβ”‚ β”‚ β”‚ β”‚ β€’ slack β”‚ β”‚ β”‚ β”‚ β€’ slack β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ secrets: β”‚ β”‚ secrets: β”‚ β”‚ secrets: β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ HUBSPOT_KEY β”‚ β”‚ SLACK_TOKEN β”‚ β”‚ ZENDESK_KEY β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ SCHEDULER β”‚ β”‚ CHANNELS β”‚ β”‚ ROUTER β”‚ β”‚ NODES β”‚ β”‚ β”‚ β”‚ (cron) β”‚ β”‚(Slack, CLI) β”‚ β”‚ (300+ LLMs) β”‚ β”‚ (workers) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

| You Want To... | kubectl | klaw | 
|---|---|---|
| List workloads | `kubectl get pods` | `klaw get agents` | 
| Inspect | `kubectl describe pod` | `klaw describe agent` | 
| View logs | `kubectl logs` | `klaw logs` | 
| Deploy | `kubectl apply -f` | `klaw apply -f` | 
| Isolate | Namespaces | Namespaces | 
| Schedule | CronJob | `klaw cron` | 
| Scale out | Add nodes | `klaw node join` | 

**Single Node** β€” Development & small teams

klaw chat # Interactive klaw start # Full platform

**Distributed** β€” Production & enterprise

Controller (central brain)

klaw controller start --port 9090

Worker nodes join the cluster

klaw node join controller.internal:9090 --token $TOKEN

Tasks auto-dispatch to available nodes

klaw dispatch "analyze all Q4 leads" --agent lead-scorer

Core

klaw chat # Interactive terminal chat klaw start # Start platform (Slack + scheduler) klaw dispatch "task" # One-off task execution

Agent Management (kubectl-style)

klaw get agents # List all agents klaw get agents -n sales # List in namespace klaw describe agent # Detailed info klaw create agent # Create new agent klaw delete agent # Remove agent klaw logs # View logs klaw logs -f # Follow logs

Namespaces

klaw get namespaces # List namespaces klaw create namespace # Create namespace klaw config use-context # Switch namespace

Scheduling

klaw cron create # Create scheduled job klaw cron list # List all jobs klaw cron describe # Job details klaw cron enable # Enable job klaw cron disable # Disable job klaw cron delete # Remove job

Cluster (Distributed Mode)

klaw controller start # Start controller klaw node join # Join cluster klaw get nodes # List nodes klaw drain node # Drain node

Configuration

klaw config view # Show config klaw config set # Update config

[provider.anthropic] api_key = "${ANTHROPIC_API_KEY}"

[defaults] model = "claude-sonnet-4-20250514" namespace = "default" [provider.anthropic] api_key = "${ANTHROPIC_API_KEY}" [provider.eachlabs] api_key = "${EACHLABS_API_KEY}" [channel.slack] enabled = true bot_token = "${SLACK_BOT_TOKEN}" app_token = "${SLACK_APP_TOKEN}" [channel.cli] enabled = true [namespace.sales] secrets = ["HUBSPOT_KEY", "CLEARBIT_KEY"] allowed_tools = ["hubspot", "clearbit", "web_search"] [namespace.support] secrets = ["ZENDESK_KEY"] allowed_tools = ["zendesk", "slack"] [scheduler] enabled = true timezone = "America/New_York"

Any OpenAI-compatible API can be used as a provider by setting `base_url` and `model` in config.
This works with Ollama, LM Studio, vLLM, GLM, Minimax, Together AI, and more.

Ollama (local)

[provider.ollama] base_url = "http://localhost:11434/v1" model = "llama3.2"

LM Studio (local)

[provider.lmstudio] base_url = "http://localhost:1234/v1" model = "qwen2.5-coder-32b"

Together AI

[provider.together] api_key = "your-api-key" base_url = "https://api.together.xyz/v1" model = "meta-llama/Llama-3.3-70B-Instruct-Turbo"

Any OpenAI-compatible endpoint

[provider.custom] api_key = "your-api-key" base_url = "https://your-endpoint.com/v1" model = "your-model-name"

Then use it with:

klaw chat -p ollama klaw chat -p lmstudio klaw chat -p together

OpenClaw is powerful but complex β€” Node.js, multiple services, difficult deployment, hard to scale. klaw is a single Go binary with the same agent capabilities but kubectl-style operations. Deploy in seconds, scale by adding nodes.

Those are frameworks for **building** agents. klaw is infrastructure for **operating** them. You could build agents with LangChain and deploy them on klaw.

**Partial.** Namespaces provide *logical* isolation:

- **Scoped secrets**β€” sales can't access support's API keys
- **Tool permissions**β€” agents only get the tools you allow
- **Resource isolation**β€” each namespace is independent

**Important:** Non-containerized agents have **no filesystem sandboxing** β€” they run under your user account and can access any file you can. For true process/filesystem isolation, run agents in Podman containers with `klaw run`.

Yes. Single binary, no external dependencies. Run on your servers, your VPC, air-gapped environments. You control everything.

300+ models via each::labs router, or direct connections to Anthropic, OpenAI, Google, Azure, Ollama, and any OpenAI-compatible endpoint.

| Feature | klaw | OpenClaw | LangChain | AutoGPT | 
|---|---|---|---|---|
| Single Binary | βœ… | ❌ | ❌ | ❌ | 
| kubectl-style CLI | βœ… | ❌ | ❌ | ❌ | 
| Slack Control | βœ… | βœ… | Manual | ❌ | 
| Namespaces | βœ… | ❌ | ❌ | ❌ | 
| Built-in Cron | βœ… | ❌ | ❌ | ❌ | 
| Distributed Mode | βœ… | ❌ | ❌ | ❌ | 
| 300+ Models | βœ… | βœ… | βœ… | ❌ | 
| Easy Deployment | βœ… | ❌ | ❌ | ❌ | 
| Enterprise Ready | βœ… | Partial | Partial | ❌ | 

`curl -fsSL https://klaw.sh/install.sh | sh````
git clone https://github.com/klawsh/klaw.sh.git
cd klaw && make build
sudo mv bin/klaw /usr/local/bin/
klaw version
# klaw v1.0.0 (darwin/arm64)
git clone https://github.com/klawsh/klaw.sh.git
cd klaw
make build && make test
./bin/klaw chat

See CONTRIBUTING.md for guidelines.

klaw is source-available under the each::labs License.

Free for internal business use, personal projects, and consulting. License required for multi-tenant SaaS or white-label distribution.

See LICENSE for details. Enterprise licensing: enterprise@eachlabs.ai

klaw β€” kubectl for AI Agents

Built by each::labs