Aegis Relay
Follow the handoff. Find the risk.
Team ALTF4 | Hriday Vig & Dhruv Mohapatra
Inspiration: What If the Threat Isn't an Agent, but the Space Between Them?
Picture two AI agents working inside a company.
The first is a customer support agent. It can access customer records, resolve issues, and write internal notes.
The second is a reporting agent. It can read shared information, generate reports, and send them to external services.
Both agents have legitimate responsibilities. Neither needs to be compromised. Neither needs to deliberately break a rule.
Now imagine the support agent writes restricted customer information into an undeclared shared scratchpad. The reporting agent later reads that scratchpad and has permission to communicate with an external endpoint.
Suddenly, a possible route exists from restricted customer records to the outside world.
Who authorized that route?
Nobody explicitly did.
And that is the problem we set out to investigate.
As AI systems move beyond individual assistants into networks of collaborating agents, security becomes more complicated than checking whether each agent has the right permissions.
An agent might be authorized to read something. Another might be authorized to send something. The dangerous capability can emerge when those two permissions become connected through a third resource.
The individual actions can look legitimate while their composition creates an unintended capability.
We built Aegis Relay because we believe the next generation of agent security needs to understand not just what individual agents are allowed to do, but what the entire system becomes capable of doing when agents interact.
Our guiding question was simple:
What if we could reconstruct every handoff, identify the dangerous paths that emerge between agents, and find a way to break those paths without breaking the work those agents were supposed to perform?
That became Aegis Relay.
What We Built: A Security Investigator for Multi-Agent Systems
Aegis Relay is an investigation and response-planning workspace for security risks that emerge across agent interactions.
Instead of evaluating an agent's actions in isolation, it reconstructs the relationships between agents, resources, shared memory, tools, and external destinations.
It compares what actually gets reported against what the system's declared architecture says should exist.
When those interactions create a potentially dangerous capability, Aegis Relay explains the route, identifies the evidence behind it, and evaluates possible ways to contain it.
But detection is only half the problem.
Blocking every suspicious connection would be easy. Keeping a useful multi-agent system operational while removing the dangerous composition is considerably harder.
That is why we built Aegis Relay around five connected capabilities.
1. Reconstruct the System, Not Just the Logs
Aegis Relay ingests reported observations and constructs an action-aware graph of the environment.
Agents, resources, memory stores, and external destinations become nodes. Their interactions become directed relationships.
Every observed action is preserved with its supporting evidence.
The engine distinguishes between reading, writing, discovering, executing, and sending. This distinction matters because the same two components can interact in multiple ways, and blocking one action should not automatically erase another.
Aegis Relay also distinguishes observed action direction from potential data-flow direction. If an agent reads a resource, the recorded action is agent-to-resource, but information can flow from the resource into the agent.
This lets us investigate what an interaction actually means, rather than simply drawing arrows between services.
2. Detect Risks That Only Exist When Actions Are Combined
We implemented two structural detection rules.
PS-001: Undeclared Data-Flow Bridge
Detects when restricted information has a structural route through an unregistered intermediary toward an external destination.
For example:
Restricted CRM → Support Agent → Shared Scratchpad → Reporting Agent → External Webhook
No single connection necessarily explains the full problem. The risk becomes visible when the entire route is reconstructed.
PS-002: Cross-Agent Execution Channel
Detects when one agent executes a resource authored by another agent through relationships that were not declared in the architecture.
This matters because shared code, scripts, and execution artifacts can become channels through which one agent influences another.
Both detectors produce evidence-backed findings with inspectable contributing factors, severity, policy context, and uncertainty.
The engine uses deterministic weighted scoring, not an opaque AI-generated verdict.
A high score identifies a concerning structural capability. It does not claim that data was stolen, that an attack succeeded, or that an agent had malicious intent.
That distinction is fundamental to how we designed the system.
3. Find a Response That Doesn't Destroy the Workflow
Suppose Aegis Relay discovers a potentially unsafe route through a shared scratchpad.
The obvious response might be to disable the reporting agent's external communication.
But what if that external communication is part of its legitimate job?
We wanted to answer a harder question:
Can we eliminate the risky composition while preserving the declared work?
Aegis Relay evaluates registered control capabilities against a copy of the current graph.
Each candidate must pass two independent checks:
- Risk removal: Does the relevant dangerous composition disappear?
- Workflow preservation: Do the observed relationships required by the declared architecture remain intact?
In our support scenario, blocking the support agent's write into the undeclared scratchpad is the lowest-cost viable response.
Blocking the reporting agent's legitimate external send is rejected, even though it would break the dangerous route.
The planner ranks viable responses using manifest-defined costs and exposes why other candidates were rejected.
This is not merely a list of security recommendations. It is a constrained response-planning process with explicit, inspectable trade-offs.
4. Apply, Verify, and Learn From the Outcome
A recommendation is not proof that a fix worked.
So we added a separate verification stage.
After the operator applies a simulated control, Aegis Relay records the action, updates the represented environment, and runs the relevant detection and preservation checks again.
The workspace then shows two distinct results:
Composed path removed.
Declared work preserved.
If verification fails, the failure remains visible. We do not turn an unsuccessful control into a success message.
Verified containment can also generate a reusable pattern draft.
That pattern follows an explicit lifecycle:
Draft → Shadow → Active
An operator must review and promote it. Aegis Relay does not silently convert one successful simulated containment into an automatically deployed security rule.
The objective is to make the investigation useful beyond one incident while preserving human oversight.
5. Experiment With Entire Agent Populations in Swarm Lab
We also wanted to explore how these risks behave as systems grow.
So we built Swarm Lab, a synthetic multi-agent experimentation environment powered by the same detection and planning engine.
Operators can configure populations of 3 to 200 agents, vary connectivity, shared-memory access, delegation, and external access, and introduce controlled perturbations.
Examples include undeclared shared resources, cross-agent execution channels, delegation cascades, and new external endpoints.
Swarm Lab generates the architecture and observations, runs the detectors, evaluates available controls, and explains the outcome.
A larger system does not automatically produce a finding. The required structural conditions still need to exist.
This makes Swarm Lab useful for understanding the difference between a complex architecture and a specific detectable risk.
How We Built It
We built Aegis Relay as a deterministic security analysis engine with a separate investigation interface.
The architecture has three main parts.
The Analysis Engine
The core is written in Python 3.12, using Pydantic, NetworkX, and FastAPI.
It handles:
- Manifest validation and declared architecture
- Observation ingestion, validation, and context redaction
- Append-only evidence recording
- Action-aware graph projections
- Structural detection and policy invariant evaluation
- Constrained response planning
- Simulated control application and independent verification
- Reviewed containment-pattern lifecycle
- Synthetic multi-agent population generation
We use a NetworkX MultiDiGraph because multiple action types can exist between the same pair of nodes.
Security decisions live in the Python core. The frontend does not independently calculate findings or invent a second assessment.
The Investigation Workspace
We built the operator console using React, TypeScript, Vite, Tailwind CSS, and Zustand.
The interface is organized around an investigation rather than a conventional monitoring dashboard.
An operator can replay observations, inspect the interaction map, explore evidence, compare control candidates, apply a simulated response, verify the result, and review reusable patterns.
We also built an interactive field guide that introduces the underlying concepts and connects them to the investigation experience.
Our priority was to make the system understandable without hiding the technical details that make its conclusions defensible.
One Engine, Two Ways to Explore It
We faced a practical demonstration challenge: how could someone explore the project without configuring Python, starting a backend, or obtaining credentials?
Our solution was a recorded transport generated from the real Python engine.
The deployed static workspace can reproduce supported investigations and experiments using committed engine-generated JSON.
When the live FastAPI service is available, the console can connect to it instead.
The interface explicitly identifies whether the operator is using a recorded session or the live engine.
The repository contains 180 recorded Swarm Lab configurations, two recorded investigation scenarios, and an index.
We also added CI checks that regenerate the OpenAPI contract and recorded outputs and detect drift.
That means the recorded demonstration is tied to executable engine behavior rather than being a separately scripted visual mockup.
No model-provider account, inference API, or API key is necessary to run the analysis engine.
Challenges We Faced
Challenge 1: A Graph Is Not Automatically a Security Model
Representing interactions as nodes and edges was straightforward.
Representing what those interactions mean was not.
A read and a write between the same components are different security relationships. An observed read also points in the opposite direction from the potential flow of information into an actor.
If those distinctions are lost, the analysis can miss a composed route or report a misleading one.
We addressed this with action-keyed graph projections and explicit data-flow interpretation.
What we learned: The quality of a security finding depends as much on the semantics of the evidence as on the algorithm processing it.
Challenge 2: Removing the Risk Without Removing the Product
A security system that recommends shutting everything down can eliminate many paths.
But that is not useful containment.
We had to distinguish a response that breaks a dangerous composition from one that also destroys legitimate business functionality.
We solved this by introducing declared relationships, policy invariants, manifest-registered control capabilities, and independent candidate checks.
A control can successfully eliminate a risky route and still be rejected because it violates the workflow-preservation constraint.
What we learned: Security and functionality cannot be treated as separate objectives when the security decision directly changes how a system operates.
Challenge 3: Making Every Finding Explainable
A severity label alone tells an operator very little.
We wanted every conclusion to be traceable to actual reported observations, the reconstructed route, the applicable policy context, and the weighted factors that contributed to its score.
We also wanted the system to communicate what it could not establish.
A structural path is not proof of exfiltration. A missing finding is not proof of safety. A successful simulated control is not proof of production enforcement.
We deliberately exposed these boundaries instead of concealing them behind confident-looking verdicts.
What we learned: A trustworthy security tool must explain its uncertainty as carefully as its findings.
Challenge 4: Keeping the Demo Faithful to the Engine
A polished interface is easy to disconnect from the system it represents.
We did not want a beautiful frontend telling a security story that the backend could not reproduce.
So the live console consumes the Python engine's output, and the static console uses snapshots generated from that same engine.
We added automated checks for contract and recording drift to preserve this relationship as the project evolved.
The current verification suite includes 244 tests:
- 195 Python tests
- 30 console tests
- 17 browser journeys
- 2 static-assembly tests
These cover the engine, interface flows, recorded transport, and build behavior, alongside additional CI checks.
What we learned: A demo becomes considerably more credible when the presentation is a reproducible view of the implementation rather than an independent simulation of success.
A Case That Shows Why Aegis Relay Matters
Our support-and-reporting scenario demonstrates the central idea.
At replay position 11, the system contains a deviation from its declared architecture, but the complete restricted-data-to-external route has not yet formed.
At position 12, an additional read connects the pieces.
The detector now has the required structure to report the composed route.
That single observation changes what the system is capable of, according to the represented graph.
The operator can then:
- Inspect the complete route and supporting evidence.
- Compare viable and rejected response candidates.
- Select the recommended control blocking the undeclared scratchpad write.
- Apply the control through the simulated adapter.
- Independently verify that the composed path is gone and the declared work remains intact.
- Review the resulting containment-pattern draft.
The important point is not that we found a suspicious individual action.
It is that we identified a capability created by several actions together, then found a constrained way to remove it.
That is the security problem Aegis Relay was designed to explore.
What Makes Aegis Relay Different?
We didn't want to build another interface that displays alerts with a red warning symbol.
We wanted to build a system that helps an operator reason through a security problem from beginning to end.
From individual permissions to composed capabilities. We investigate what interactions make possible across the system, not just whether one component is allowed to perform one operation.
From findings to traceable evidence. Every reported route is connected to observations, policy context, and inspectable scoring factors.
From generic remediation advice to constrained planning. Candidate controls are simulated and evaluated for both risk removal and preservation of declared work.
From recommending a fix to checking the outcome. Control application is followed by a separate verification pass.
From one scenario to reproducible experimentation. Swarm Lab uses the same analysis pipeline to explore synthetic agent populations.
From a scripted demo to an executable foundation. The engine is deterministic, the API contract is committed, and the recorded workspace is generated from engine output.
All of this is implemented without depending on a language model to generate security conclusions.
What We Learned
The biggest lesson from Aegis Relay is that security properties do not necessarily survive composition.
Two components can have individually reasonable capabilities while their interactions create a route that nobody explicitly intended.
That changed how we thought about agent security.
We started with the question of how to discover dangerous relationships.
We ended up confronting several deeper questions.
How do you distinguish a structural capability from proof of an incident?
How do you make a detection understandable enough for an operator to challenge it?
How do you remove a risky route while keeping legitimate functionality intact?
And how do you verify a response without confusing a simulation with real-world enforcement?
Answering those questions shaped the architecture just as much as choosing Python, React, or NetworkX did.
It also reinforced something we consider essential: a security system should earn trust through evidence, reproducibility, and visible limitations, not through the confidence of its claims.
What's Next?
Aegis Relay is currently a working investigation prototype with deterministic detection, synthetic scenarios, and simulated enforcement.
It is not yet a production security gateway.
Our next steps would focus on moving from controlled investigations toward real operational environments.
- Real agent-system integrations: Ingest observations from agent frameworks, orchestration systems, and tool-use infrastructure.
- Broader detection coverage: Expand beyond the two implemented rules to cover additional multi-agent interaction patterns.
- Persistent investigations: Introduce durable case storage, authentication, and operator-scoped investigation sessions.
- Production control integrations: Connect the planning and verification model to authorized enforcement systems with explicit operator approval.
- Continuous architecture comparison: Detect when evolving interactions create capabilities that were not present in the declared baseline.
Our long-term direction is to make Aegis Relay useful wherever independent agents collaborate through shared tools, memory, data, or delegated execution.
Not to assume that every unexpected interaction is malicious, but to make those interactions visible, investigable, and controllable.
The Bigger Picture
We are moving toward a world where software systems do not just execute predetermined functions.
They delegate tasks, share memory, exchange information, generate artifacts, and coordinate decisions through multiple agents.
The security boundary is no longer always one application, one API, or one permission.
Sometimes, the critical boundary is a handoff.
And the most consequential risk may not belong to any single agent.
It may emerge from what the agents can do together.
Aegis Relay was built to make that risk visible before it gets mistaken for ordinary behavior.
Follow the handoff. Find the risk.
Built by Team ALTF4
Hriday Vig | Dhruv Mohapatra
Explore Aegis Relay: