Skip to content

docs(examples): jenkins-triage agent walkthrough (cictl integration)#2095

Open
Feelings0220 wants to merge 3 commits into
kagent-dev:mainfrom
Feelings0220:feat/examples-jenkins-triage
Open

docs(examples): jenkins-triage agent walkthrough (cictl integration)#2095
Feelings0220 wants to merge 3 commits into
kagent-dev:mainfrom
Feelings0220:feat/examples-jenkins-triage

Conversation

@Feelings0220

Copy link
Copy Markdown

What

Adds examples/jenkins-triage/README.md, a worked example showing how to wire an external read-only CI inspection CLI (cictl) into a kagent Agent for Jenkins build-failure triage.

Why

kagent's existing built-in agents (k8s, istio, observability, …) all use MCP servers as tool providers. There is currently no documented path for the "I already have a CLI tool; how do I get my Agent to use it?" case. This example fills that gap with:

  • A skill loaded via Agent.spec.skills.gitRefs (pointing at the cictl repo)
  • A custom kagent runtime image pattern (Dockerfile lives in cictl repo at docker/Dockerfile.runtime)
  • A credentials Secret mounted via Agent.spec.declarative.deployment.volumes / volumeMounts
  • Inline YAMLs the user can copy-paste

The example explicitly compares its approach against an MCP-server-based alternative, so readers understand when to choose each.

cictl itself is compile-time read-only (its HTTP client exposes only GET), so this triage agent cannot mutate Jenkins state regardless of LLM behavior.

Scope

  • One new file: examples/jenkins-triage/README.md
  • No CRD changes.
  • No new Helm chart. Documentation only.

Test plan

  • Manual walkthrough on a Kind cluster:
    • Build the custom runtime image per cictl's docs/runtime-setup.md
    • Create the jenkins-cictl-credentials Secret
    • Apply the Agent CRD
    • Verify a triage prompt surfaces a real failure analysis
  • Confirm Jenkins access logs show only GET requests during a triage session (read-only guarantee holds end-to-end)

Related

Adds examples/jenkins-triage/README.md, a worked example showing how to wire
an external read-only CI inspection CLI (cictl,
https://github.com/Feelings0220/cictl) into a kagent Agent for Jenkins
build-failure triage.

Documents the "external CLI + skill markdown + custom runtime image"
pattern as a complement to the existing MCP-server-based pattern used by
built-in agents like observability and istio. Includes inline YAMLs the
user can copy-paste (Secret + Agent CRD), references a Dockerfile pattern
in the cictl repo for the custom runtime image, and explicitly compares
against an MCP-based alternative.

One new file, no CRD changes, no Helm chart.

Signed-off-by: Feelings0220 <124495386+Feelings0220@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 28, 2026 14:46
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new worked example documenting how to integrate an external, read-only Jenkins inspection CLI (cictl) into a kagent Declarative Agent by packaging the CLI into the agent runtime image, loading skill markdown from Git, and mounting credentials via a Secret.

Changes:

  • Added an end-to-end walkthrough for a Jenkins triage agent that shells out to cictl for build/log/config inspection.
  • Documented a gitRefs-based skills workflow plus a custom runtime-image pattern and Secret-mounted credentials.
  • Included a “why not MCP” comparison and a simple operational check for read-only behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/jenkins-triage/README.md Outdated
Comment on lines +51 to +54
1. **kagent installed** with `app.agentImage` either pointing at a custom image
that has `cictl` in `PATH`, or otherwise made available to the Agent's main
container. Build instructions:
[cictl/docs/runtime-setup.md](https://github.com/Feelings0220/cictl/blob/v0.1.0/docs/runtime-setup.md).
Comment thread examples/jenkins-triage/README.md Outdated
Comment on lines +101 to +104
gitRefs:
- url: https://github.com/Feelings0220/cictl
ref: v0.1.0
path: skills
Comment on lines +111 to +113
You have access to the `cictl` CLI for querying Jenkins read-only. The
`jenkins` skill in /skills describes every available command and a
triage playbook. Follow it.
Comment thread examples/jenkins-triage/README.md Outdated
EOF
```

## Step 2 — Apply the Agent CRD
- Correct Helm key app.agentImage -> controller.agentImage
- Set gitRefs name: cictl so the skill mounts at /skills/cictl, and
  point the systemMessage at /skills/cictl instead of /skills
- Reword 'Apply the Agent CRD' -> 'Apply the Agent' (applies an Agent CR)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Feelings0220 <124495386+Feelings0220@users.noreply.github.com>
@Feelings0220 Feelings0220 force-pushed the feat/examples-jenkins-triage branch from 2bbf22f to e316118 Compare June 30, 2026 13:02
cictl now ships the skill as skills/jenkins/SKILL.md (the layout kagent's
loader requires). Update the gitRefs example to path: skills/jenkins,
name: jenkins, ref: v0.1.2, and fix the /skills path in the systemMessage.
Also bump doc links to v0.1.2 and drop the link to a shared-library guide
that is not in the repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Feelings0220 <124495386+Feelings0220@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants