# Build Infrastructure Context for Your Coding Agent

Open-source CLI that syncs metadata from Grafana, Datadog, Kubernetes, and 20+ tools into structured markdown — so your AI agent stops hallucinating and starts debugging accurately.

Works with Claude Code, Cursor, Windsurf, and any agent that reads context files.

```bash
$ curl -fsSL https://raw.githubusercontent.com/DrDroidLab/context-builder/main/install.sh | bash
```

Also available via `pipx install`

[View on GitHub](https://github.com/DrDroidLab/context-builder)  
[Talk to Us](https://calendly.com/siddarthjain/doctor-droid-discovery-call)

## With vs Without Infrastructure Context

### Without droidctx

> Debug why payment latency spiked

Checking Kubernetes pods... (service is on ECS)

Writing PromQL from scratch... (dashboard exists)

Found redis-test-instance... (wrong instance)

Agent gave up after 15 tool calls.

### With droidctx

> Debug why payment latency spiked

payment-service runs on ECS (from context)

Checking "Payment Service Overview" in Grafana

Redis prod metrics show p99 spike at 14:32

Upstream: api-gateway, Downstream: notification-svc

Root cause identified in 4 tool calls.

## See It In Action

Watch how droidctx builds infrastructure context for your coding agent in minutes.

[DroidCTX: An Open Source CLI Tool that gives infrastructure context to Coding agents / Claude Code](https://www.youtube.com/watch?v=Iw4Yj7hUu90)

## What Gets Generated

A structured directory of markdown files — click through to see what your agent gets.

### droidctx-context

**File TreePreview**

droidctx-context
        overview.md
        connectors
        cross_references
        overview.md

```markdown
# Infrastructure Overview

## Connectors Synced
- grafana_prod (Grafana) — 12 dashboards, 34 alerts
- k8s_production (Kubernetes) — 3 namespaces, 18 deployments
- datadog_prod (Datadog) — 8 monitors, 5 dashboards
- postgres_main (PostgreSQL) — 24 tables
- ecs_production (ECS) — 6 services, 3 clusters

## Services Discovered: 14
## Cross-references Generated: 23
```

Click files in the tree to preview their contents. This is generated from your live infrastructure.

## Production Is Too Vast to Guess

A typical production setup has dozens of services spread across Kubernetes, ECS, and Lambda — with metrics in Grafana, alerts in Datadog, schemas in PostgreSQL, and deploys in ArgoCD. No agent can guess this topology.

- 5-10 Observability & infra tools per team on average
- 50+ Dashboards, alerts & monitors to navigate
- 0 Of this is known to your AI agent by default

### Your agent is limited by what you know to tell it

Without context files, the agent can only navigate what you manually describe in your prompt. If you don't know that Redis metrics are in a specific Grafana dashboard, the agent won't either. It's restricted by your knowledge of where things live across a multi-tool system — which means it works for you, but can't be handed to a teammate who has different tribal knowledge.

### Without a map, the agent wanders

When the agent doesn't know what exists — which services run where, which dashboards track what, how services connect — it guesses. It checks Kubernetes when the service is on ECS. It writes PromQL from scratch when a dashboard already has the panel. It finds a test Redis instance instead of production. Every wrong turn costs tool calls, tokens, and time.

## How It Works

Four commands. That's it.

1. **Initialize**  
   Creates a credentials template for your infrastructure tools.  
   ```bash  
   $ droidctx init
   ```

2. **Auto-Detect**  
   Scans for `kubectl`, `aws`, `gcloud`, and `az` configs and auto-populates credentials.  
   ```bash  
   $ droidctx detect
   ```

3. **Sync**  
   Extracts metadata from all connected tools and generates structured markdown files with cross-references.  
   ```bash  
   $ droidctx sync
   ```

4. **Point Your Agent**  
   Reference the generated context in your CLAUDE.md or agent config. Your agent now has a complete map.
   ```markdown
   # CLAUDE.md
   Reference ./droidctx-context/ for infra context
   ```

## 25+ Connectors

Syncs context from the tools your team already uses.

Grafana
Datadog
New Relic
Kubernetes
PostgreSQL
MongoDB
Elasticsearch
AWS
GitHub
Sentry
Jenkins
ArgoCD
CloudWatch
Jira
PostHog
SigNoz
GKE
Google Cloud
ClickHouse
Prometheus
Victoria Metrics
Grafana Loki
OpenSearch
Coralogix
Azure

## Give Your Agent Infrastructure Context

Install in 30 seconds. Generate context in one command. Debug accurately from day one.

[Star on GitHub](https://github.com/DrDroidLab/context-builder)  
[Talk to Us](https://calendly.com/siddarthjain/doctor-droid-discovery-call)

## Frequently Asked Questions

### What does droidctx actually generate?

### How is this different from just writing docs manually?

### Does it work with Claude Code, Cursor, or other coding agents?

### What access does it need to my infrastructure?

### Can I use this for a Slack-based debugging agent?

### How often should I run the sync?
