<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Oscar Romero]]></title><description><![CDATA[Notes on taking AI agents from demo to production: data pipelines, observability and context. Originals on https://ctxflow.sh/blog/]]></description><link>https://oromll.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 20:09:04 GMT</lastBuildDate><atom:link href="https://oromll.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Data Pipeline Monitoring for AI Agents: ctxflow 0.3]]></title><description><![CDATA[Monitor the data pipelines that feed your AI agent: runs, steps, provenance from source to answer, data-side health and a traces explorer.]]></description><link>https://oromll.hashnode.dev/data-pipeline-monitoring-for-ai-agents-ctxflow-0-3</link><guid isPermaLink="true">https://oromll.hashnode.dev/data-pipeline-monitoring-for-ai-agents-ctxflow-0-3</guid><category><![CDATA[ai agents]]></category><category><![CDATA[RAG ]]></category><category><![CDATA[OpenTelemetry]]></category><category><![CDATA[data-engineering]]></category><dc:creator><![CDATA[Oscar Romero]]></dc:creator><pubDate>Sat, 05 Dec 2026 11:55:16 GMT</pubDate><content:encoded><![CDATA[<p><strong>Your agent gave a wrong answer. Was it the model, or the data pipeline that fed it?</strong> Until today, ctxflow could tell you what the agent retrieved and whether that context was current. With ctxflow 0.3, released on 4 December 2026, it also monitors the data pipelines behind it: the ingestion that fills a retrieval index, the ETL or sync job that writes the records your tools read, or any other job that produces data an agent uses. You mark the blocks of a pipeline with two calls, <code>pipeline()</code> and <code>step()</code>, and ctxflow shows each run, each step and each failed input. From any chunk or record a turn received, it walks back through the steps to the source. From any source, it walks forward to the turns that received what came from it.</p>
<p>This post covers what is new in 0.3 only: pipelines in the Python, JavaScript and PHP SDKs, provenance, the Pipelines view, the health figures of the data side, the Traces explorer with an execution timeline, and the links between views. At the end there is a short list of smaller changes and the upgrade notes.</p>
<h2>Key takeaways</h2>
<ul>
<li><strong>Two calls instrument a pipeline:</strong> <code>pipeline()</code> names a run, <code>step()</code> records one unit of work with the artifacts that go in and come out. Same behaviour in Python, JavaScript and PHP, with any job library.</li>
<li><strong>Any pipeline behind an agent:</strong> document ingestion for RAG, ETL and sync jobs that write records, embedding refreshes, scheduled jobs. If it produces data an agent reads, you can mark it.</li>
<li><strong>Provenance in both directions:</strong> from a chunk or record a turn received back to its source, and from a source forward to every turn that received what came from it.</li>
<li><strong>A Pipelines view:</strong> runs, steps, counts by artifact kind, failed steps, inputs that did not get through, and the turns and calls inside each step.</li>
<li><strong>Health covers the data side:</strong> OTLP ingest, pipeline runs and failures, new artifact versions and index writes, and turns with stale context. A figure with no signal says so, never a false zero.</li>
<li><strong>Raw spans are one click away:</strong> a Traces explorer and an execution timeline sit under every turn, tool call and step.</li>
</ul>
<h2>Why monitor the pipeline and not only the agent?</h2>
<p><strong>Because a large share of wrong answers start before the agent runs.</strong> A document was updated but the job that re-chunks it failed. A step dropped half of the pages. The index got the new embeddings, but the old chunks were never deleted. The nightly sync that copies orders from the ERP stopped at midnight, so a tool reads yesterday's status. The agent then reads what is there and answers with confidence.</p>
<p>In the trace of the agent, all of this is invisible. You see a retrieval span with some chunk ids and scores, or a tool call that read a record. You do not see which run wrote that data, which step produced it, or whether that run failed halfway. So the investigation stops at the prompt, and the team changes the prompt. I wrote about this failure in <a href="https://ctxflow.sh/blog/stale-context-in-rag/">stale context in RAG</a>: the answer looks correct, the retrieval looks correct, and the content is old.</p>
<p><strong>Pipeline monitoring closes that gap.</strong> It records the write side of the data your agent uses with the same care as the read side: every run of your pipelines, every step in it, what each step took in and what it produced. Then it joins the two sides on the same ids. A chunk that a step wrote and a chunk that a turn retrieved are the same artifact; a record that a sync job wrote and a record that a tool read are the same record.</p>
<p>For a RAG system, this is the first stage of <a href="https://ctxflow.sh/rag-observability/">RAG observability</a>, which covers the whole path from ingest to index to retrieval to the answer. Version 0.3 is the release where ctxflow covers that stage, and every other pipeline, with real data, not only with the <code>ingest.*</code> spans of a few parsers.</p>
<p>There is a well-known word for this. The W3C defines provenance as "information about entities, activities, and people involved in producing a piece of data or thing, which can be used to form assessments about its quality, reliability or trustworthiness" (<a href="https://www.w3.org/TR/prov-overview/">W3C PROV Overview</a>). For an AI agent, the "thing" is the context it received, and the assessment you want is simple: can I trust this answer?</p>
<h2>Which pipelines can you monitor?</h2>
<p><strong>Any pipeline that produces data an agent reads.</strong> <code>pipeline()</code> and <code>step()</code> are not tied to documents or vector stores. A step declares artifacts of any kind, so the same two calls cover very different jobs:</p>
<table>
<thead>
<tr>
<th>Pipeline</th>
<th>Typical steps</th>
<th>What the agent reads</th>
</tr>
</thead>
<tbody><tr>
<td>Document ingestion (RAG)</td>
<td>partition, chunk, embed, index-write</td>
<td>Chunks from a vector index</td>
</tr>
<tr>
<td>ETL or sync job</td>
<td>extract, transform, load</td>
<td>Records that a tool reads from a database or an API</td>
</tr>
<tr>
<td>Embedding refresh</td>
<td>select stale, re-embed, upsert</td>
<td>Chunks with new embeddings</td>
</tr>
<tr>
<td>Scheduled report or summary</td>
<td>collect, summarize, publish</td>
<td>A generated document</td>
</tr>
<tr>
<td>Multi-step job with an agent inside</td>
<td>fetch, classify with an LLM, store</td>
<td>Whatever the job stores; the turns of the agent appear inside the step</td>
</tr>
</tbody></table>
<p>The example in this post is document ingestion, because it is the easiest to show in one screenshot. For records, the <a href="https://docs.ctxflow.sh/instrument/retrieval/">records guide</a> explains how a tool declares the records it read and a job the records it wrote; with both, a record read is judged current or stale by version, and the Records page links each record to the pipeline runs that touched it.</p>
<h2>How do you monitor a RAG ingestion pipeline?</h2>
<p><strong>Mark each stage of the RAG ingestion pipeline as a step, and give the chunks the same ids your retrieval spans use.</strong> RAG pipeline monitoring is the most common use of 0.3, so here is what it covers stage by stage:</p>
<table>
<thead>
<tr>
<th>Stage of the RAG pipeline</th>
<th>What can go wrong</th>
<th>What ctxflow shows</th>
</tr>
</thead>
<tbody><tr>
<td>Parse or partition</td>
<td>A file fails to parse, or a page is lost</td>
<td>The failed step, and the document as an input not through</td>
</tr>
<tr>
<td>Chunk</td>
<td>The chunker version changed, so chunk ids changed</td>
<td><code>1 document → N chunks</code> per run, with deterministic chunk ids</td>
</tr>
<tr>
<td>Embed</td>
<td>The embedding call fails for part of a batch</td>
<td>A failed step with no output; the chunks that never got an embedding</td>
</tr>
<tr>
<td>Index write</td>
<td>New chunks are written, old ones are never deleted</td>
<td>Index writes and deletes per run; old chunks stay visible as an older version</td>
</tr>
<tr>
<td>Retrieval (agent side)</td>
<td>The agent retrieves chunks of a replaced version</td>
<td>Stale context on the turn, and a link back to the run that wrote those chunks</td>
</tr>
</tbody></table>
<p>The last row is where the two sides meet. Retrieval monitoring alone tells you a chunk was retrieved with a good score. RAG pipeline monitoring tells you which document version that chunk came from, which run wrote it, and whether a newer version exists. The <a href="https://ctxflow.sh/blog/stale-context-in-rag/">stale context in RAG</a> post explains the freshness check in detail, and the <a href="https://ctxflow.sh/rag-observability/">RAG observability</a> page covers the whole path from ingest to answer.</p>
<h2>How do you mark a pipeline with the SDK?</h2>
<p><strong>Wrap a run in <code>pipeline()</code> and each unit of work in <code>step()</code>, and declare the artifacts each step takes in and produces.</strong> You need version 0.3.0 of the SDK. The helpers are in <code>ctxflow-otel</code> (PyPI), <code>@ctxflow/otel</code> (npm) and <code>ctxflow/otel</code> (Packagist), with the same output in each language.</p>
<p>The two calls do different things:</p>
<table>
<thead>
<tr>
<th>Call</th>
<th>What it creates</th>
</tr>
</thead>
<tbody><tr>
<td><code>pipeline(id, name, parent)</code></td>
<td><strong>No span.</strong> It puts the pipeline id, name and parent in the OpenTelemetry baggage for the block, so every span inside carries them, also in other services.</td>
</tr>
<tr>
<td><code>step(name, inputs)</code></td>
<td>One span <code>step &lt;name&gt;</code>. The inputs go on it when it starts; the outputs, and what each output derives from, go on it when it ends, also when the step fails.</td>
</tr>
</tbody></table>
<p>Here is a small document ingestion in Python. It splits one document into chunks and says which chunk came from which document:</p>
<pre><code class="language-python">from ctxflow_otel import artifact, chunk_id, pipeline, step

with pipeline("sync-2026-12-04", name="document-ingestion"):
    doc = artifact("document", "onboarding-runbook.md", hash="v3")
    with step("chunk", inputs=[doc]) as s:
        for i, text in enumerate(split(doc)):
            s.output(
                artifact("chunk", chunk_id("onboarding-runbook.md", "v3", "splitter-1", i)),
                derived_from=[doc],
            )
</code></pre>
<p>The same block in JavaScript:</p>
<pre><code class="language-ts">import { artifact, chunkId, pipeline, step } from "@ctxflow/otel";

await pipeline("sync-2026-12-04", { name: "document-ingestion" }, async () =&gt; {
  const doc = artifact("document", "onboarding-runbook.md", "v3");
  await step("chunk", { inputs: [doc] }, async (s) =&gt; {
    s.output(artifact("chunk", chunkId("onboarding-runbook.md", "v3", "splitter-1", 0)), {
      derivedFrom: [doc],
    });
  });
});
</code></pre>
<p>And in PHP:</p>
<pre><code class="language-php">use function Ctxflow\Otel\{artifact, chunkId, pipeline, step};

pipeline(function () {
    $doc = artifact('document', 'onboarding-runbook.md', 'v3');
    step(function ($s) use ($doc) {
        $s-&gt;output(artifact('chunk', chunkId('onboarding-runbook.md', 'v3', 'splitter-1', 0)), [$doc]);
    }, 'chunk', [$doc]);
}, 'sync-2026-12-04', 'document-ingestion');
</code></pre>
<h3>Does it work with my job runner?</h3>
<p><strong>Yes. The SDK does not wrap a job library; it marks blocks of your own code.</strong> Celery, a cron script, a queue worker, a Laravel job or a serverless function all work the same way. To follow a job across processes, put the pipeline id in the job payload and open <code>pipeline(id)</code> again in the worker. For a child run, pass <code>parent</code>. The SDK does not count retries: give it the attempt number of your runner, for example Celery's <code>request.retries + 1</code>.</p>
<h3>What can a step take in and produce?</h3>
<p><strong>Artifacts you declare, or plain values.</strong> An artifact has a kind (<code>document</code>, <code>chunk</code>, <code>embedding</code>, <code>record</code>, or your own), an id and an optional version hash. Use the same ids as your retrieval spans and tool calls, so the write side and the read side meet. Plain values work too: short text is kept as it is, text of more than 256 characters is identified by its content hash, and bytes by their source hash. The text itself never leaves.</p>
<p>When a step splits, merges or filters, declare <code>derived_from</code> for each output. ctxflow then computes which inputs a step dropped on purpose. One step can list up to 2000 entries; past that, the SDK leaves out the rest, marks the step as truncated and logs one warning. It never raises an error in your job. The <a href="https://docs.ctxflow.sh/instrument/pipelines/">pipelines instrumentation guide</a> has every argument and rule.</p>
<h2>What is provenance from source to answer?</h2>
<p><strong>Provenance is the chain from a source, through the steps that processed it, to the turns of your agent that received what came out.</strong> In ctxflow 0.3 you can walk that chain in both directions.</p>
<ul>
<li><strong>Backward, from an answer.</strong> Open a turn, select a chunk or a record the agent received, and ask where it came from. ctxflow walks back through the steps that produced it (for a chunk: embed, chunk, partition) to the source and its version.</li>
<li><strong>Forward, from a source.</strong> Open a document or any artifact, and ask what came of it. ctxflow walks forward through the steps to every turn that received something derived from it.</li>
</ul>
<p><img src="https://ctxflow.sh/_astro/v03-pipeline-run-graph.BetvDA8Q_1LIwrq.webp" alt="A pipeline run in the ctxflow app, with demo data: the document Northwind Onboarding Runbook v3 goes into the chunk step, which makes three chunks; the chunks go into embed and index-write, and the graph ends at Turns 1 to 4, which received them" /></p>
<p>The screenshot comes from a demo app, "Northwind Ops Copilot", for a fictional company. The run <code>document-ingestion</code> took version 3 of an onboarding runbook, made three chunks, embedded them and wrote them to the index. Four turns later received those chunks. If one of those turns gave a wrong answer, this graph tells you in one view which document version it came from and which run put it in the index.</p>
<h3>Why is the graph bounded?</h3>
<p><strong>Because a graph of a real pipeline does not fit on a screen.</strong> One document can produce hundreds of chunks, one sync can write thousands of records, and one chunk can reach thousands of turns. ctxflow shows at most 40 nodes. Groups of more than six siblings are folded, and the graph says what it left out. You open a folded group when you need it.</p>
<p>Line styles carry meaning too. A solid line is a link your code declared. A dashed line is a link ctxflow matched by id. A dotted line is a link it could not observe. A state is always an icon plus a word, never a colour alone.</p>
<h3>What happens when a step fails?</h3>
<p><strong>A failed step is a failed step, with no output.</strong> ctxflow does not guess what it would have produced. The inputs that a failed step took, and that no later retry took, are listed as <strong>inputs not through</strong>. That is often the answer to "why does the agent not know about the new policy": the document was read, the chunk step failed, and nobody retried it.</p>
<h2>What does the Pipelines view show?</h2>
<p><strong>Every run of your pipelines, with its steps, its status and what it made.</strong> A run is either declared (your code opened <code>pipeline()</code>) or a run of a trace (steps found in a trace with no declared pipeline). Each row shows the start, the duration, the number of steps and a status: <code>ok</code>, <code>N failed</code> or <code>open</code>.</p>
<p><img src="https://ctxflow.sh/_astro/v03-pipeline-steps.CADFGfAG_Z10SIT4.webp" alt="The steps of a pipeline run in ctxflow, with demo data: partition makes 1 document, chunk turns 1 document into 3 chunks, embed turns 3 chunks into 3 embedded chunks, and index-write writes 3 chunks, each with its start time and duration" /></p>
<p>Open a run and you see its steps in three views: by step name, by worker (<code>service.name</code>) or by time. Each step shows its flow as counts by kind, such as <code>1 document → 3 chunks</code>, its duration, its attempt and whether a later attempt replaced it. Open a step to read:</p>
<ul>
<li>its inputs and outputs by artifact kind, and the worker that wrote them;</li>
<li>the inputs that did not get through, with their versions;</li>
<li>the <strong>turns</strong> of any agent that ran inside the step;</li>
<li>the <strong>calls</strong> inside the step: HTTP, database and MCP, each marked read or write;</li>
<li>a link to the span of the step.</li>
</ul>
<p>You can search runs by name or id and filter by pipeline, worker, step, artifact and status. All filters are in the URL, so a filtered list can be shared in a ticket. <strong>Group by</strong> puts runs together by pipeline, worker, status or day, with the failed runs and the runs with inputs not through counted per group.</p>
<p>One change follows from this. The App calls page used to list every HTTP and database call of a trace with no agent turn. Calls that run inside a step now live in that step, so App calls shows only the calls that belong to no pipeline. The <a href="https://docs.ctxflow.sh/product/pipelines/">Pipelines page in the docs</a> describes each part of the view.</p>
<h2>Which health figures cover the data side?</h2>
<p><strong>Health is now the entry page of an environment, and it has four groups for the data side: OTLP ingest, Pipelines, Artifacts and Context freshness.</strong> Each figure links to the view that explains it, with the time range kept.</p>
<p><img src="https://ctxflow.sh/_astro/v03-health-data-side.BMRYXlfz_XAwmD.webp" alt="The data side of Health in ctxflow, with demo data: Pipelines shows 18 runs, 0 % failed, 0 inputs not through and a 3 s median run duration; Artifacts shows 89 new artifacts, 103 new versions, 11 documents updated and 15 index writes; Context freshness shows 43 % of turns with stale context, 12 of 28" /></p>
<table>
<thead>
<tr>
<th>Group</th>
<th>Figures</th>
<th>Opens</th>
</tr>
</thead>
<tbody><tr>
<td><strong>OTLP ingest</strong></td>
<td>Spans received, last agent data, last ingestion data</td>
<td>Data received</td>
</tr>
<tr>
<td><strong>Pipelines</strong></td>
<td>Runs, failed runs, inputs not through, run duration (median and p95)</td>
<td>Pipelines, filtered</td>
</tr>
<tr>
<td><strong>Artifacts</strong></td>
<td>New artifacts and versions, documents updated, index writes</td>
<td>Documents and Index</td>
</tr>
<tr>
<td><strong>Context freshness</strong></td>
<td>Turns with stale context</td>
<td>Conversations filtered by stale context</td>
</tr>
</tbody></table>
<p>The last row is the one that connects both sides. In the demo above, 12 of 28 turns received stale context: chunks from a document version that had already been replaced. The figure links to those conversations, and from each turn the provenance graph shows which run wrote the old chunks.</p>
<p><strong>A figure with no signal says so.</strong> If no pipeline step ever arrived, the Pipelines group does not show "0 failed runs". It says that pipelines are not instrumented in this environment and points to the guide. A dashboard that shows a clean zero when it simply has no data is worse than no dashboard, and that rule holds for every figure ctxflow shows.</p>
<h2>How do you explore raw traces and spans?</h2>
<p><strong>With the new Traces view and the execution timeline on each trace page.</strong> Sometimes you need the raw spans, not the derived turns and runs: to check what an instrumentation sent, or to find the slow call in a long turn.</p>
<p>The <strong>Traces explorer</strong> has two flat lists, traces and spans. You can filter by service, status, text, trace id, span id and received time, sort in both directions, and page with a cursor. Trace rows show their span and error counts. On a phone, the lists become cards with a filter sheet.</p>
<p>The <strong>execution timeline</strong> draws each span of a trace as a bar on a time axis (a Gantt chart), above the span tree. Selecting a row selects the span in the tree, shows its metadata and updates the URL, so you can share a link to one span.</p>
<p><img src="https://ctxflow.sh/_astro/v03-traces-gantt.CqzSLOAt_170Vr7.webp" alt="The execution timeline of an agent turn in ctxflow, with demo data: POST /api/chat takes 5.98 s; inside it, four model calls of 0.9 to 1.7 s each, two retrieval spans of about 15 ms and an MCP tools/call list_documents of 5 ms" /></p>
<p>This turn of the demo agent took six seconds. The timeline shows where they went: almost all of it in four model calls. The two retrievals took about 15 ms each, and the MCP tool call took 5 ms. A span with zero duration is drawn as a marker. A span without a valid start and end is listed as "No timing" and never drawn, so the chart never invents a position. The <a href="https://docs.ctxflow.sh/product/traces/">Traces page in the docs</a> covers the filters and the timeline.</p>
<h2>How do the views link to each other?</h2>
<p><strong>Every derived item links to the span it came from, and every trace links back to the items it produced.</strong> In practice:</p>
<ul>
<li>Each turn, tool call, model call, HTTP call, database call, MCP call and pipeline step has a link to its received span in Traces.</li>
<li>The trace page links back to the turns and the pipeline runs of its spans.</li>
<li>Tools opens the turn on the exact call. Users link between Tools and Conversations.</li>
<li>Sources link to their conversations. Records link to the pipeline runs that touched them. Steps link to the other runs of their worker.</li>
<li>Data received links to Traces.</li>
</ul>
<p>A link to a span opens it also in a trace with more than 1,000 spans. The result is that an investigation does not stop at a page boundary. You can go from a wrong answer to the turn, from the turn to the chunk, from the chunk to the step that wrote it, from the step to its span, and from the span to the run that failed. The <a href="https://ctxflow.sh/solutions/investigate-wrong-answers/">runbook to investigate a wrong answer</a> follows exactly that path.</p>
<h2>What else changed in 0.3?</h2>
<p><strong>Smaller additions in the SDKs and the app:</strong></p>
<ul>
<li><strong><code>agent_turn</code> in three SDKs.</strong> <code>agent_turn</code> (Python), <code>agentTurn</code> (JavaScript) and <code>agentTurn()</code> (PHP) run a block as one <code>invoke_agent &lt;agent&gt;</code> span, with the same output in each language.</li>
<li><strong><code>chunk_id</code> in JavaScript and PHP.</strong> The deterministic chunk id (<code>chunkId</code>) now gives the same output as the Python <code>chunk_id</code>, so a mixed pipeline produces matching ids.</li>
<li><strong>Deleted chunks in Python.</strong> <code>ingest.delete_span</code> records the chunks a pipeline removed from the index.</li>
<li><strong>Readable names.</strong> A conversation and a document are named by the title the SDK declares, when there is one, and each source has one readable version label.</li>
<li><strong>Stable links.</strong> Conversations and turns have links that stay the same after ctxflow derives the data again. Old links redirect while the id exists.</li>
<li><strong>Freshness at the 1 ms floor.</strong> Freshness compares the read time at the 1 ms precision of OpenTelemetry timestamps, write first on ties. A read right after a write in the same process is no longer judged against the old version.</li>
</ul>
<p>The full list, including API changes, is in the <a href="https://docs.ctxflow.sh/reference/changelogs/">product changelog</a> and in the <a href="https://github.com/ctxflow-sh/ctxflow-edge/releases/tag/v0.3.0">v0.3.0 release of the SDKs</a>.</p>
<h2>How do you upgrade to 0.3?</h2>
<p><strong>Update the receiver first, then the SDKs, then every service that opens a pipeline or runs a step.</strong></p>
<ol>
<li><strong>Receiver first.</strong> If you run the optional collector, update it before the SDKs. A receiver on older semantic conventions drops the <code>ctxflow.pipeline.*</code> and <code>ctxflow.step.*</code> keys.</li>
<li><strong>SDKs next.</strong> Install <code>ctxflow-otel</code> 0.3.0, <code>@ctxflow/otel</code> 0.3.0 or <code>ctxflow/otel</code> 0.3.0. Each one requires the matching <code>semconv</code> package at 0.3.</li>
<li><strong>Mixed fleets lose pipeline keys.</strong> A service on an SDK older than 0.3 does not copy the pipeline keys from the baggage. It gets no error, but its spans lose the pipeline. Update every service in the path of a job.</li>
<li><strong>Check.</strong> Run <code>ctxflow-otel check</code> (or the curl check in the <a href="https://docs.ctxflow.sh/instrument/verify/">verify guide</a>), run the job once, and look for the run in Pipelines. A short-lived job must flush its spans before it exits.</li>
</ol>
<p>On the hosted app, past figures can move slightly after the update, because ctxflow derives existing data again once with the new rules.</p>
<h2>Frequently asked questions</h2>
<h3>What is data pipeline monitoring for AI agents?</h3>
<p>Data pipeline monitoring for AI agents records each run of the pipelines that produce the data your agent reads: which sources a run read, which steps ran, which failed, and what each step wrote. That includes the ingestion that fills a retrieval index and the ETL or sync jobs that write the records your tools read. It complements agent tracing. Agent traces show what the agent read; pipeline monitoring shows how that data got there, and whether that run succeeded.</p>
<h3>Is it only for RAG?</h3>
<p>No. Document ingestion for RAG is the most common case, but <code>pipeline()</code> and <code>step()</code> take artifacts of any kind. An ETL job that loads orders, a job that refreshes embeddings or a scheduled job with an agent inside are traced the same way.</p>
<h3>Do I need to change my pipeline code?</h3>
<p>Yes, a little. You wrap each run in <code>pipeline()</code> and each unit of work in <code>step()</code>, and declare the artifacts that go in and out. You do not change your parser, chunker, embedder, vector store or database client. If you already use the Python ingestion extras for LlamaIndex, Docling or Unstructured, their <code>ingest.*</code> spans keep working.</p>
<h3>Does ctxflow connect to my databases or my job runner?</h3>
<p>No. ctxflow never polls your vector database, your other databases, your buckets or your queue. It reads the OpenTelemetry spans your pipeline and your agent send. The SDK does not wrap a job library either, so Celery, cron, a queue worker or a Laravel job all work the same way.</p>
<h3>Does the SDK send my documents to ctxflow?</h3>
<p>Steps send ids, kinds, versions and hashes. A short plain value of 256 characters or less is sent as it is; longer text is identified by its content hash and bytes by their source hash. The pipeline name travels in the baggage to other services, so never put user text or personal data in it.</p>
<h3>Is this data lineage for AI agents?</h3>
<p>Yes. Data lineage for AI agents follows data from its source, through the jobs that transformed it, to the agent that used it. ctxflow builds that chain from the OpenTelemetry spans of your pipelines and your agent, and ends it at the agent turn, not at a table.</p>
<h3>What is the difference between provenance and data lineage?</h3>
<p>In ctxflow they describe the same graph from two angles. Data lineage is usually the flow of data between tables and jobs. Provenance, in the W3C sense, adds who and what produced each item. ctxflow tracks both, and extends the chain to the agent turns that received the result.</p>
<h3>Which languages support pipelines?</h3>
<p>Python, JavaScript (Node.js) and PHP, from SDK version 0.3.0. The three SDKs share one specification and the same conformance vectors, so a step traced in PHP produces the same attributes as the same step traced in Python. A pipeline can also cross languages, because the pipeline id travels in the baggage.</p>
<h2>See your pipeline next to your agent</h2>
<p>The SDKs are open source under Apache-2.0 on PyPI, npm and Packagist. Follow the <a href="https://docs.ctxflow.sh/instrument/pipelines/">pipelines instrumentation guide</a>, read <a href="https://ctxflow.sh/blog/opentelemetry-sdks-for-ai-agents/">how the open-source OpenTelemetry SDKs work</a>, or <a href="https://app.ctxflow.sh/">try the ctxflow app in beta</a> and send one run of a pipeline. The next time an agent gives a wrong answer, you will see whether the model or the pipeline was the cause.</p>
]]></content:encoded></item></channel></rss>