<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gael Anaya Carballo</title>
    <description>The latest articles on DEV Community by Gael Anaya Carballo (@claix_ai).</description>
    <link>https://dev.to/claix_ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4123141%2Fbe99e4d4-5f75-4838-8c4e-5d10454a693b.png</url>
      <title>DEV Community: Gael Anaya Carballo</title>
      <link>https://dev.to/claix_ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/claix_ai"/>
    <language>en</language>
    <item>
      <title>Your AI Agent Isn’t the Problem: Your Documents Are Still Unusable</title>
      <dc:creator>Gael Anaya Carballo</dc:creator>
      <pubDate>Sun, 13 Sep 2026 12:42:07 +0000</pubDate>
      <link>https://dev.to/claix_ai/your-ai-agent-isnt-the-problem-your-documents-are-still-unusable-eb5</link>
      <guid>https://dev.to/claix_ai/your-ai-agent-isnt-the-problem-your-documents-are-still-unusable-eb5</guid>
      <description>&lt;p&gt;&lt;a href="https://www.claix.dev/" rel="noopener noreferrer"&gt;&lt;/a&gt;Most AI agent workflows don’t fail because the model is incapable.&lt;/p&gt;

&lt;p&gt;They fail because the model receives the wrong input.&lt;/p&gt;

&lt;p&gt;A typical business workflow might start with an invoice PDF, a scanned contract, an Excel spreadsheet, a Word document, an email attachment, or some raw HTML copied from an internal system.&lt;/p&gt;

&lt;p&gt;The agent is then expected to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the document&lt;/li&gt;
&lt;li&gt;Find the relevant information&lt;/li&gt;
&lt;li&gt;Distinguish facts from noise&lt;/li&gt;
&lt;li&gt;Preserve numbers and dates correctly&lt;/li&gt;
&lt;li&gt;Compare the document with other sources&lt;/li&gt;
&lt;li&gt;Apply business rules&lt;/li&gt;
&lt;li&gt;Return a predictable result&lt;/li&gt;
&lt;li&gt;Trigger the next step in an automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes it works.&lt;/p&gt;

&lt;p&gt;Sometimes the output looks convincing but contains a wrong number, a missing clause, a changed field name, or a slightly different structure that breaks the next node in the workflow.&lt;/p&gt;

&lt;p&gt;This is the part of AI automation that is often underestimated: before an agent can reason about a document, the document needs to become usable data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The document problem behind many agent failures
&lt;/h2&gt;

&lt;p&gt;When people talk about AI agents, they usually focus on the reasoning layer.&lt;/p&gt;

&lt;p&gt;They discuss:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which model to use&lt;/li&gt;
&lt;li&gt;How many tools the agent should have&lt;/li&gt;
&lt;li&gt;Whether to use LangGraph, CrewAI, AutoGen, or another framework&lt;/li&gt;
&lt;li&gt;How to create planning loops&lt;/li&gt;
&lt;li&gt;How to give the agent memory&lt;/li&gt;
&lt;li&gt;How to reduce hallucinations&lt;/li&gt;
&lt;li&gt;How to make the agent autonomous&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of those decisions matter.&lt;/p&gt;

&lt;p&gt;But in many real-world workflows, the biggest problem appears earlier.&lt;/p&gt;

&lt;p&gt;The agent is connected to documents that were never designed to be consumed by software.&lt;/p&gt;

&lt;p&gt;A PDF is designed to be read by a person. An Excel workbook may contain merged cells, inconsistent headers, notes, formulas, several tables, and multiple sheets. A Word document may mix paragraphs, tables, signatures, and legal clauses. A scanned image may contain information that is visually obvious to a human but difficult to extract reliably.&lt;/p&gt;

&lt;p&gt;The agent has to solve the document problem and the business problem at the same time.&lt;/p&gt;

&lt;p&gt;That creates unnecessary uncertainty.&lt;/p&gt;

