AdverSight
See what your agent missed.
The problem AdverSight solves
AI agents are harder to test than ordinary software. An agent can craft an articulate, perfectly polite response while silently mutating unauthorised database records, leaking user credentials, or hallucinating tool calls across a multi-turn conversation — and no traditional test would ever catch it.
AdverSight is the QA layer that closes that gap. You can use it to:
Audit AI agents before deployment — automatically probe your agent with adversarial multi-turn conversations to surface policy violations, persona injection, and context poisoning before users ever encounter them.
Catch unauthorised tool mutations — it wiretaps the HTTP traffic between your agent and its tools, intercepting the exact parameters sent downstream (not just the response text), so you can verify whether your agent is calling APIs, writing to databases, or triggering side effects it was never meant to.
Enforce declarative safety invariants — define rules like "confirmation required", "these assets are read-only", or "no impersonation bypass" and let AdverSight automatically flag every violation with a full forensic trace: the probe, the agent's reply, the intercepted tool call, and the exact rule broken.
Build a regression suite automatically — every confirmed failure is frozen into a deterministic replay case with a single click, ready to run in CI/CD so the same vulnerability never ships twice.
Protect against prompt injection and role spoofing — specifically stress-tests the boundaries that benchmarks miss: does your agent resist authority-impersonation attacks on turn four? Does it skip confirmation when told there's an "emergency override"?
In short: traditional testing checks what your agent says. AdverSight checks what your agent does.
Challenges we ran into
Challenges We Ran Into
1. Testing a system that tests systems
The hardest meta-problem: how do you write tests for an adversarial QA engine without having another adversarial QA engine? Every detector, evaluator, and attack generator needed a harness that could simulate an agent behaving in dozens of different ways — complying, refusing, hedging, asking for confirmation — and verify the engine classified it correctly. We ended up building a full FlightBookingAgent mock with two distinct modes (vulnerable / hardened) specifically so we had a real, deterministic target to run the engine against. The 437-test suite across 16 phase-organized files was the only way to trust that refactors didn't silently break verdict logic.
2. False positives from contradiction blindness
Early versions of the failure detector would flag a test as UNAUTHORIZED_ACTION even when the agent had explicitly refused the attack and made no tool calls. The detector was reading the attack string — which contained override language — and treating it as evidence of compliance. We had to build a full contradiction resolution pass in the evaluator that classifies the agent's resistance level (HARD_REFUSAL, ASKS_CONFIRMATION, REDIRECT, PARTIAL_COMPLIANCE) at every turn and suppresses or demotes findings that contradict a verified refusal. Getting that logic right — especially for the edge case where an agent asks for confirmation but the follow-up message contains both an affirmation and a bypass attempt — required multiple iterations.
3. Making the system fully reproducible without an LLM key
We wanted the engine to work offline and in CI with zero credentials — but the attack generator and semantic judge both ideally use Gemini. The fix was a three-mode ADVERSIGHT_LLM flag (off / auto / on) and a clean LLMProvider abstraction that lets the discovery layer fall back to deterministic template mutation when no key is present. The reference target agent (FlyBot) got the same treatment — it falls back to a local simulation of both vulnerable and hardened behaviour. Getting the fallback paths to produce consistent test outcomes (so CI doesn't flake depending on whether a key is set) took careful design.
4. SSE streaming across an async/sync boundary
The backend runs synchronous blocking agent calls (the HTTP adapter talks to external agents via httpx) inside an async FastAPI app. The session runs in a background thread, but the EventSource on the frontend expects a live SSE stream from an async endpoint. Wiring the in-memory pub/sub EventBroker across that async/sync boundary — so live tool-call intercepts and test verdicts appear in the dashboard in real time — was the trickiest plumbing problem of the build. We ended up using a threading.Event + asyncio queue bridge that lets the sync runner publish events the async SSE endpoint can yield without blocking the event loop.
5. Credential safety under pressure
At 3 AM during the hackathon sprint, it's easy to accidentally log an API key. We built a recursive sanitize_dict / sanitize_text utility that redacts bearer tokens, basic auth, and any key matching a sensitive-key pattern — and applied it to every surface: HTTP adapter responses, error traces, the JSON export, and the /health endpoint. The invariant that GEMINI_API_KEY is never serialised, never logged, never returned in any response is enforced by the sanitizer, not by discipline.
Tracks Applied (1)
Best Use of Render
Render
Technologies used
