Skip to main content

Platform-agnostic pipeline AI agent with MCP tool integration and multi-step execution engine

Project description

cicaddy

Platform-agnostic AI agent for running AI workflows in CI pipelines, with MCP tool integration and multi-step execution engine.

Features

  • Multi-provider AI: Gemini, OpenAI, Claude
  • MCP integration: Connect to any MCP-compatible tool server
  • Multi-step execution: Token-aware execution engine with recovery
  • YAML task definitions: DSPy-based task configuration
  • Notifications: Slack and email notification support
  • HTML reports: Customizable analysis report generation
  • Extensible agents: Registry-based agent factory for custom agents

Installation

pip install cicaddy

Quick Start

# Run with environment file
cicaddy run --env-file .env

# Run with CLI arguments
cicaddy run --ai-provider gemini --agent-type task --log-level DEBUG

# Show configuration
cicaddy config show --env-file .env

# Validate configuration
cicaddy validate --env-file .env

Configuration

Configure via environment variables or .env file:

# AI Provider
AI_PROVIDER=gemini
AI_MODEL=gemini-2.5-flash
GEMINI_API_KEY=your-key-here

# Agent
AGENT_TYPE=task
TASK_TYPE=scheduled_analysis

# MCP Servers (JSON array)
MCP_SERVERS_CONFIG=[]

# Notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/...

# DSPy Task File (takes precedence over AI_TASK_PROMPT)
AI_TASK_FILE=tasks/dora_report.yaml

DSPy Task Definition (YAML)

Instead of raw prompt strings (AI_TASK_PROMPT), define structured tasks in YAML with typed inputs, expected outputs, MCP tool constraints, and reasoning strategy. Set AI_TASK_FILE to your task file path.

See examples/dora_metrics_task.yaml for a complete DORA metrics analysis task using DevLake MCP, and examples/templates/report_template.html for the HTML report template.

Key schema fields:

Field Description
inputs[].env_var Resolve value from environment variable at load time
inputs[].format diff or code for fenced rendering in prompt
tools.servers Restrict to specific MCP servers
tools.required_tools Tools the AI must use during execution
tools.forbidden_tools Tools the AI must not use
reasoning chain_of_thought, react, or simple
output_format markdown, html, or json
context Supports {{VAR}} placeholders resolved at load time

Extending with Platform Plugins

cicaddy discovers platform plugins automatically via Python entry_points. Plugins can register agents, CLI args, env vars, config sections, validators, and a settings loader — without modifying cicaddy itself.

1. Define plugin callables (my_plugin/plugin.py):

def register_agents():
    from cicaddy.agent.factory import AgentFactory
    from my_plugin.agent import MergeRequestAgent, detect_agent_type

    AgentFactory.register("merge_request", MergeRequestAgent)
    AgentFactory.register_detector(detect_agent_type, priority=40)

def get_cli_args():
    from cicaddy.cli.arg_mapping import ArgMapping
    return [
        ArgMapping(cli_arg="--mr-iid", env_var="CI_MERGE_REQUEST_IID",
                   help_text="Merge request IID"),
    ]

2. Register in pyproject.toml:

[project.entry-points."cicaddy.agents"]
my_platform = "my_plugin.plugin:register_agents"

[project.entry-points."cicaddy.cli_args"]
my_platform = "my_plugin.plugin:get_cli_args"

[project.entry-points."cicaddy.settings_loader"]
my_platform = "my_plugin.config:load_settings"

3. Install and run — plugins are discovered automatically:

pip install cicaddy my-cicaddy-plugin
cicaddy run --env-file .env

Available plugin groups: cicaddy.agents, cicaddy.cli_args, cicaddy.env_vars, cicaddy.config_sections, cicaddy.validators, cicaddy.settings_loader.

Official Plugins

Plugin Platform Description
cicaddy-gitlab GitLab AI-powered merge request reviews and branch analysis for GitLab CI
cicaddy-action GitHub GitHub Action for AI PR reviews and changelog generation

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cicaddy-0.4.0.tar.gz (248.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cicaddy-0.4.0-py3-none-any.whl (290.0 kB view details)

Uploaded Python 3

File details

Details for the file cicaddy-0.4.0.tar.gz.

File metadata

  • Download URL: cicaddy-0.4.0.tar.gz
  • Upload date:
  • Size: 248.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cicaddy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2a20fa808c06436fd6149349ddf685e19bf52cba7643e516a0803986a427bdf3
MD5 9245f0665a5daff2ffa8ac8e319f0a43
BLAKE2b-256 7f09debbcbf71d7b7ecee51c16d96f2bd05fa240fe27c7d785642dca3045855f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cicaddy-0.4.0.tar.gz:

Publisher: python-publish.yml on waynesun09/cicaddy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cicaddy-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: cicaddy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 290.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cicaddy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83096b92ae882102ac9e16665a965ac64e722a545156cedd21794938070db6f9
MD5 9a2025de0663377e42123b7aedad80eb
BLAKE2b-256 2e9fda74047c1bed5aa06a1dd6b6bb5fe7731f20e3ed134b0f0d6bcef8e39a68

See more details on using hashes here.

Provenance

The following attestation bundles were made for cicaddy-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on waynesun09/cicaddy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page