Sponsored by Deepsite.site

🚀 ArgoCD AI Agent

Created By
cnoe-io6 months ago
ArgoCD AI Agent powered by 1st Party MCP Server using OpenAPI Codegen, LangGraph and LangChain MCP Adapters. Agent is exposed on various agent transport protocols (AGNTCY ACP, Google A2A, MCP Server)
Content

🚀 ArgoCD AI Agent

Python Poetry License

Conventional Commits Ruff Linter Super Linter Unit Tests

ACP Docker Build and Push A2A Docker Build and Push


  • 🤖 ArgoCD Agent is an LLM-powered agent built using the LangGraph ReAct Agent workflow and MCP tools.
  • 🌐 Protocol Support: Compatible with ACP and A2A protocols for integration with external user clients.
  • 🛡️ Secure by Design: Enforces ArgoCD API token-based RBAC and supports external authentication for strong access control.
  • 🔌 Integrated Communication: Uses langchain-mcp-adapters to connect with the ArgoCD MCP server within the LangGraph ReAct Agent workflow.
  • 🏭 First-Party MCP Server: The MCP server is generated by our first-party openapi-mcp-codegen utility, ensuring version/API compatibility and software supply chain integrity.

🚦 Getting Started

1️⃣ Configure Environment

Example .env file:

LLM_PROVIDER=aws-bedrock
AGENT_NAME=ArgoCD

## ArgoCD Configuration
ARGOCD_TOKEN=
ARGOCD_API_URL=
ARGOCD_VERIFY_SSL=true

## A2A Agent Configuration
A2A_HOST=localhost
A2A_PORT=8000

########### LLM Configuration ###########

# AWS Configuration
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_BEDROCK_MODEL_ID="us.amazon.nova-pro-v1:0"
AWS_BEDROCK_PROVIDER="amazon"

2️⃣ Start the Agent (A2A Mode)

Note:

  • If you don't have access to an ArgoCD server, see the Local Development Setup section below to quickly spin up a local ArgoCD instance and deploy a sample app before proceeding.
  • If you are using a different container runtime such as podman or ctr, please substitute docker with the respective utility in the commands below.

Run the agent in a Docker container using your .env file:

docker run -p 0.0.0.0:8000:8000 -it \
  -v $(pwd)/.env:/app/.env \
  ghcr.io/cnoe-io/agent-argocd:a2a-latest

3️⃣ Run the Client

Use the agent-chat-cli to interact with the agent:

uvx https://github.com/cnoe-io/agent-chat-cli.git a2a

Quick Demos

AGNTCY ACP Demo

acp_docker_terminal_demo

Google A2A Demo

a2a_docker_terminal_demo

🏗️ Architecture

flowchart TD
  subgraph Client Layer
    A[User Client ACP/A2A]
  end

  subgraph Agent Transport Layer
    B[AGNTCY ACP<br/>or<br/>Google A2A]
  end

  subgraph Agent Graph Layer
    C[LangGraph ReAct Agent]
  end

  subgraph Tools/MCP Layer
    D[Langchain MCP Adapter]
    E[ArgoCD MCP Server]
    F[ArgoCD API Server]
  end

  A --> B --> C
  C --> D
  D -.-> C
  D --> E --> F --> E

✨ Features

  • 🤖 LangGraph + LangChain MCP Adapter for agent orchestration
  • 🧠 Azure OpenAI GPT-4o as the LLM backend
  • 🔗 Connects to ArgoCD via a dedicated ArgoCD MCP agent
  • 🔄 Multi-protocol support: Compatible with both ACP and A2A protocols for flexible integration and multi-agent orchestration

Local Development Setup

▶️ [Optional] Start local ArgoCD Server with kind

Note: This section assumes you have basic familiarity with Kubernetes concepts and tools, as running ArgoCD locally requires interacting with Kubernetes clusters and resources.

If you don't have an existing ArgoCD server, you can quickly spin one up using kind:

  • Install KinD Reference: https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries

  • Create a kind cluster:

    kind create cluster --name cnoe-argocd-agent
    
  • Install ArgoCD in the argocd namespace:

    kubectl create namespace argocd
    
    kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    
  • Expose the ArgoCD API server: Wait until all the pods are running by checking their status:

    kubectl get pods -A
    
    kubectl port-forward svc/argocd-server -n argocd 8080:443
    

    The API will be available at https://localhost:8080.

  • Get the ArgoCD admin password:

    kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo
    
  • (Optional) Install ArgoCD CLI:

    brew install argocd
    # or see https://argo-cd.readthedocs.io/en/stable/cli_installation/
    

Example: Deploying Guestbook via ArgoCD CLI

Note: Use a new terminal session and continue to run ArgoCD locally via port forwarding.

