Introducing Substructure
The why of substructure.ai
The foundations of Substructure came out of building AI features into existing web apps.
These AI features had a different request behavior than the other features in the system, which were mostly sub-second database reads and updates. The AI features require long runnning processes that can run for minutes or more.
The AI features should not change how we operate the web app. We need to be able to deploy anytime while the agent loop is running.
Plus we need a bunch of other features, like real-time streaming updates to the client.
We need these features to be resilient to failures, permanent and transient. We need to handle LLM provider downtime. We need to allow the user to refresh the page without stopping the agent. We need sub-agent supervision. We need to build human-in-the-loop functionality. We need client side tool calls.
So now we have Substructure, the language agnostic engine for driving the agent loop in your system via HTTP.
Each granular step of the agent loop is an HTTP request: call the model, run this tool, wait for a human. Every step arrives as a request and expects a result, the same shape web app infrastructure already handles well. Your code stays stateless and substructure handles everything else.