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
--- ## What is klaw? **klaw** is enterprise AI agent orchestration — like kubectl, but for AI agents. ```bash # 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 ... ``` ### Or control everything from Slack ``` 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 ``` --- ## The Problem You're running AI agents in production: - **Lead Scorer** — analyzes CRM leads every hour - **Competitor Watch** — monitors competitor websites daily - **Ticket Handler** — auto-responds to support tickets - **Report Generator** — creates weekly analytics reports 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. --- ## Quick Start ### 1. Install ```bash curl -fsSL https://klaw.sh/install.sh | sh ``` ### 2. Configure ```bash # 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) ``` ### 3. Run ```bash # Interactive chat klaw chat # Or start the full platform (Slack + scheduler + agents) export SLACK_BOT_TOKEN=xoxb-... export SLACK_APP_TOKEN=xapp-... klaw start ``` --- ## Real-World Examples ### Sales: Lead Scoring ```bash # 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 ``` ### Research: Competitor Intelligence ```bash 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" ``` ### Support: Ticket Automation ```bash 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 ``` ### Analytics: Automated Reports ```bash 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" ``` --- ## Slack Control 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?" ``` --- ## Architecture ``` ┌────────────────────────────────────────────────────────────────────────┐ │ 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) │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ └────────────────────────────────────────────────────────────────────────┘ ``` ### The Kubernetes Parallel | 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` | ### Deployment Modes **Single Node** — Development & small teams ```bash klaw chat # Interactive klaw start # Full platform ``` **Distributed** — Production & enterprise ```bash # 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 ``` --- ## CLI Reference ```bash # 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
klaw — kubectl for AI Agents
Built by each::labs