Skip to content

Incremental engine for long horizon agents 🌟 Star if you like it!

1.1 KB
Raw Blame
{
  "alt": "Rows of data/products.csv (SKU001 to SKU005) become JSON messages on the Kafka topic cocoindex-csv-rows, keyed by the first column; editing the SKU003 row in live mode produces only a new SKU003 message, and rpk topic consume shows each message's key and JSON value.",
  "needs": ["Docker (for a local Redpanda broker)", "Python 3.11+"],
  "run": [
    { "note": "Start a Kafka-compatible broker", "cmd": "docker run -d --name redpanda -p 9092:9092 redpandadata/redpanda:latest redpanda start --mode dev-container --smp 1 --kafka-addr PLAINTEXT://0.0.0.0:9092 --advertise-kafka-addr PLAINTEXT://localhost:9092" },
    { "note": "Create the topic (CocoIndex never creates topics)", "cmd": "docker exec redpanda rpk topic create cocoindex-csv-rows" },
    { "note": "Configure and install", "cmd": "cp .env.example .env && pip install -e ." },
    { "note": "Produce every row, then keep watching ./data", "cmd": "cocoindex update -L main.py" },
    { "note": "In another terminal, read the topic", "cmd": "docker exec redpanda rpk topic consume cocoindex-csv-rows --num 10" }
  ]
}