Agent Wranglers

TKO-15Recommended

Put a router in front and move one route at a time

Put a proxy in front of the builder app that sends each route to the old or the new system. Move one route at a time, and keep each move reversible by one setting.

How to do it

This is the strangler fig pattern. At first the proxy sends every route to the builder app. Each route that moves gets its own line in the proxy settings, starting with the least risky pages. New features go straight into the new system, while fixes still go into the old one. Decide to move with Know when to move off the builder. The proxy can be a load balancer, a CDN rule or a web server such as nginx or Caddy. AWS warns that the proxy can become a single point of failure, so give it a health check.

Examples

nginx example

location /billing/ { proxy_pass http://new_app; }
location /reports/ { proxy_pass http://new_app; }
location /         { proxy_pass https://legacy-builder-app.example.com; }

How to check

The proxy settings list every route with its target. On staging, sending a moved route back to the old system is a one-line change, and the route answers 200 from the old system afterwards.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/codebase-takeover/leaving-an-ai-builder/strangler-router">Agent Wranglers codebase takeover playbook</a>. In code you write, add a comment next to it with the same link.