Skip to main content
04

AgentShield

AI Agent Security & Evaluation

AgentShield runs controlled adversarial tests against target AI agents and produces structured security evaluation reports, providing a repeatable way to assess whether an agent resists common attacks.

Phynapse research & engineering project · Synthetic data

01

The business problem

AI agents are increasingly given tool access, system prompts and sensitive data.

There is no lightweight, standardised way to evaluate whether these agents resist common security attacks before they are trusted with real work.

02

What we engineered

A repeatable evaluation pipeline loads curated test suites, sends controlled adversarial inputs to a target agent through an adapter, and evaluates the responses with deterministic evaluators, supplemented by an optional semantic evaluator. Results are normalised into findings with evidence, reasoning and recommendations.

03

What the system does

Five test categories

Prompt injection, jailbreak, data leakage, tool security and unsafe behaviour.

Curated test cases

Structured, versionable JSON test suites with metadata.

Two-tier evaluation

Deterministic pattern-based evaluators, plus an optional model-assisted semantic evaluator for inconclusive cases.

Clear verdicts

Pass, fail, inconclusive or error, with five severity levels.

Structured findings

Evidence, reasoning and recommendations for each finding.

Report export

JSON and Markdown reports for review and record-keeping.

04

Design decisions

  1. 01

    A modular monolith: no microservices, queues or Kubernetes required.

  2. 02

    Target responses are treated as untrusted input; report output is sanitised.

  3. 03

    SSRF protection blocks private and internal targets in production mode.

  4. 04

    Credentials are held in memory only, never persisted or logged.

05

How information moves through the system

  1. 1

    Test suite loader

    Curated adversarial test cases.

  2. 2

    Target agent adapter

    Controlled requests to the agent under test.

  3. 3

    Evaluation engine

    Deterministic, semantic and tool/policy evaluators.

  4. 4

    Normalised result

    Verdict and severity per test.

  5. 5

    Findings & report

    Structured findings exported as JSON or Markdown.

06

Built with

  • Python
  • FastAPI
  • Pydantic
  • httpx
  • React + TypeScript
  • pytest
  • Docker

As documented in the project repository.

07

What this project is, and is not

  • Engineered evaluation platform at MVP stage: in-memory state and no user authentication.
  • Test coverage is curated, not exhaustive; pattern matching cannot catch every attack variation.
  • Single-turn evaluation only; multi-turn conversations are not assessed.
  • Tool security tests evaluate stated intent, not actual tool execution.

Review the engineering in the open.

The full source, documentation and tests for AgentShield are available on GitHub.