Engineering · May 4, 2026
The architecture behind our first beta
Two more weeks in, and Scylla keeps moving forward! Today, we take a quick look at our current architecture, the one that will carry us through our first beta.
Background
For a long time, Scylla was a single block: an API that handled the gRPC calls, the business logic, the database interactions and so on.
Then came the agents, the last step before this beta, and they made us rethink our architecture. Connecting one or several agents to the API took much more code than we expected. The agent pool (mpsc channels, gRPC connections) and its management (heartbeats, crash handling…) added a non-negligible amount of code and complexity. On top of that, very little of it had anything to do with the role of an API.
The problem
An almost obvious answer started to take shape: extract this agent “orchestration” logic into a dedicated crate. But that would only move the problem somewhere else: how would the API talk to this external service?
We needed to split the code properly and to find a reliable, independent way to handle communication between all these services.
Our solution

As you can see on the diagram, our architecture is now built around two main components: the core and the broker.
Concretely, we isolated a core: a crate that gathers the business logic, a kind of contract to interact with the database. Every other service (API, recorder, etc.) imports it. The rest of the code is built around it: each service imports this shared kernel instead of reimplementing its own rules.
That said, the services have no direct link between them, and that’s on purpose: we want a structure that scales in O(1), not O(n).

This is where the broker plays a key role. If we add a new service, it only has to connect to the broker, listen for the events it cares about, and publish the ones other services need. From there, we can chain cascades of events between services without any extra complexity.
Finally, agents are an exception: they don’t use the core. Their role is to run pipelines, so access to the database would make them an attack vector. Keeping them away from it was a must. So we added a buffer service, the recorder. It listens to the agents and persists their data in the database on their behalf. With this indirection, we keep a controlled entry point to the database, and the agents stay free to evolve on their own.
What’s next?
This new architecture helped us solve real problems, but we know its limits and the new challenges it brings, especially around security. It’s just one step, and we’re actively working on it for the next beta.
Stay tuned!
Keep reading
© 2026 Scylla · Released under the Apache-2.0 license · Legal notice