&lt;p&gt;Imagine an invoice-processing workflow. The actual task may be simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the invoice.&lt;/li&gt;
&lt;li&gt;Extract the invoice number.&lt;/li&gt;
&lt;li&gt;Identify the supplier.&lt;/li&gt;
&lt;li&gt;Read the total amount.&lt;/li&gt;
&lt;li&gt;Compare it with a purchase order.&lt;/li&gt;
&lt;li&gt;Notify the finance team if there is a mismatch.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The difficult part is often not the comparison.&lt;/p&gt;

&lt;p&gt;The difficult part is making sure that the invoice number, supplier name, currency, tax amount, and total are extracted consistently before the comparison happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why sending the entire file to an agent is fragile
&lt;/h2&gt;

&lt;p&gt;A common first approach is to send the complete file directly to a general-purpose AI model and ask it to handle everything.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read this contract, identify the renewal clause, compare it with our policy, summarize the risks, and return JSON.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can work for prototypes.&lt;/p&gt;

&lt;p&gt;However, production workflows usually need stronger guarantees.&lt;/p&gt;

&lt;p&gt;The output may change slightly between executions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"supplier"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Ltd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1250&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EUR"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, on another execution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"vendor_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Limited"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount_due"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"€1,250.00"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both responses may look reasonable to a human. They are not equivalent to an automation.&lt;/p&gt;

&lt;p&gt;A downstream workflow may be expecting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;supplier
total
currency
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the model changes the key names, returns an amount as formatted text, or omits a field that was not explicitly visible, the workflow can fail silently.&lt;/p&gt;

&lt;p&gt;There is another problem: context size.&lt;/p&gt;

&lt;p&gt;If the workflow processes a 200-page PDF, the agent may receive far more information than it needs. This increases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Token usage&lt;/li&gt;
&lt;li&gt;Latency&lt;/li&gt;
&lt;li&gt;Cost&lt;/li&gt;
&lt;li&gt;Retrieval complexity&lt;/li&gt;
&lt;li&gt;The chance of confusing similar sections&lt;/li&gt;
&lt;li&gt;The amount of irrelevant context available to the model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more content the model receives, the more important it becomes to control exactly what the model is expected to return.&lt;/p&gt;

&lt;h2&gt;
  
  
  A better separation of responsibilities
&lt;/h2&gt;

&lt;p&gt;A more reliable architecture separates document processing from agent reasoning.&lt;/p&gt;

&lt;p&gt;Instead of asking one general-purpose agent to do everything, the workflow can be divided into layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Document
   ↓
Extraction and normalization
   ↓
Validated structured data
   ↓
Business rules and agent reasoning
   ↓
Action or human review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each layer has a different job.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Document extraction
&lt;/h3&gt;

&lt;p&gt;This layer reads PDFs, images, spreadsheets, Word documents, or raw text and identifies the relevant fields.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Normalization
&lt;/h3&gt;

&lt;p&gt;This layer converts different labels and formats into a consistent structure.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Invoice No.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Invoice Number&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Factura&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Nº factura&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;can all map to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;invoice_number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Likewise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Amount Due&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Grand Total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Importe total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;can map to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;total_amount
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Validation
&lt;/h3&gt;

&lt;p&gt;The workflow verifies that the output follows the expected schema and checks important constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is the invoice number present?&lt;/li&gt;
&lt;li&gt;Is the amount numeric?&lt;/li&gt;
&lt;li&gt;Is the currency known?&lt;/li&gt;
&lt;li&gt;Does the total equal subtotal plus tax?&lt;/li&gt;
&lt;li&gt;Is the date valid?&lt;/li&gt;
&lt;li&gt;Is the document readable?&lt;/li&gt;
&lt;li&gt;Does the supplier match the expected company?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Reasoning
&lt;/h3&gt;

&lt;p&gt;Only after the document has been transformed into usable data should the agent evaluate business logic.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Does this invoice exceed the purchase order by more than 5%?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a much narrower and more reliable task than asking the same agent to interpret the entire PDF, locate all values, understand the purchase order, and make the comparison from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Claix
&lt;/h2&gt;

&lt;p&gt;Claix is a server-to-server document intelligence API designed for this layer between unstructured files and AI workflows.&lt;/p&gt;

