Skip to main content Skip to navigation Skip to footer

AI Agent Integration Overview

How AI coding assistants like Claude Code, Cursor, and Cline integrate with Rediacc infrastructure for autonomous deployment and management.

AI coding assistants can manage Rediacc infrastructure autonomously through the rdc CLI. This guide covers the integration approaches and how to get started.

Why Self-Hosted + AI Agents

Rediacc’s architecture is naturally agent-friendly:

  • CLI-first: Every operation is a rdc command, no GUI required
  • SSH-based: The protocol agents know best from training data
  • JSON output: All commands support --output json with a consistent envelope
  • Docker isolation: Each repository gets its own daemon and network namespace
  • Scriptable: --yes skips confirmations, --dry-run previews destructive operations

Integration Approaches

1. AGENTS.md / CLAUDE.md Template

The fastest way to get started. Copy our AGENTS.md template into your project root:

  • CLAUDE.md for Claude Code
  • .cursorrules for Cursor
  • .windsurfrules for Windsurf

This gives the agent full context about available commands, architecture, and conventions.

2. JSON Output Pipeline

When agents call rdc in a subshell, output automatically switches to JSON (non-TTY detection). Every JSON response uses a consistent envelope:

{
  "success": true,
  "command": "machine query",
  "data": { ... },
  "errors": null,
  "warnings": [],
  "metrics": { "duration_ms": 42 }
}

Error responses include retryable and guidance fields:

{
  "success": false,
  "errors": [{
    "code": "NOT_FOUND",
    "message": "Machine \"prod-2\" not found",
    "retryable": false,
    "guidance": "Verify the resource name with \"rdc machine query\" or \"rdc config repository list\""
  }]
}

3. Agent Capabilities Discovery

The rdc agent subcommand provides structured introspection:

# List all commands with arguments and options
rdc agent capabilities

# Show detailed schema for a specific command
rdc agent schema --command "machine query"

# Execute a command with JSON stdin
echo '{"name": "prod-1"}' | rdc agent exec "machine query"

Key Flags for Agents

FlagPurpose
--output json / -o jsonMachine-readable JSON output
--yes / -ySkip interactive confirmations
--quiet / -qSuppress informational stderr output
--fields name,statusLimit output to specific fields
--dry-runPreview destructive operations without executing

Safety & Guardrails

The CLI treats AI agents differently from humans at a keyboard. Sensitive operations require proof of prior knowledge (the --current flag), interactive-editor flows are refused by default, and every refusal is audit-logged. The AI Agent Safety & Guardrails reference covers the full firewall table, the knowledge-gate model, the REDIACC_ALLOW_CONFIG_EDIT scope-override, and the hash-chained audit log.

Next Steps