Self-hosted processor

The self-hosted processor keeps AI Code Insights session transcripts inside your network. Developer laptops send sessions to a processor that you run instead of to DX. The processor stores transcripts in an Amazon S3 bucket you own, runs session summaries, work type assignment, and evaluations with your Amazon Bedrock account, and sends DX only session metadata (including scrubbed session titles) and analysis results, never message content. Transcripts stay in your bucket for as long as your lifecycle rule says. Optionally, the processor also sends full transcripts to an endpoint you run.

Only session uploads change destination. Commits, settings, updates, and all other daemon traffic continue to go to DX. DX never connects to the processor; the processor calls DX.

Note: The processor requires AI Code Insights daemon 0.7.8 or later. DX turns on processor mode for your organization.

Before you begin

  • Daemon 0.7.8 or later on every developer laptop, or a plan to get there with automatic updates.
  • An AWS account you control, for an S3 bucket and Amazon Bedrock access. See Step 2: Create the bucket and permissions.
  • A Linux container platform, such as Kubernetes or Amazon ECS, that can run the processor container. The processor keeps no local state, so it needs no volume.
  • An internal hostname and TLS certificate for the processor. A certificate from your organization’s own certificate authority works when developer laptops trust that authority.
  • Network access from every developer laptop to that hostname, through your corporate network, VPN, or zero-trust access proxy.
  • A DX Data Cloud API key for the processor’s connection to DX. This is not a Web API token or the AI Code Insights organization token.
  • Endpoint management that can deliver one more setting to laptops: MDM on macOS and Windows, and configuration management on Linux.

Step 1: Upgrade daemons

Open Admin → AI Code Insights → Client versions and confirm that active developers run 0.7.8 or later. Turn on automatic updates to move the remaining endpoints forward.

Daemons older than 0.7.8 do not route sessions to the processor. After processor mode is on, they keep uploading sessions to DX, and DX discards their message content. Those sessions are not summarized or evaluated. Upgrade them before Step 6: Turn on processor mode.

Step 2: Create the bucket and permissions

The processor stores each session as one object in an S3 bucket. Use a bucket that only the processor writes, with:

  • A lifecycle rule that expires every object after the number of days to keep transcripts. This rule is the processor’s retention. The processor reads it at startup and refuses to start without it. The processor never deletes a transcript, analyzed or not; the rule deletes each session once it has gone that many days without an upload. With several such rules, the shortest applies.
  • Block Public Access on, and default encryption with SSE-S3 or SSE-KMS. With SSE-KMS, enable S3 Bucket Keys, and allow the processor kms:GenerateDataKey and kms:Decrypt on the key.
  • Versioning off, or a noncurrent version expiration on the lifecycle rule. Every upload rewrites its session’s object, so with versioning each earlier copy, and every transcript the rule deletes, stays as a noncurrent version. To keep the retention, add "NoncurrentVersionExpiration": {"NoncurrentDays": 1} to the rule.
  • An S3 gateway VPC endpoint in the processor’s VPC, when the processor runs in AWS, so S3 traffic stays inside AWS and avoids NAT data charges.

The processor uses one set of AWS credentials for S3 and Bedrock. It calls openai.gpt-5.6-luna and anthropic.claude-haiku-4-5-20251001-v1:0 through cross-Region inference profiles: the geographic profile for your Region, such as us., or the global. profile where none exists. In EU, Japan, and Australia Regions, summaries use Claude Haiku so that transcripts stay in the geography. Enable access to both models in your account.

Granting access to the inference profiles alone is not enough. Amazon Bedrock also authorizes the underlying model in every Region a profile can route to, the Region-less model for global. profiles, and, for GPT-5.6 Luna, your account’s default Bedrock project. The policies below cover all of them for any Region. They also include two S3 permissions that are easy to miss:

  • s3:ListBucket, without a prefix condition. Without it, S3 answers a read of a session that is not stored yet with Access Denied instead of Not Found, and every new session’s first upload fails.
  • s3:DeleteObject only under deliver/. The processor deletes only the delivery notes it keeps for the webhook. Without a webhook, the permission is unused.

