Skip to main content

Agent Components

CI-Copilot is composed of multiple specialized agents coordinated by a Supervisor. Each agent has a defined scope and its own set of tools.


1. Supervisor Agent​

Entry point. Routes requests — CI/CD tasks go to the Generation Supervisor, everything else gets handled directly (greetings, out-of-scope).

Tools​

ToolPurpose
transfer_to_ci_generationDelegates CI/CD tasks to the Generation Supervisor
request_human_inputAsks the user for clarification or input

2. Generation Supervisor​

Orchestrates the detect → validate → render flow using a LangGraph state machine (CIPipelineState). Manages handoffs between the sub-agents.

Tools​

ToolPurpose
transfer_context_to_rendererPasses context from Context Detector to Renderer
transfer_to_rendererHands off to Renderer for YAML generation
complete_workflowMarks workflow completion

3. Context Detector​

Connects to GitHub via MCP and runs a thorough analysis of the target repo. Supports Node.js, Python, Go, Java, Rust, Ruby, PHP, .NET.

Tools​

ToolWhat it does
fetch_repository_informationRepo metadata — default branch, language, visibility
fetch_repository_filesPulls manifest files, Dockerfiles, CI configs
detect_runtime_and_package_managerIdentifies language + package manager from manifests
extract_project_dependenciesLLM-powered dep extraction with CI usage classification
check_for_existing_ciDetects existing CI across GitHub Actions, Jenkins, GitLab CI, etc.
infer_ci_capabilitiesGenerates a full CISpec — stages, capabilities, triggers, service deps

After building the spec, it presents a CI plan for your approval (first HITL gate).


4. Policy Validator​

Checks the plan before rendering against security, compliance, and best practices.

Tools​

ToolPurpose
validate_security_policiesSecurity policy checks
check_license_complianceLicense compliance validation
validate_ci_best_practicesBest-practice validation
calculate_policy_compliance_scoreOverall compliance score

5. Renderer​

Takes the approved spec and turns it into real YAML. Shows you the final pipeline for approval before committing (second HITL gate).

Tools​

ToolWhat it does
intent_to_commandsMaps CI capabilities to concrete shell commands
plan_workflowStructures jobs, stages, and dependency graphs
render_workflowsGenerates the final GitHub Actions YAML
workflow_refinerValidates with actionlint, applies corrections via reflection loop
generate_workflow_explanationProduces a human-readable pipeline summary
commit_and_create_prCommits to a branch and opens a PR

Human-in-the-Loop Gates​

CI-Copilot enforces two approval gates:

GateTriggerPurpose
Plan ApprovalAfter Context Detector builds the CISpecReview the proposed pipeline structure and capabilities
Commit ApprovalBefore Renderer commits and opens PRReview the final YAML and approve the commit

Nothing gets committed without your explicit sign-off.