Skip to content
BT. Open to select work
← All case studies11 / 12 · Reusable building blocks

Reusable building blocks

Developer tools

Small capabilities that make the next agent easier to build.

01 / Messy inputA page, scan, or documentThe awkward integration problem arrives in a format the larger agent cannot use directly.
02 / Focused toolRetrieve, validate, transformA small API or library owns one capability and its failure modes.
03 / Clean contractStructured data or a usable fileThe product gets a bounded result it can compose into a larger workflow.

01 /
Build the repeatable parts once

Many agent projects hide the same difficult middle: retrieve a JavaScript page, reject a challenge screen, recover structure from a scan, or turn generated Markdown into something a person can actually download. I pull those responsibilities into focused tools so the next product can build on a tested contract.

02 /
The building blocks

The local collection spans three generations of that idea. Image2DOCX explored vision-assisted recovery of scanned pages into an editable Word file. Mistral Document Tool distilled OCR, schema-driven annotation, and document Q&A into a small Python library and CLI. The Web Extraction API grew from a basic scraper into a production service that routes between direct HTTP, Cloudflare Browser Rendering, and a final Chromium fallback.

01Intent-driven extraction

A URL, instructions, optional schema, and bounded scope become validated JSON through a Cloudflare Worker and Container.

02Mistral Document Tool

One CLI and library contract covers OCR, JSON-schema annotation, and question answering over image-based documents.

03Image2DOCX

An earlier Flask product extracts structured Markdown from images or scanned PDFs and converts it into an editable document.

04Product reuse

The extraction service feeds larger systems such as NewsClaw while remaining independently testable and deployable.

03 /
The engineering decision

The extraction API demonstrates the mature form of this approach. It races retrieval methods, scores candidate quality before model use, blocks private-network targets, validates generated output, and expands only a small set of relevant same-site pages when a listing is incomplete. The common path spends one model call; a second candidate is tried only when the first result fails its contract.

The tool-building rule

Give the agent a capability with boundaries—not another pile of raw content.

04 /
Cloudflare as an application platform

The current web extractor runs FastAPI inside a Cloudflare Container, fronted by a Worker that can call the Browser Rendering binding. The image is built remotely with Google Cloud Build, tested before promotion, and referenced by an immutable tag. That work added Cloudflare Workers, Containers, Browser Rendering, D1, R2, and Durable Objects to my practical platform experience.

Extraction3 retrieval pathsDirect HTTP, Browser Rendering, then local Chromium.
ExpansionBoundedRelevant same-site links, not an unrestricted crawl.
InterfacesAPI + CLITools fit both product backends and agent workspaces.

05 /
Evidence & boundaries

These are separate local systems with different maturity levels. The Cloudflare extraction endpoint is deployed and smoke-tested; Mistral Document Tool is a packaged local CLI/library; Image2DOCX is an earlier product repository. Their code is evidence of the pattern, not a claim that every tool runs inside every project.

Open extraction API ↗Inspect the repository ↗Explore Panastra Labs ↗

Keep exploring

Education Bureau Assistant

Next case study →Ask about this work ↗