← Back to home

Controlling the Platform with AI Agents

Any AI coding agent can control AgenticKode through the built-in CLI tool. This means you can chat with Claude Code, Codex, OpenCode, or any agent that has shell access, and it can manage your entire platform.

How It Works

You chat with your AI agent
    ↓
Agent runs CLI commands via its Bash tool
    ↓
CLI calls the AgenticKode REST API
    ↓
Platform creates runs, monitors agents, approves PRs

No special plugins or MCP setup needed — the agent just runs shell commands.

Quick Setup

1. Set the Platform URL

Inside the platform container (or wherever the CLI is installed):

export AGENTICKODE_URL=http://localhost:8000

2. Verify Connection

agentickode admin health

You should see:

  Status    ok
  Database  connected
  Worker    running
  Queue     connected

3. Start Using It

Talk to your agent naturally:

"Create a task to add JWT authentication to my backend-api project"

The agent will figure out the right CLI commands:

agentickode runs create --project backend-api \
  --title "Add JWT authentication" \
  --description "Implement JWT auth with login/register endpoints, password hashing, middleware, and tests" \
  --mode autonomous

CLI Command Reference

Projects

# List projects
agentickode projects list

# Create a project
agentickode projects create \
  --repo-url https://github.com/org/my-app \
  --provider github \
  --mode autonomous

# Get project details
agentickode projects get my-app

# Enable episodic execution
agentickode projects update my-app \
  --episode-config '{"max_episodes":5,"max_turns_per_episode":30}'

Task Runs

# Create a run
agentickode runs create --project my-app --title "Fix login bug"

# List runs
agentickode runs list --project my-app --status running

# Get run details
agentickode runs get 42

# Follow live logs
agentickode runs logs 42 --follow

# Approve a PR
agentickode runs approve 42

# Cancel a run
agentickode runs cancel 42

Agent Control

# Send a message to redirect the agent
agentickode agent message 42 "Focus on the auth tests first"

# Pause a running agent
agentickode agent pause 42

# Resume
agentickode agent resume 42

# View episode progress
agentickode agent episodes 42

Servers

# List workspace servers
agentickode servers list

# Add a server
agentickode servers add --hostname 10.0.1.50 --ssh-user root

# Run setup (installs agents, creates worker user)
agentickode servers setup 1

# Check status
agentickode servers status 1

Administration

# List configured agents
agentickode admin agents

# View analytics
agentickode admin analytics --period 30d

# Health check
agentickode admin health

Output Formats

# Human-readable table (default)
agentickode runs list
  42      my-app    "Fix login bug"     running

# JSON (for scripting or agent parsing)
agentickode --json runs list
[{"id": 42, "project_id": "my-app", ...}]

# Quiet (IDs only)
agentickode --quiet runs create --project my-app --title "Fix bug"
42

Agent-Specific Setup

Claude Code

Claude Code has a built-in Bash tool — it can run CLI commands directly. Just tell it what you want:

You: "List all running tasks and tell me which ones are taking too long"

Claude: I'll check the running tasks.
        [runs: agentickode --json runs list --status running]

        There are 3 running tasks:
        - #42 "Fix login bug" — running for 15 minutes (normal)
        - #43 "Refactor auth" — running for 2 hours (may be stuck)
        - #44 "Add tests" — running for 5 minutes (normal)

        Run #43 looks like it might be stuck. Want me to check its episodes
        or restart it?

Tip: Add a CLAUDE.md instruction to your project:

## Platform Control
You can manage the AgenticKode platform using the `agentickode` CLI.
Platform URL: http://localhost:8000
Available commands: projects, runs, agent, servers, admin
Use `agentickode --json` for structured output you can parse.

OpenCode

OpenCode also has shell access. Same approach:

You: "Set up my new server at 10.0.1.50 and run the failing tests on backend-api"

OpenCode: [runs: agentickode servers add --hostname 10.0.1.50 --ssh-user root]
          Server #3 added.
          [runs: agentickode servers setup 3]
          Setup complete.
          [runs: agentickode runs create --project backend-api --title "Fix failing tests"]
          Run #45 created. I'll monitor it.

Any Agent with Bash

Any AI agent that can run shell commands can control the platform. The pattern is the same:

  1. Export AGENTICKODE_URL
  2. Use agentickode commands
  3. Use --json flag for structured output the agent can parse

Example Workflows

"Fix all failing tests across projects"

You: "Check which projects have failing tests and fix them"

Agent:
  agentickode --json projects list
  # Gets 5 projects

  # For each project:
  agentickode runs create --project backend-api \
    --title "Run tests and fix failures" \
    --mode autonomous

  agentickode runs create --project frontend-app \
    --title "Run tests and fix failures" \
    --mode autonomous

  # Monitor:
  agentickode --json runs list --status running

  # Report back when done

"Deploy this feature end-to-end"

You: "Implement user profiles with avatar upload for my-app"

Agent:
  agentickode runs create --project my-app \
    --title "Implement user profiles with avatar upload" \
    --description "Add profile page, avatar upload to S3,
    profile API endpoints, and tests" \
    --mode autonomous

  # Follow progress:
  agentickode runs logs 46 --follow

  # When done:
  agentickode runs approve 46

"Monitor and maintain"

You: "What's the status of everything?"

Agent:
  agentickode admin health
  agentickode --json runs list --limit 10
  agentickode admin analytics --period 7d
  agentickode servers list

  "Platform healthy. 3 runs completed today, 1 running.
   Total cost this week: $2.34. All 2 servers online."

What's Coming Next

  • MCP Server — Native tool integration without CLI parsing. Agents get structured JSON responses directly.
  • Built-in Chat UI — A chat page in the web UI where you talk to an agent that controls the platform.
  • Persistent Sessions — The agent remembers your projects and preferences across conversations.