Kubiya LogoKubiya Developer Docs

How It Works

Understanding the Agent Composer architecture and execution flow

🏗️ How It Works

🔬 Behind the Scenes

Understand how Agent Composer transforms your natural language requests into automated actions. Learn about the key components that make it reliable, secure, and scalable.

🎯 The Big Picture

When you type a task, here's what happens:

graph LR
    subgraph "You"
        U["👤 Type Task"]
    end
    
    subgraph "Agent Composer"
        A["🧠 AI Understanding"]
        P["📋 Planning"]
        E["⚡ Execution"]
        M["📊 Monitoring"]
    end
    
    subgraph "Results"
        R["✅ Task Complete"]
    end
    
    U --> A
    A --> P
    P --> E
    E --> M
    M --> R
    
    style U fill:#e8f5e8
    style A fill:#e3f2fd
    style P fill:#fff3e0
    style E fill:#f3e5f5
    style M fill:#ffebee
    style R fill:#e8f5e8

🧩 Key Components

1. Natural Language Understanding 🧠

The AI agent analyzes your request to understand:

  • What you want to do
  • Which tools are needed
  • What permissions are required
  • How complex the task is

Example: When you say "Deploy my-app to staging", the agent knows to use Kubernetes tools, check for staging environment access, and follow deployment best practices.

2. Execution Planning 📋

Before running anything, the agent creates a plan:

Break Down Steps

Complex tasks are divided into smaller, manageable actions

Check Dependencies

Ensures everything needed is available before starting

Optimize Order

Arranges steps for efficiency and safety

3. Secure Execution 🔒

Tasks run in isolated environments:

🐳 Container Isolation

  • • Each task runs in its own container
  • • No interference between tasks
  • • Clean environment every time
  • • Automatic cleanup after completion

🔐 Credential Protection

  • • Secrets never exposed in logs
  • • Temporary access tokens
  • • Encrypted in transit and at rest
  • • Automatic credential rotation

4. Real-Time Monitoring 📊

Track everything that happens:

Step Progress

See each action as it executes

Command Output

View results and logs in real-time

Error Detection

Immediate alerts if something goes wrong

Performance Metrics

Track execution time and resource usage

🔄 Execution Flow

Here's a typical task execution:

sequenceDiagram
    participant You
    participant Agent
    participant Runner
    participant Tools
    
    You->>Agent: "Deploy my-app to staging"
    Agent->>Agent: Analyze request
    Agent->>Agent: Create execution plan
    
    Agent->>You: Show plan (if in Plan mode)
    You->>Agent: Approve plan
    
    Agent->>Runner: Start container
    Runner->>Tools: Execute kubectl commands
    Tools-->>Runner: Command output
    Runner-->>Agent: Progress updates
    Agent-->>You: Live streaming updates
    
    Runner->>Tools: Run health checks
    Tools-->>Runner: Health status
    Runner-->>Agent: Deployment successful
    Agent-->>You: ✅ Task completed!

🏃 Runners - Where Tasks Execute

Runners are the execution environments for your tasks:

☁️ Kubiya Cloud Runners

Managed infrastructure maintained by Kubiya

  • ✓ Always available
  • ✓ Auto-scaling
  • ✓ No maintenance required
  • ✓ Global distribution

🏢 Self-Hosted Runners

Run in your own infrastructure

  • ✓ Full control
  • ✓ Access private resources
  • ✓ Custom configurations
  • ✓ Compliance requirements

🛡️ Security Model

Agent Composer implements multiple security layers:

Authentication & Authorization

  • Who you are: Verified through Auth0/SSO
  • What you can do: Role-based permissions
  • Where you can run: Runner access controls
  • What you can access: Resource permissions

Execution Security

🔒
Isolated
Each task in its own container
🎫
Temporary
Short-lived access tokens
📝
Audited
Every action logged

📊 Reliability & Performance

High Availability

  • Multiple regions: Tasks can run globally
  • Automatic failover: Switches to healthy runners
  • Queue management: Tasks wait if resources are busy
  • State persistence: Resume interrupted tasks

Performance Optimization

⚡ Fast Startup
Pre-warmed containers for quick execution
🚀 Parallel Execution
Independent steps run simultaneously
💾 Smart Caching
Reuse results from previous runs
📈 Auto-Scaling
Resources adjust to workload

🔧 Integration Architecture

Agent Composer connects to your tools and services:

graph TB
    subgraph "Agent Composer"
        AC["🤖 Agent Core"]
    end
    
    subgraph "Your Infrastructure"
        K8S["☸️ Kubernetes"]
        AWS["☁️ AWS"]
        GIT["📦 GitHub"]
        MON["📊 Monitoring"]
    end
    
    subgraph "Data Sources"
        SEC["🔐 Secrets Manager"]
        KB["📚 Knowledge Base"]
        API["🔌 APIs"]
    end
    
    AC --> K8S
    AC --> AWS
    AC --> GIT
    AC --> MON
    
    AC --> SEC
    AC --> KB
    AC --> API
    
    style AC fill:#e3f2fd
    style K8S fill:#e8f5e8
    style AWS fill:#e8f5e8
    style GIT fill:#e8f5e8
    style MON fill:#e8f5e8
    style SEC fill:#fff3e0
    style KB fill:#fff3e0
    style API fill:#fff3e0

💡 Key Benefits

🎯

Consistent

Same task always produces same results

🔒

Secure

Multi-layer security protects your data

📈

Scalable

Handles tasks from simple to complex

🚀 What Makes It Special

Natural Language → Deterministic Execution

Unlike chat-based AI that can give different responses, Agent Composer:

  • Understands your intent
  • Creates a specific plan
  • Executes the exact same way
  • Provides predictable results

Enterprise-Ready Features

  • Audit trails for compliance
  • Role-based access for security
  • High availability for reliability
  • Integration APIs for extensibility

🏗️ Built for Real Work

Agent Composer combines the ease of natural language with the reliability of traditional automation. It's designed to handle your production workloads with confidence.