&lt;p&gt;The core idea is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Send a document and a schema. Receive structured data that your workflow can actually use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claix can process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PDF files&lt;/li&gt;
&lt;li&gt;Excel and CSV files&lt;/li&gt;
&lt;li&gt;Word documents&lt;/li&gt;
&lt;li&gt;Plain text&lt;/li&gt;
&lt;li&gt;Markdown&lt;/li&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;XML&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Scanned documents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is JSON shaped around a schema defined by the developer.&lt;/p&gt;

&lt;p&gt;For example, an invoice schema might look conceptually like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Supplier Invoice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pdf-json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"schema_definition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"invoice_number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The invoice identifier shown on the document"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"issue_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The invoice issue date in ISO format"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"supplier_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The legal name of the supplier"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"total_amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"number"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The final invoice total before or after tax according to the document"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The currency used for the invoice total"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The schema becomes the contract between the document and the rest of the system.&lt;/p&gt;

&lt;p&gt;A workflow does not need to guess whether the model will return &lt;code&gt;supplier&lt;/code&gt;, &lt;code&gt;vendor&lt;/code&gt;, or &lt;code&gt;company_name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It can request and consume a known structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple API workflow
&lt;/h2&gt;

&lt;p&gt;Claix is designed for backend integrations, scripts, automation platforms, and agent tools.&lt;/p&gt;