Create the bucket and the processor’s policy with Terraform, or create them another way and use the policy JSON:

  1. Terraform
  2. Policy JSON

Set retention_days to the number of days to keep transcripts, then attach aws_iam_policy.daemon_processor to the processor’s IAM role.

variable "bucket_name" {
  type = string
}

variable “retention_days” {
type = number
default = 7
}

data “aws_caller_identity” “current” {}

resource “aws_s3_bucket” “daemon_processor” {
bucket = var.bucket_name
}

resource “aws_s3_bucket_public_access_block” “daemon_processor” {
bucket = aws_s3_bucket.daemon_processor.id

block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}

resource “aws_s3_bucket_server_side_encryption_configuration” “daemon_processor” {
bucket = aws_s3_bucket.daemon_processor.id

rule {
bucket_key_enabled = true

apply_server_side_encryption_by_default {
sse_algorithm = “AES256”
}
}
}

# The processor’s retention. The processor refuses to start without it.
resource “aws_s3_bucket_lifecycle_configuration” “daemon_processor” {
bucket = aws_s3_bucket.daemon_processor.id

rule {
id = “daemon-processor-retention”
status = “Enabled”

# The whole bucket, so the rule also expires webhook delivery notes.
filter {}

expiration {
days = var.retention_days
}
}
}

data “aws_iam_policy_document” “daemon_processor” {
statement {
sid = “Sessions”
actions = [“s3:GetObject”, “s3:PutObject”]
resources = [“${aws_s3_bucket.daemon_processor.arn}/*”]
}

statement {
sid = “WebhookDeliveryNotes”
actions = [“s3:DeleteObject”]
resources = [“${aws_s3_bucket.daemon_processor.arn}/deliver/*”]
}

statement {
sid = “Bucket”
actions = [“s3:ListBucket”, “s3:GetLifecycleConfiguration”]
resources = [aws_s3_bucket.daemon_processor.arn]
}

statement {
sid = “InferenceProfiles”
actions = [“bedrock:InvokeModel”]
resources = [
“arn:aws:bedrock::${data.aws_caller_identity.current.account_id}:inference-profile/.openai.gpt-5.6-luna”,
“arn:aws:bedrock::${data.aws_caller_identity.current.account_id}:inference-profile/.anthropic.claude-haiku-4-5-20251001-v1:0”,
]
}

statement {
sid = “ModelsThroughInferenceProfiles”
actions = [“bedrock:InvokeModel”]
resources = [
“arn:aws:bedrock:::foundation-model/openai.gpt-5.6-luna",
"arn:aws:bedrock:::foundation-model/anthropic.claude-haiku-4-5-20251001-v1:0”,
“arn:aws:bedrock:::foundation-model/openai.gpt-5.6-luna”,
“arn:aws:bedrock:::foundation-model/anthropic.claude-haiku-4-5-20251001-v1:0”,
]

condition {
test = “StringLike”
variable = “bedrock:InferenceProfileArn”
values = [“arn:aws:bedrock::${data.aws_caller_identity.current.account_id}:inference-profile/”]
}
}

statement {
sid = “LunaDefaultProject”
actions = [“bedrock:InvokeModel”]
resources = [“arn:aws:bedrock:*:${data.aws_caller_identity.current.account_id}:project/default”]
}
}

resource “aws_iam_policy” “daemon_processor” {
name = “daemon-processor”
policy = data.aws_iam_policy_document.daemon_processor.json
}

Give the bucket a lifecycle rule like this one, which keeps transcripts for 7 days:

{
  "Rules": [
    {
      "ID": "daemon-processor-retention",
      "Status": "Enabled",
      "Filter": { "Prefix": "" },
      "Expiration": { "Days": 7 }
    }
  ]
}

Attach this policy to the processor’s IAM role. Replace BUCKET with the bucket name and ACCOUNT_ID with your AWS account ID:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Sessions",
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:PutObject"],
      "Resource": "arn:aws:s3:::BUCKET/*"
    },
    {
      "Sid": "WebhookDeliveryNotes",
      "Effect": "Allow",
      "Action": "s3:DeleteObject",
      "Resource": "arn:aws:s3:::BUCKET/deliver/*"
    },
    {
      "Sid": "Bucket",
      "Effect": "Allow",
      "Action": ["s3:ListBucket", "s3:GetLifecycleConfiguration"],
      "Resource": "arn:aws:s3:::BUCKET"
    },
    {
      "Sid": "InferenceProfiles",
      "Effect": "Allow",
      "Action": "bedrock:InvokeModel",
      "Resource": [
        "arn:aws:bedrock:*:ACCOUNT_ID:inference-profile/*.openai.gpt-5.6-luna",
        "arn:aws:bedrock:*:ACCOUNT_ID:inference-profile/*.anthropic.claude-haiku-4-5-20251001-v1:0"
      ]
    },
    {
      "Sid": "ModelsThroughInferenceProfiles",
      "Effect": "Allow",
      "Action": "bedrock:InvokeModel",
      "Resource": [
        "arn:aws:bedrock:*::foundation-model/openai.gpt-5.6-luna",
        "arn:aws:bedrock:*::foundation-model/anthropic.claude-haiku-4-5-20251001-v1:0",
        "arn:aws:bedrock:::foundation-model/openai.gpt-5.6-luna",
        "arn:aws:bedrock:::foundation-model/anthropic.claude-haiku-4-5-20251001-v1:0"
      ],
      "Condition": {
        "StringLike": {
          "bedrock:InferenceProfileArn": "arn:aws:bedrock:*:ACCOUNT_ID:inference-profile/*"
        }
      }
    },
    {
      "Sid": "LunaDefaultProject",
      "Effect": "Allow",
      "Action": "bedrock:InvokeModel",
      "Resource": "arn:aws:bedrock:*:ACCOUNT_ID:project/default"
    }
  ]
}

If service control policies in your organization block Regions, they must allow the destination Regions of your Region’s profiles. See geographic and global cross-Region inference for the requirements.

Deletion is S3’s. It does not securely erase data.

Step 3: Deploy the processor

The processor is published as a public image for linux/amd64 and linux/arm64:

ghcr.io/get-dx/daemon-processor:latest

latest follows the newest release. To pick up new releases when the processor restarts, have your platform pull the image on every start: imagePullPolicy: Always on Kubernetes, or docker run --pull always with Docker. Otherwise a node can keep running a cached older latest. To choose when to upgrade instead, pin a version tag from the package page. Your DX account team tells you before a release that needs changes on your side.

The container runs as UID and GID 65532 and serves plain HTTP on port 8080. GET /healthz returns ok while the process is up. It does not check DX, S3, or Bedrock. The processor shuts down within 10 seconds of SIGTERM; allow a longer grace period.

Environment variables

Variable Required Description
DATACLOUD_URL Yes Your DX instance URL, for example https://yourinstance.getdx.net.
DATACLOUD_KEY Yes The Data Cloud API key. Pass it from a secret store.
AWS_REGION Yes The Bedrock region, for example us-east-1.
STORAGE_BUCKET Yes The name of the bucket from Step 2: Create the bucket and permissions.
STORAGE_REGION No The bucket’s region, when it differs from AWS_REGION.
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY No Only when the processor has no IAM role, for example outside AWS.
WEBHOOK_URL No An HTTP or HTTPS endpoint that receives full transcripts, without credentials, a query, or a fragment. See Send transcripts to your own endpoint.
WEBHOOK_SECRET No Signs webhook requests. Requires WEBHOOK_URL.
LOG_LEVEL No debug, info, warn, or error. Defaults to info. debug adds a line for each model call, with its tokens, and each request to DX and your webhook.
LISTEN_ADDR No HTTP listen address. Defaults to :8080.

The processor exits at startup, naming what is missing, unless all required variables are set and the bucket has the lifecycle rule from Step 2. At startup it logs daemon-processor listening with the retention it read as retention_days.

The processor logs text to stderr. At every level, logs leave out transcripts, titles, emails, and URLs. Lines about one session name it by ai_tool and session_id.

On Amazon ECS, EKS, or EC2, give the processor an IAM role (an ECS task role, IAM roles for service accounts or Pod Identity, or an instance profile) with the policy from Step 2, and leave the AWS keys unset.

The processor does not check Bedrock access at startup, but it logs the inference profiles it calls as daemon-processor analysis models. Denied access or an unavailable model pauses analysis and logs processor analysis paused with the error until you fix it. These errors never cause the processor to give up on a session, but DX assigns analyses only for sessions uploaded in the last 7 days, and the lifecycle rule keeps deleting content, so a long misconfiguration loses those sessions’ analyses.

Until processor mode is on, DX refuses the processor’s requests, and the processor logs processor analysis poll failed; retrying every minute. This is expected.

Replicas and resources

The processor keeps no state of its own, so you can run as many replicas as you need behind a load balancer and replace them with rolling deployments. Give every replica the same configuration. Each replica runs one analysis at a time, and DX hands each analysis to one replica, so more replicas analyze more sessions without repeating each other’s work. If a replica stops before reporting an analysis, DX hands the analysis out again after 15 minutes.

Each replica works on up to 32 uploads at a time. Each upload holds its request body, up to 2 MiB, and two decoded copies of its session, which grow with the transcript, so size memory for your longest sessions.

Example Kubernetes deployment

Adapt this example to your cluster. It assumes the ingress-nginx controller with an ingress class that is reachable only from your network, an existing TLS secret, and a service account bound to an IAM role with the policy from Step 2.

kubectl create secret generic daemon-processor \
  --from-literal=datacloud-key="$DX_DATACLOUD_API_KEY"
apiVersion: v1
kind: Service
metadata:
  name: daemon-processor
spec:
  selector:
    app: daemon-processor
  ports:
    - name: http
      port: 80
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: daemon-processor
spec:
  replicas: 2
  selector:
    matchLabels:
      app: daemon-processor
  template:
    metadata:
      labels:
        app: daemon-processor
    spec:
      serviceAccountName: daemon-processor # Bound to an IAM role with the policy from Step 2.
      terminationGracePeriodSeconds: 30
      containers:
        - name: daemon-processor
          image: ghcr.io/get-dx/daemon-processor:latest
          imagePullPolicy: Always # Kubernetes keeps an earlier default when only the tag changes.
          ports:
            - name: http
              containerPort: 8080
          env:
            - name: DATACLOUD_URL
              value: https://yourinstance.getdx.net
            - name: DATACLOUD_KEY
              valueFrom:
                secretKeyRef:
                  name: daemon-processor
                  key: datacloud-key
            - name: AWS_REGION
              value: us-east-1
            - name: STORAGE_BUCKET
              value: your-processor-bucket
          readinessProbe:
            httpGet:
              path: /healthz
              port: http
          livenessProbe:
            httpGet:
              path: /healthz
              port: http
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: daemon-processor
  annotations:
    # Laptops send request bodies of up to 2 MiB; ingress-nginx allows 1 MiB by default.
    nginx.ingress.kubernetes.io/proxy-body-size: "32m"
spec:
  ingressClassName: internal-nginx # Reachable only from your network.
  tls:
    - hosts:
        - ai-processor.internal.example.com
      secretName: daemon-processor-tls
  rules:
    - host: ai-processor.internal.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: daemon-processor
                port:
                  name: http

Step 4: Expose the processor to developer laptops

Every developer laptop connects to the processor, so the processor needs inbound access from your developer network, unlike the daemon’s outbound-only connections to DX. Before you configure laptops, confirm each item:

  • Internal only. The upload endpoint does not authenticate uploaders. Anyone who can reach it can submit sessions under any developer identity. Never expose it to the internet.
  • HTTPS at the ingress or load balancer, forwarding plain HTTP to port 8080. The daemon uses the operating system’s trusted certificates, so a certificate from your organization’s certificate authority works on laptops that trust it.
  • The processor at the root of its hostname. processor_url is an origin, such as https://ai-processor.internal.example.com, and cannot include a path, so the processor cannot share a hostname under a path prefix.
  • Request bodies of at least 2 MiB through every proxy and load balancer. A proxy that rejects a body with HTTP 400, 413, or 415 causes the laptop to discard that part of the session.
  • No redirects. Laptops do not follow redirects, so serve the processor directly at processor_url.
  • Reachable on every network path developers use: office, VPN, and remote access.
  • Outbound access from the processor to your DX instance URL, to Amazon S3 in the bucket’s Region, to Amazon Bedrock in AWS_REGION, and to your webhook, if you set one.

From a developer laptop, confirm that DNS, TLS, and routing work:

curl https://ai-processor.internal.example.com/healthz

The command prints ok. Repeat it from each network path.

The processor acknowledges an upload only after S3 has its content and DX has its metadata. While the processor, DX, or S3 is unreachable, laptops keep sessions in a local queue of up to 256 MiB and retry. They never fall back to uploading transcripts to DX. Once the queue is full, new session updates are dropped until the processor accepts queued ones.

Step 5: Configure laptops

Deliver processor_url through the same channel as your other AI Code Insights settings. Managed values on macOS and Windows take priority over the config file unless the developer sets prefer_local_config.

  1. macOS
  2. Windows
  3. Linux

Add the key to the com.getdx.aicodemetrics payload of your Configuration Profile:

<key>processor_url</key>
<string>https://ai-processor.internal.example.com</string>

Deliver processor_url as REG_SZ under HKLM\SOFTWARE\GetDX\AICodeMetrics.

Add processor_url to ~/.aicodemetrics/config.json:

{
  "api_url": "API_URL",
  "api_key": "API_TOKEN",
  "email": "developer@example.com",
  "processor_url": "https://ai-processor.internal.example.com"
}

The value must be an HTTPS origin with no path, query, or fragment. Daemon 0.7.7 and later stop monitoring while processor_url is invalid and log Waiting for valid URL configuration. Deliver it to a few laptops and check them before rolling it out widely.

Deliver processor_url only after the processor is deployed. Before processor mode is on, daemons 0.7.8 and later upload sessions to DX while DX reports processor mode off. When a daemon cannot tell yet, such as right after a startup without cached settings, it queues sessions for the processor instead, and those sessions wait on the laptop until processor mode is on. Older daemons never send sessions to the processor.

The daemon reads processor_url at startup. Restart the daemon or wait for its next restart, such as an automatic update or a reboot. Then run aicodemetricsd status. Under Session processor, Configured URL shows your processor URL followed by configured but inactive. On daemon 0.7.9 and later, Reachability confirms that the laptop reaches the processor’s /healthz. status reads the current configuration rather than the running daemon’s, so restart the daemon before relying on it.

Step 6: Turn on processor mode

When aicodemetricsd status on your pilot laptops shows the processor URL as configured but inactive, ask DX to turn on processor mode for your organization. Processor mode applies to every laptop in the organization.

Daemons pick up the change when they refresh DX settings, at startup and hourly, without a restart. Configured URL then shows active, and new sessions appear in DX with summaries and evaluations from the processor within about an hour of going idle. To confirm the setup, end a test session on a routed laptop and check that the processor logs processor analysis reported within the hour.

After processor mode is on, each laptop’s sessions follow its daemon version and configuration:

Daemon processor_url Session uploads
0.7.8 or later Set Sent to the processor.
0.7.8 or later Not set Held in a local queue of up to 256 MiB until processor_url is configured and the daemon restarts. status reports a failure.
Older than 0.7.8 Either Uploaded to DX, which discards message content. These sessions are not summarized or evaluated.

Laptops routed to the processor send it scrubbed transcripts and titles regardless of the Transcripts & Agent Experience setting in DX. While processor mode is on, DX stores scrubbed session titles, as it does without the processor, but no message content, whatever that setting says. Keep the setting on: the DX reports that show the processor’s summaries and evaluations, such as Agent Sessions and Agent Experience, require it.

If DX turns processor mode off, laptops return to uploading sessions to DX within an hour. Sessions already queued for the processor stay queued on laptops, because DX refuses the processor’s requests while processor mode is off, so the processor cannot accept them.

Send transcripts to your own endpoint

With WEBHOOK_URL set, the processor also sends each session that laptops upload, including titles and message content, to that URL. Setting WEBHOOK_URL does not send sessions stored before it was set. Apart from your bucket and your Bedrock account, this is the only place transcript content goes; DX still receives only metadata and analysis results. Without WEBHOOK_URL, the processor sends transcripts nowhere.

Every 15 seconds, the processor sends each session uploaded since its last delivery again in full, as POST requests in the same JSON and chunk sizes the daemon uploads: at most 50 messages and 500 tool usages per request, each with the session’s metadata.

{
  "external_id": "...",
  "parent_session_external_id": "...",
  "ai_tool": "claude_code",
  "ai_tool_version": "...",
  "ai_model": "...",
  "started_at": "2026-10-01T10:00:00Z",
  "title": "...",
  "user_email": "...",
  "directory": "...",
  "daemon_version": "...",
  "daemon_os": "darwin",
  "machine_name": "...",
  "generate_summary": false,
  "messages": [
    {
      "external_id": "...",
      "timestamp": "...",
      "role": "user",
      "content": "...",
      "model": "...",
      "tokens_input": 0,
      "tokens_cached_input": 0,
      "tokens_output": 0
    }
  ],
  "tool_usages": [
    {
      "external_id": "...",
      "tool_name": "...",
      "tool_type": "...",
      "targets": [{ "type": "...", "name": "...", "namespace": "..." }],
      "started_at": "...",
      "completed_at": "...",
      "duration_ms": 12,
      "status": "...",
      "model": "..."
    }
  ]
}

Content is what laptops upload, already scrubbed on the laptop. The Transcripts & Agent Experience setting in DX does not apply to webhook content. Fields without a value are omitted, and generate_summary is always false.

  • Respond with a 2xx status within 30 seconds to accept a chunk. The processor does not follow redirects. A session counts as delivered once all its chunks are accepted.
  • Expect duplicates. Delivery is at least once. The processor sends a session again in full after any failure and after every upload of it, changed or not, and replicas can deliver the same session at once. Identify a session by its ai_tool and external_id together, since different tools can use the same ID. Merge its records by each record’s external_id; the latest copy wins.
  • Failures are retried every 15 seconds. HTTP 400, 413, 415, or 422 skips that session until the next pass; any other failure stops the pass. A slow or unavailable webhook never affects laptop uploads, metadata sent to DX, or analysis.
  • Verify signatures. With WEBHOOK_SECRET, each request has X-DX-Timestamp (Unix seconds) and X-DX-Signature: sha256=<hex>, the HMAC-SHA256 of the timestamp, a ., and the raw body, keyed by the secret. Compare it in constant time and reject old timestamps.
  • Retention. The lifecycle rule deletes a session that has gone the retention without an upload, along with its pending delivery, so a webhook that is down for longer never receives that session. The copies your endpoint receives are yours, and the bucket’s lifecycle rule does not cover them.

Next steps