One service name in, one tested integration out
The pipeline is a single workflow of 95 steps. It reads about the target service, plans the integration, writes the code in parallel pieces, pushes it to GitHub and waits for the automated checks. If the checks fail, it reads the error log, writes a fix and tries again. Nothing is published until the checks pass and I approve it.
Two ideas make it more than a code generator. It has a memory: every build is stored in a vector database, and each new build starts by recalling the most similar past ones. And it repairs itself: a failed build is treated as information, fixed, and written down so later builds avoid the same mistake.
The screens below are the real workflow, a real run and its real output: the Kraken exchange integration, rebuilt in December 2026. Server addresses are hidden in the workflow screens. Nothing else is altered.
The workflow: 95 steps on one canvas
Built in n8n, the same platform the integrations are for
Each box is one step: a call to an AI model, a piece of code that checks or reshapes the result, or a request to GitHub, the project database or the vector store. Click any screen to enlarge it.
Build memory: each build starts from what earlier builds learned
Retrieval-augmented generation, applied to the pipeline's own history
An AI model starts every job knowing nothing about the last one. Left alone, it makes the same mistake on build 100 that it made on build 1. The fix is a memory it can search. A vector database stores text as a list of numbers that captures meaning, so the pipeline can ask for "builds similar to this one" instead of matching exact words.
- Describe the job. The service name, category and description become a 1,536-number vector (Voyage AI).
- Recall. The vector database (Qdrant) returns the five most similar past builds above a similarity score of 0.65. A new crypto exchange finds other exchanges.
- Inject. Their lessons go into the research prompt: how similar services sign requests, what broke, what had to be repaired.
- Store. When the build finishes, its own record goes back in: the lessons about this API, the build time, whether the checks passed, and what each repair taught.
What the pilot build remembered
About the API
Private endpoints need a signed request with a strictly increasing counter. Request bodies are form-encoded, not JSON. The API can return a success status with an error inside it.
About its own build
Checks: green. Repairs: 2. Lesson one: a doubled comma between generated blocks leaves a hole in a list. Lesson two: an error object must carry the API's own message.
One record per repository
A rebuild replaces the old record instead of adding a copy. The first version of the pipeline did not do this, and stored the same two boilerplate lessons on all 223 records.
Self-repair: a failed build is read, fixed and remembered
Up to three repairs per build, each one a small patch
Generated code often has small faults: a stray character, a type the compiler rejects, a test that expects the wrong shape. A person would read the error, change two lines and move on. The repair loop does the same, and asks the model for exact find-and-replace edits instead of a rewritten file, so a fix cannot quietly change code that already worked.
A run: watching a build go through
The slow steps are the AI calls. Everything between them takes milliseconds
The result: a package anyone can install
Kraken exchange | 8 resources, 53 operations, 166 tests
What comes out is an ordinary open repository and an ordinary npm package. Everything in these screens was written by the pipeline, apart from the release note.
The catalog, and what I found when I audited it
162 packages published. Half of them could not load
I built the first version of this pipeline in 2024 and used it to publish 162 packages. When I came back to it in December 2026, I downloaded every one and checked it against what it claimed to contain before rebuilding anything.
What the audit found
- 81 of 162 packages could not load. Each package tells n8n where its files are, and in 81 those files were missing. In 77 the cause was the same: the service name had a space in it, so the file was written to one path and declared at another.
- The tests never ran. The old automated check compiled the code but skipped the tests, so a broken package still got a green tick.
- The memory held nothing useful. 223 records with two distinct lessons between them.
- Failures were silent. Steps were set to continue on error, so a run could report success after pushing nothing.
What version 4 changed
Rules in code, not in prompts
File paths, package settings and build configuration are written by ordinary code after the model finishes, so a space in a name cannot break a package again.
Checks that can fail
Every push is built and tested. Publishing is a separate, gated step.
Fail loudly
Database lookups and GitHub pushes now stop the run when they fail.
Respect hand-written work
A guard refuses to overwrite a repository I built by hand unless I force it.
A cap on scope
An uncapped trial covered 21 areas of one API and took 18 minutes. Builds are capped at eight, which brought the pilot to about 8 minutes.
Do not duplicate n8n
Four services in the catalog now have official integrations built into n8n. The rebuild skips them.
So far one package, the Kraken exchange, has been rebuilt and republished through version 4. The rest of the catalog follows, a few at a time, so each build can draw on the lessons of the ones before it.
From a name to a package
- Request. A build starts from a web request carrying the service name, a category and a short description.
- Recall. The request is embedded and the five most similar past builds are pulled from the vector database.
- Research. The model studies the API and returns a plan: how to authenticate and which resources and operations to cover, capped at eight resources.
- Write in parallel. Each resource is written by its own call at the same time, then code stitches the pieces into one file.
- Normalize. Code enforces file names, package settings, license, build configuration and the automated checks.
- Document and remember. A cheaper model writes the README, and the build record is stored.
- Push. The files go to GitHub, creating the repository or updating it.
- Check and repair. The pipeline waits for the checks and repairs failures, up to three times.
- Approve. I review the result and create the release. The gated publish step sends it to npm.
The architecture
Designed it, built it, audited it and rebuilt it
Design
The phase structure, the prompts, the parallel write step and the approval gate.
Memory
Chose the embedding model and vector store, designed the record, and wired recall and storage into every build.
Audit
Downloaded all 162 packages, checked each against its own manifest, and traced every failure to a cause in the pipeline.
Rebuild
Moved the rules that must never break out of prompts and into code, added real checks and the repair loop, and made failures stop the run.
Pilot
Rebuilt the Kraken integration end to end: generated, repaired twice by the pipeline, 166 tests passing, published.
Working with AI
I used Claude as a pair programmer for the audit and the rebuild. The design decisions, the review and the approval of every release are mine.
What is next
- Rebuild the catalog through version 4, starting with the packages that cannot load.
- Prevent, then repair. The doubled-comma fault is fixed by the repair loop today. It should be removed in the assembly step so it never reaches the checks.
- Move to my own infrastructure. A self-hosted n8n with a Postgres database in place of the hosted instance and Airtable.
- Keyless publishing. Replace stored npm tokens with short-lived credentials issued per release.
Stack
n8n, Claude API (Opus, Sonnet), TypeScript, Node.js, Qdrant, Voyage AI, GitHub Actions, npm, Jest, Airtable