&lt;p&gt;A PDF extraction request can be sent using a multipart request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;schema_id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3c7a9f21-4b8e-4d1a-9c6f-2e0d8a5b7c4f&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;file&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./invoice.pdf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)]),&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;invoice.pdf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[https://claix.dev/api/pdf-json](https://claix.dev/api/pdf-json)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x-api-key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CLAIX_API_KEY&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful response follows a predictable structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"schema_utilizado"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Supplier Invoice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"total_registros"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"invoice_number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INV-2026-00456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"issue_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-03-14"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"supplier_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Supplies Ltd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"total_amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1284.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EUR"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is not just that the model understood the document.&lt;/p&gt;

&lt;p&gt;The important part is that the result is ready to be passed into another system.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Gmail attachment
   ↓
Claix PDF extraction
   ↓
Validate invoice fields
   ↓
Find purchase order in ERP
   ↓
Compare values
   ↓
Send approval request or flag mismatch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The same pattern works with n8n
&lt;/h2&gt;

&lt;p&gt;A common n8n workflow might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Gmail Trigger
   ↓
Download Attachment
   ↓
HTTP Request to Claix
   ↓
Validate Extracted JSON
   ↓
Lookup Purchase Order
   ↓
Compare Invoice and Purchase Order
   ↓
Slack / Email / Database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The HTTP Request node can send the file to Claix with the schema ID and API key.&lt;/p&gt;

&lt;p&gt;Once the response comes back, the rest of the workflow works with structured fields instead of trying to interpret the original document again.&lt;/p&gt;

&lt;p&gt;For a simple invoice workflow, the comparison node might receive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"invoice_number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INV-2026-00456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"supplier_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Supplies Ltd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"total_amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1284.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"purchase_order_total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"difference"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;84.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"difference_percentage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;7.04&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AI agent does not need to rediscover the invoice total.&lt;/p&gt;

&lt;p&gt;It can focus on the actual decision:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The invoice is 7.04% above the purchase order. Request human approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a much better use of an agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structured extraction is not the same as simple OCR
&lt;/h2&gt;

&lt;p&gt;OCR is useful, but OCR alone does not solve the full workflow problem.&lt;/p&gt;

&lt;p&gt;OCR answers a question like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What text appears in this image?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A business workflow usually needs something more specific:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which value is the invoice total?
Which date is the issue date?
Which company is the supplier?
Is this document a valid invoice?
Does the total match the purchase order?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The layout and meaning matter.&lt;/p&gt;

&lt;p&gt;A document can contain several numbers that look like totals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subtotal&lt;/li&gt;
&lt;li&gt;Taxable base&lt;/li&gt;
&lt;li&gt;VAT&lt;/li&gt;
&lt;li&gt;Discount&lt;/li&gt;
&lt;li&gt;Amount paid&lt;/li&gt;
&lt;li&gt;Amount due&lt;/li&gt;
&lt;li&gt;Grand total&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Extracting text is only the beginning. The workflow needs fields with business meaning.&lt;/p&gt;

&lt;p&gt;That is why a schema is useful. It describes not just the type of output, but what each field represents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling missing information safely
&lt;/h2&gt;

&lt;p&gt;One of the most important properties of an extraction workflow is how it handles missing data.&lt;/p&gt;

&lt;p&gt;If a field is not present in the document, the system should not invent a plausible value just to fill the schema.&lt;/p&gt;

&lt;p&gt;For example, if an invoice does not show a due date, the correct result is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"due_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"due_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-04-14"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A missing value is different from an inferred value.&lt;/p&gt;

&lt;p&gt;That distinction matters in finance, legal workflows, compliance, procurement, and customer operations.&lt;/p&gt;

&lt;p&gt;A downstream workflow can then explicitly decide what to do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;invoice&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;due_date&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;manual_review&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is more reliable than allowing a model to generate a date based on common payment terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Mode for semantic business logic
&lt;/h2&gt;

&lt;p&gt;Structured extraction is useful when you need explicit fields.&lt;/p&gt;

&lt;p&gt;Sometimes the workflow also needs semantic evaluation.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the contract contain an automatic renewal clause?&lt;/li&gt;
&lt;li&gt;Is the cancellation penalty present?&lt;/li&gt;
&lt;li&gt;Is the invoice subject to a special tax rule?&lt;/li&gt;
&lt;li&gt;Does this document satisfy the internal procurement policy?&lt;/li&gt;
&lt;li&gt;Is the customer eligible for a particular process?&lt;/li&gt;
&lt;li&gt;Is the image legible enough to approve automatically?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claix supports an Agent Mode in which the schema includes an agent definition.&lt;/p&gt;

&lt;p&gt;The first phase extracts the structured data.&lt;/p&gt;

&lt;p&gt;The second phase evaluates defined business questions and returns typed values.&lt;/p&gt;

&lt;p&gt;A response can include both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"schema_utilizado"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Contract Review"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"total_registros"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"tenant_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Example Company"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"monthly_rent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"agent_data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"has_automatic_renewal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"has_penalty_clause"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"contract_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fixed_term"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"requires_manual_review"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference between a general chat response and this type of workflow is that the agent outputs are designed to be consumed by software.&lt;/p&gt;

&lt;p&gt;A boolean can trigger a branch.&lt;/p&gt;

&lt;p&gt;An enum can select a path.&lt;/p&gt;

&lt;p&gt;An integer can drive a calculation.&lt;/p&gt;

&lt;p&gt;A string can be stored in a database or included in a generated response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Document context and queryable memory
&lt;/h2&gt;

&lt;p&gt;Not every workflow should send the same document to the model repeatedly.&lt;/p&gt;

&lt;p&gt;If an agent needs to ask several questions about a document over time, the system can persist the processed document context and query it when necessary.&lt;/p&gt;

&lt;p&gt;This creates a separation between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Short-term agent context&lt;/li&gt;
&lt;li&gt;Structured operational fields&lt;/li&gt;
&lt;li&gt;Long-term document context&lt;/li&gt;
&lt;li&gt;User or account memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not always the same thing.&lt;/p&gt;

&lt;p&gt;A conversational summary is not a reliable replacement for a contract.&lt;/p&gt;

&lt;p&gt;A vector database is not always the best place for a field like &lt;code&gt;contract_end_date&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A structured field is not always enough to answer a nuanced question about a clause.&lt;/p&gt;

&lt;p&gt;Different information needs different storage and retrieval strategies.&lt;/p&gt;

&lt;p&gt;With Claix’s document context flow, an extraction can return a &lt;code&gt;document_id&lt;/code&gt;. That identifier can later be used to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieve the stored document content&lt;/li&gt;
&lt;li&gt;Ask targeted questions about the document&lt;/li&gt;
&lt;li&gt;Delete the persisted document when it is no longer needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A question request can look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"questions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"What is the exact early termination penalty?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Does the contract renew automatically?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Who is responsible for maintenance?"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response preserves the relationship between each question and its answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"user_ask"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"What is the exact early termination penalty?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Does the contract renew automatically?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Who is responsible for maintenance?"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ia_response"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"The penalty is one month's rent."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"No, the contract does not renew automatically."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"The tenant is responsible for ordinary maintenance."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows the main agent to retrieve only the information it needs instead of carrying the entire document through every turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Knowledge Spaces for multiple documents
&lt;/h2&gt;

&lt;p&gt;Many business questions cannot be answered from one document.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compare a contract with a supplier invoice.&lt;/li&gt;
&lt;li&gt;Check whether several invoices match a purchase order.&lt;/li&gt;
&lt;li&gt;Find which vendor has the highest total across a folder.&lt;/li&gt;
&lt;li&gt;Compare versions of a policy.&lt;/li&gt;
&lt;li&gt;Consolidate data from multiple reports.&lt;/li&gt;
&lt;li&gt;Cross-reference a proposal with a pricing spreadsheet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For these cases, documents can be grouped into a shared knowledge space.&lt;/p&gt;

&lt;p&gt;The workflow can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a space.&lt;/li&gt;
&lt;li&gt;Process documents with context enabled.&lt;/li&gt;
&lt;li&gt;Associate each document with the space.&lt;/li&gt;
&lt;li&gt;Ask questions across the space.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The question can be something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which invoice does not match the pricing terms in the contract?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is the total amount billed by each supplier across all current invoices?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of manually loading every file into an agent prompt, the system can use a scoped set of documents.&lt;/p&gt;

&lt;p&gt;This helps keep the main workflow focused and gives the document layer responsibility for locating relevant information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits in an agent architecture
&lt;/h2&gt;

&lt;p&gt;Claix is not intended to replace the entire agent stack.&lt;/p&gt;

&lt;p&gt;It is better understood as a specialist tool or document agent.&lt;/p&gt;

&lt;p&gt;A general-purpose orchestrator can decide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This task involves a PDF invoice. Delegate extraction to the document tool.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claix returns structured data.&lt;/p&gt;

&lt;p&gt;The orchestrator then decides what to do next:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The invoice total differs from the purchase order. Ask for approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces a clean division:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Orchestrator:
Planning, routing, decisions, tool selection

Claix:
Document ingestion, extraction, normalization, document context

Business system:
CRM, ERP, database, spreadsheet, email, notifications
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern also maps naturally to multi-agent architectures.&lt;/p&gt;

&lt;p&gt;A document-processing agent can expose capabilities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extract data from a file using a schema&lt;/li&gt;
&lt;li&gt;Query a persisted document&lt;/li&gt;
&lt;li&gt;Ask questions across a knowledge space&lt;/li&gt;
&lt;li&gt;Return typed semantic evaluations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main agent does not need to understand how OCR, document parsing, or extraction works internally.&lt;/p&gt;

&lt;p&gt;It only needs to know when to use the capability and how to consume the result.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical example: contract and invoice reconciliation
&lt;/h2&gt;

&lt;p&gt;Consider a procurement workflow.&lt;/p&gt;

&lt;p&gt;The company receives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A supplier contract in PDF&lt;/li&gt;
&lt;li&gt;A monthly invoice in PDF&lt;/li&gt;
&lt;li&gt;A pricing spreadsheet&lt;/li&gt;
&lt;li&gt;A purchase order from the ERP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The workflow needs to determine whether the invoice should be approved.&lt;/p&gt;

&lt;p&gt;A fragile implementation might send everything to one agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read these documents and tell me whether the invoice is correct.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A more controlled implementation would look like this:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Extract the contract
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"supplier_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Supplies Ltd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"contract_currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EUR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"payment_terms_days"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"contracted_monthly_amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"has_price_escalation_clause"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Extract the invoice
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"invoice_number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INV-2026-00456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"supplier_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Supplies Ltd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"invoice_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-03-14"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"total_amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1284.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EUR"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Retrieve the relevant pricing rule
&lt;/h3&gt;

&lt;p&gt;The agent asks the document context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What price escalation is permitted for March 2026?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Apply the business rule
&lt;/h3&gt;

&lt;p&gt;The workflow calculates the allowed amount and compares it with the invoice.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Decide
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The invoice is 7.04% above the purchase order. The contract allows a maximum increase of 3%. Route to manual review.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent is still useful.&lt;/p&gt;

&lt;p&gt;It simply is not forced to perform every task at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claix and the A2A direction
&lt;/h2&gt;

&lt;p&gt;As agent systems become more modular, specialized capabilities need to be discoverable and callable by other agents.&lt;/p&gt;

&lt;p&gt;A document agent can be useful in an Agent2Agent architecture because it offers a focused capability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I can process business documents and return structured, queryable information.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An orchestrator might delegate a task such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Extract the supplier, total, currency, and payment terms from this invoice.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Compare the current invoice against the contract and report any mismatch.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The document agent handles the file-specific work and returns a machine-readable result.&lt;/p&gt;

&lt;p&gt;This is preferable to giving every agent direct access to every document and expecting each one to build its own parsing strategy.&lt;/p&gt;

&lt;p&gt;Specialization can improve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security boundaries&lt;/li&gt;
&lt;li&gt;Permission management&lt;/li&gt;
&lt;li&gt;Cost control&lt;/li&gt;
&lt;li&gt;Observability&lt;/li&gt;
&lt;li&gt;Reusability&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also means a document-processing capability can be reused across different orchestrators and applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Claix from Python
&lt;/h2&gt;

&lt;p&gt;A basic request can be made with &lt;code&gt;requests&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[https://claix.dev/api/pdf-json](https://claix.dev/api/pdf-json)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;x-api-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;schema_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3c7a9f21-4b8e-4d1a-9c6f-2e0d8a5b7c4f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invoice.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;file&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invoice.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;invoice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;invoice&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invoice_number&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;invoice&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total_amount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Agent Mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[https://claix.dev/agent/pdf-json](https://claix.dev/agent/pdf-json)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;x-api-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;schema_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;b980cfe7-61ef-4a5a-9724-881c8a5541e2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;contract.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;file&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;contract.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;structured_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;agent_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;agent_data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;structured_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same API pattern can be used from Node.js, n8n, Make, Zapier, or a custom backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use Claix instead of building everything yourself
&lt;/h2&gt;

&lt;p&gt;Building your own document pipeline can be a good choice.&lt;/p&gt;

&lt;p&gt;For a small number of known document formats, local processing with tools such as PDF parsers, OCR libraries, spreadsheet libraries, and an LLM may be sufficient.&lt;/p&gt;

&lt;p&gt;A managed document API becomes more interesting when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documents come from different customers.&lt;/li&gt;
&lt;li&gt;Formats change frequently.&lt;/li&gt;
&lt;li&gt;You need PDF and image support.&lt;/li&gt;
&lt;li&gt;You need consistent schema-based outputs.&lt;/li&gt;
&lt;li&gt;You want to connect the workflow quickly through HTTP.&lt;/li&gt;
&lt;li&gt;You need document context beyond a single request.&lt;/li&gt;
&lt;li&gt;You want to compare multiple documents.&lt;/li&gt;
&lt;li&gt;You need Agent Mode for semantic fields.&lt;/li&gt;
&lt;li&gt;You would rather focus on the business workflow than maintain parsers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The choice depends on your requirements around privacy, latency, cost, control, and operational ownership.&lt;/p&gt;

&lt;p&gt;Claix is designed for teams that need the document layer to be accessible through an API rather than rebuilding it for every workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing reliable document automations
&lt;/h2&gt;

&lt;p&gt;A few practical rules make a significant difference.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep the schema focused
&lt;/h3&gt;

&lt;p&gt;Do not request every possible field if the workflow only needs five.&lt;/p&gt;

&lt;p&gt;A smaller schema is easier to validate and easier to debug.&lt;/p&gt;

&lt;h3&gt;
  
  
  Separate extraction from decisions
&lt;/h3&gt;

&lt;p&gt;First extract the facts.&lt;/p&gt;

&lt;p&gt;Then apply business logic.&lt;/p&gt;

&lt;p&gt;This makes it easier to understand whether a failure came from document interpretation or from the rule itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Treat missing values explicitly
&lt;/h3&gt;

&lt;p&gt;A missing field should remain missing.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;null&lt;/code&gt;, confidence checks, or a manual-review branch instead of silently guessing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Preserve source context
&lt;/h3&gt;

&lt;p&gt;For important decisions, keep the relationship between an output field and its source document.&lt;/p&gt;

&lt;p&gt;This is particularly important for compliance, finance, contracts, and healthcare workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add deterministic checks
&lt;/h3&gt;

&lt;p&gt;Use normal code for things that normal code handles well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Date comparisons&lt;/li&gt;
&lt;li&gt;Arithmetic&lt;/li&gt;
&lt;li&gt;Thresholds&lt;/li&gt;
&lt;li&gt;Required fields&lt;/li&gt;
&lt;li&gt;Enum validation&lt;/li&gt;
&lt;li&gt;Duplicate detection&lt;/li&gt;
&lt;li&gt;Database lookups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model can interpret the document. It does not need to perform every deterministic operation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add a human review path
&lt;/h3&gt;

&lt;p&gt;Not every document should be processed automatically.&lt;/p&gt;

&lt;p&gt;Unreadable scans, conflicting totals, missing signatures, and ambiguous clauses should be routed for review.&lt;/p&gt;

&lt;p&gt;A reliable workflow is not one that never asks a human for help.&lt;/p&gt;

&lt;p&gt;It is one that knows when it should.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bigger idea
&lt;/h2&gt;

&lt;p&gt;The future of AI automation is probably not one giant agent that receives every file, has every tool, and makes every decision.&lt;/p&gt;

&lt;p&gt;A more practical pattern is composable specialization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input agent
   ↓
Document extraction agent
   ↓
Validation layer
   ↓
Reasoning agent
   ↓
Business system
   ↓
Human approval when necessary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each component has a clear responsibility.&lt;/p&gt;

&lt;p&gt;The document layer converts messy files into structured, queryable information.&lt;/p&gt;

&lt;p&gt;The reasoning layer interprets that information.&lt;/p&gt;

&lt;p&gt;The workflow layer applies rules and triggers actions.&lt;/p&gt;

&lt;p&gt;The human remains in control of high-impact decisions.&lt;/p&gt;

&lt;p&gt;That architecture is easier to debug than a single autonomous loop because you can inspect each boundary.&lt;/p&gt;

&lt;p&gt;When a workflow fails, you can ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was the document unreadable?&lt;/li&gt;
&lt;li&gt;Was the schema wrong?&lt;/li&gt;
&lt;li&gt;Was a field missing?&lt;/li&gt;
&lt;li&gt;Did validation reject the result?&lt;/li&gt;
&lt;li&gt;Did the business rule calculate incorrectly?&lt;/li&gt;
&lt;li&gt;Did the agent misunderstand an already-structured value?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is much more useful than simply knowing that “the agent produced the wrong answer.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;AI models are becoming increasingly capable at reasoning over complex information.&lt;/p&gt;

&lt;p&gt;But capability is not the same as reliability.&lt;/p&gt;

&lt;p&gt;If your workflow depends on invoices, contracts, spreadsheets, reports, forms, or scanned documents, the quality of your document layer will often matter more than the complexity of your agent framework.&lt;/p&gt;

&lt;p&gt;Claix is built around a straightforward idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Documents should become structured, validated, and queryable before they become agent context.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once that happens, agents have less irrelevant information to process, workflows can rely on stable fields, and developers can use AI for the parts that genuinely require reasoning.&lt;/p&gt;

&lt;p&gt;Instead of asking an agent to do everything, give it a clean input and a well-defined job.&lt;/p&gt;

&lt;p&gt;That is where agent automation starts becoming useful in production.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>productivity</category>
      <category>agentskills</category>
    </item>
  </channel>
</rss>
