Appearance
Jenkins Connector
The Jenkins connector provides visibility into your Jenkins CI/CD server with 7 live tools and comprehensive ETL ingestion of jobs, builds, nodes, views, and plugins into the knowledge graph.
Authentication
The Jenkins connector authenticates using a username and API token. Generate an API token from Manage Jenkins > Users > Configure > API Token.
json
{
"name": "CI Jenkins",
"source_type": "jenkins",
"config": {
"base_url": "https://jenkins.example.com",
"username": "agentcy-bot",
"api_token": "11a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
"modules": ["jobs", "builds", "nodes", "views", "plugins"]
}
}| Variable | Required | Description |
|---|---|---|
base_url | Yes | Jenkins server URL (e.g., https://jenkins.example.com) |
username | Yes | Jenkins username with API access |
api_token | Yes | API token generated from the Jenkins user settings |
modules | No | Modules to enable: jobs, builds, nodes, views, plugins, credentials |
TIP
Create a dedicated Jenkins user for Agentcy with read access to all jobs and builds. Avoid using your personal account.
Live Tools (7)
| Tool | Description | Arguments |
|---|---|---|
jenkins_list_jobs | List all jobs with status, last build info, and health | folder?, view? |
jenkins_get_job | Get detailed information about a specific job | job_name |
jenkins_get_build | Get build details including status, duration, and logs | job_name, build_number |
jenkins_trigger_build | Trigger a new build for a job | job_name, parameters? |
jenkins_stop_build | Abort a running build | job_name, build_number |
jenkins_list_nodes | List all build nodes with status and executor info | offline_only? |
jenkins_list_plugins | List installed plugins with version and update status | updates_only? |
Example: Agent Using Jenkins Tools
User: "Which jobs have been failing most often this week?"
Agent: Let me check your Jenkins jobs.
→ Calls jenkins_list_jobs()
→ Filters for jobs with recent failures
→ Reports: "3 jobs have failed in the last 7 days:
- backend-integration-tests: 5 failures (last: #412)
- deploy-staging: 2 failures (last: #89)
- nightly-e2e: 1 failure (last: #201)"User: "Show me the logs for backend-integration-tests build #412"
Agent: I'll pull the build details.
→ Calls jenkins_get_build(job_name: "backend-integration-tests", build_number: 412)
→ Returns build status, duration, console output, and failure causeETL Ingestion
When you trigger a sync, the Jenkins connector ingests the following resources into the knowledge graph. A JenkinsServer root node is created to anchor all resources.
Nodes Created
| Node Label | Properties | Jenkins Resource |
|---|---|---|
JenkinsServer | url, version, mode, num_executors | Server root |
JenkinsJob | name, url, color, buildable, last_build, last_success, last_failure, health_score | Jobs |
JenkinsBuild | number, result, timestamp, duration, building, built_on, trigger_cause | Builds |
JenkinsNode | display_name, offline, num_executors, architecture, os, labels | Nodes |
JenkinsView | name, url, description | Views |
JenkinsPlugin | short_name, long_name, version, active, has_update | Plugins |
Relationships Created
| Relationship | From | To |
|---|---|---|
HAS_JOB | JenkinsServer | JenkinsJob |
HAS_BUILD | JenkinsJob | JenkinsBuild |
HAS_NODE | JenkinsServer | JenkinsNode |
CONTAINS | JenkinsView | JenkinsJob |
BUILT_BY | JenkinsBuild | JenkinsNode |
Graph Queries
cypher
-- Find jobs with the most consecutive failures
MATCH (j:JenkinsJob)-[:HAS_BUILD]->(b:JenkinsBuild)
WHERE b.result = "FAILURE"
RETURN j.name, count(b) AS failures
ORDER BY failures DESC
LIMIT 10
-- Find which nodes are building the most jobs
MATCH (b:JenkinsBuild)-[:BUILT_BY]->(n:JenkinsNode)
WHERE b.result IS NOT NULL
RETURN n.display_name, count(b) AS build_count
ORDER BY build_count DESC
-- Find jobs visible in a specific view
MATCH (v:JenkinsView)-[:CONTAINS]->(j:JenkinsJob)
WHERE v.name = "Production"
RETURN j.name, j.health_score, j.last_buildConfiguration Reference
json
{
"name": "CI Jenkins",
"source_type": "jenkins",
"config": {
"base_url": "https://jenkins.example.com",
"username": "agentcy-bot",
"api_token": "...",
"modules": ["jobs", "builds", "nodes", "views", "plugins", "credentials"],
"job_filter": "backend-*",
"max_builds_per_job": 50
}
}| Field | Type | Default | Description |
|---|---|---|---|
base_url | string | required | Jenkins server URL |
username | string | required | Jenkins username |
api_token | string | required | Jenkins API token |
modules | string[] | all | Modules to enable for ingestion |
job_filter | string | -- | Glob pattern to filter jobs by name |
max_builds_per_job | number | 50 | Max number of builds to ingest per job |
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid username or API token | Regenerate the API token in Jenkins user settings |
403 Forbidden | User lacks read permissions | Grant Overall/Read and Job/Read permissions |
Connection refused | Jenkins server is unreachable | Verify base_url and network/firewall rules |
404 Not Found | Job or build does not exist | Check the job name and build number |
503 Service Unavailable | Jenkins is starting up or shutting down | Wait for Jenkins to become ready |