To deploy the Guestbook demo application using the ArgoCD CLI, follow these steps:

  1. Login to ArgoCD:
argocd login localhost:8080 --username admin --password <ARGOCD_ADMIN_PASSWORD> --insecure
  1. Create the Guestbook application:
argocd app create guestbook \
  --repo https://github.com/argoproj/argocd-example-apps.git \
  --path guestbook \
  --dest-server https://kubernetes.default.svc \
  --dest-namespace default
  1. Sync (deploy) the application:
argocd app sync guestbook
  1. Check application status:
argocd app get guestbook
  1. Generate an ArgoCD API Token:

To interact programmatically with ArgoCD, you need an API token. After logging in with the CLI, run:

kubectl -n argocd patch configmap argocd-cm --type merge -p '{"data":{"accounts.admin":"login,apiKey"}}'
kubectl -n argocd rollout restart deployment argocd-server
argocd account generate-token --account admin

Copy the output token and set it as ARGOCD_TOKEN in your .env file.

ARGOCD_TOKEN=
ARGOCD_API_URL=https://localhost:8080
ARGOCD_VERIFY_SSL=false

For more details, see the official getting started guide.

1️⃣ Create/Update .env

2️⃣ Start A2A Agent

  • A2A Mode:
    make run-a2a
    

3️⃣ Run the A2A Client

To interact with the agent in A2A mode:

uvx https://github.com/cnoe-io/agent-chat-cli.git a2a

or

make run-a2a-client

Example Interaction

> Your Question: how can you help?
Agent: I can assist you with managing applications in ArgoCD, including tasks such as:
  • Listing Applications: Retrieve a list of applications with filtering options.
  • Getting Application Details: Fetch detailed information about a specific application.
  • Creating Applications: Create new applications in ArgoCD.
  • Updating Applications: Update existing applications.
  • Deleting Applications: Remove applications from ArgoCD.
  • Syncing Applications: Synchronize applications to a specific Git revision.
  • Getting User Info: Retrieve information about the current user.
  • Getting ArgoCD Settings: Access server settings.
  • Getting Plugins: List available plugins.
  • Getting Version Information: Retrieve ArgoCD API server version.

🧬 Internals

  • 🛠️ Uses create_react_agent for tool-calling
  • 🔌 Tools loaded from the ArgoCD MCP server (submodule)
  • ⚡ MCP server launched via uv run with stdio transport
  • 🕸️ Single-node LangGraph for inference and action routing

📁 Project Structure

agent_argocd
├── __main__.py
├── agent.py
├── graph.py
├── llm_factory.py
├── models.py
├── protocol_bindings
│   ├── __init__.py
│   ├── a2a_server
│   │   └── agent_executor.py
│   ├── acp_server
│   │   └── agent.json
│   └── mcp_server
│       ├── __init__.py
│       └── mcp_argocd
│           ├── __init__.py
│           ├── api
│           │   └── client.py
│           ├── models
│           │   └── base.py
│           ├── server.py
│           ├── tools
│           │   └── api_v1_applications.py
│           └── utils
│               └── __init__.py
└── state.py


🧩 MCP Submodule (ArgoCD Tools)

This project uses a first-party MCP module generated from the ArgoCD OpenAPI specification using our openapi-mcp-codegen utility. The generated MCP server is included as a git submodule in argocd_mcp/.

All ArgoCD-related LangChain tools are defined by this MCP server implementation, ensuring up-to-date API compatibility and supply chain integrity.

Evals

Running Evals

This evaluation uses agentevals to perform strict trajectory match evaluation of the agent's behavior. To run the evaluation suite:

make evals

This will:

  • Set up and activate the Python virtual environment
  • Install evaluation dependencies (agentevals, tabulate, pytest)
  • Run strict trajectory matching tests against the agent

Example Output

=======================================
 Setting up the Virtual Environment
=======================================
Virtual environment already exists.
=======================================
 Activating virtual environment
=======================================
To activate venv manually, run: source .venv/bin/activate
. .venv/bin/activate
Running Agent Strict Trajectory Matching evals...
Installing agentevals with Poetry...
. .venv/bin/activate && uv add agentevals tabulate pytest
...
set -a && . .env && set +a && uv run evals/strict_match/test_strict_match.py
...
Test ID: argocd_agent_1
Prompt: show argocd version
Reference Trajectories: [['__start__', 'agent_argocd']]
Note: Shows the version of the ArgoCD Server Version.
...
Results:
{'score': True}
...

Evaluation Results

Latest Strict Match Eval Results


📜 License

Apache 2.0 (see LICENSE)


👥 Maintainers

See MAINTAINERS.md

  • Contributions welcome via PR or issue!

🙏 Acknowledgements

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Tavily Mcp
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。