Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(aio): run the ai ingestion pipeline in local dev on a dedicated topic (#72323)

Carlos Marchalc23e0673a851
diff --git a/bin/mprocs.yaml b/bin/mprocs.yaml
index 8f9942182e9f..e2704523b6e9 100755
--- a/bin/mprocs.yaml
+++ b/bin/mprocs.yaml
@@ -113,6 +113,27 @@ procs:
layer: Ingestion pipeline
tech: Node
+ ingestion-ai:
+ sandbox: true
+ shell: 'bin/wait-for-docker && PLUGIN_SERVER_MODE=ingestion-v2 INGESTION_PIPELINE=ai HTTP_SERVER_PORT=6746 ./bin/posthog-node'
+ capability: ai_capture
+ ready_pattern: 'All systems go'
+ groups:
+ layer: Ingestion pipeline
+ tech: Node
+ env:
+ INGESTION_CONSUMER_CONSUME_TOPIC: ai_events_ingestion
+ INGESTION_CONSUMER_GROUP_ID: ingestion-ai
+ PERSONHOG_ENABLED: 'true'
+ PERSONHOG_ADDR: '127.0.0.1:50052'
+ AI_BLOB_S3_BUCKET: ai-blobs
+ AI_BLOB_S3_PREFIX: 'aio/'
+ AI_BLOB_S3_ENDPOINT: 'http://localhost:19000'
+ AI_BLOB_S3_REGION: us-east-1
+ AI_BLOB_S3_ACCESS_KEY_ID: object_storage_root_user
+ AI_BLOB_S3_SECRET_ACCESS_KEY: object_storage_root_password
+ AI_BLOB_OFFLOAD_TEAMS: '1'
+
ingestion:
sandbox: true
shell: 'bin/wait-for-docker && PLUGIN_SERVER_MODE=ingestion-v2-combined HTTP_SERVER_PORT=6739 ./bin/posthog-node'
diff --git a/bin/start-rust-service b/bin/start-rust-service
index 8e79919186cf..04a89076ba8a 100755
--- a/bin/start-rust-service
+++ b/bin/start-rust-service
@@ -93,6 +93,7 @@ case "$RS_SVC" in
export RUST_BACKTRACE=1
export ADDRESS=0.0.0.0:3309 # avoid port conflict in local dev (3308 is used by llm-gateway)
export KAFKA_HOSTS="$DEFAULT_KAFKA"
+ export KAFKA_TOPIC=ai_events_ingestion
export REDIS_URL="$DEFAULT_REDIS"
export DATABASE_URL="${DATABASE_URL:-$DEFAULT_PG}"
export CAPTURE_MODE=events
diff --git a/devenv/intent-map.yaml b/devenv/intent-map.yaml
index 64041627b28c..fe8b0128a517 100644
--- a/devenv/intent-map.yaml
+++ b/devenv/intent-map.yaml
@@ -100,7 +100,7 @@ capabilities:
ai_capture:
description: 'AI event capture service'
- requires: [event_ingestion, llm_gateway]
+ requires: [event_ingestion, llm_gateway, personhog]
docker_profiles: []
embedding_service:
diff --git a/docker-compose.base.yml b/docker-compose.base.yml
index 2a2c10aa501b..0365651f4bff 100644
--- a/docker-compose.base.yml
+++ b/docker-compose.base.yml
@@ -400,7 +400,7 @@ services:
restart: on-failure
environment:
ADDRESS: '0.0.0.0:3000'
- KAFKA_TOPIC: 'events_plugin_ingestion'
+ KAFKA_TOPIC: 'ai_events_ingestion'
KAFKA_HOSTS: 'kafka:9092'
REDIS_URL: 'redis://redis7:6379/'
CAPTURE_MODE: events