Skip to main content Skip to navigation Skip to footer

AI Agent Integration Overview

How Claude Code, Cursor, and Cline manage Rediacc infrastructure via rdc: JSON output, agent introspection, and safety guardrails.

Honestly, rdc is agent-aware by design. Claude Code, Cursor, Cline: any AI assistant calling rdc in a subshell gets structured JSON output, machine-readable errors, and the guardrails you’d want for autonomous Rediacc infrastructure management. Here’s how the integration works.

Why Self-Hosted + AI Agents

Rediacc’s architecture works well for agents:

  • 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

Drop it in and the agent has the full command reference, the architecture context, and the conventions it needs to work without guessing.

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 status\" or \"rdc repo list\""
  }]
}

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

Look, the CLI doesn’t treat agents the same as a human at the terminal. Sensitive operations need proof you already know the current state (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