AegisAIGitHub
zero trust for AI agents

Constrain the
architecture, not
the prompt.

A hosted API that scores an agent's proposed tool call before it executes: rules, an online pattern model, and an LLM judge, over one HTTP request. Call it from any language, any framework.

allow/hold for a human/block/rules/pattern model/llm judge/one composite score/allow/hold for a human/block/rules/pattern model/llm judge/one composite score/
aegisai: intercepting tool calls
    3
    scoring layers, one composite verdict
    60
    requests per minute, per API key
    0.1
    the no-match baseline. never zero
    <5
    minutes from clone to first verdict

    The problem

    Agent safety is mostly enforced by asking the model nicely.

    A system prompt saying “never delete customer records” is advisory. It is a string in a context window competing with every other string in that context window, including any text the agent happens to read from a support ticket. Meanwhile the tools are real: they send email, issue refunds, and drop rows.

    Nothing structural stands between a hijacked agent and the database. AegisAI is that structure. It does not ask the agent to behave. It removes the code path where misbehaving was possible.

    01

    Clone it, run it. No key required yet.

    Falls back to a mock judge and SQLite automatically, so this works with nothing set. Docs at /docs once it's up.

    run it yourself
    $ git clone https://github.com/Navneet-Scaler/AegisAI
    $ cd AegisAI
    $ docker compose up
    02

    Mint a key, score a call.

    No signup. The response comes back with a verdict, the three layer scores, and the judge's reasoning, before anything executes.

    mint a key and call it
    # no signup, returned once
    $ curl -X POST localhost:8000/v1/keys -d "{}"
     
    $ curl -X POST localhost:8000/v1/guard \
    -H "Authorization: Bearer $KEY" \
    -d '{"tool": "delete_customer", "args": {"customer_id": "8842"}}'

    How a call is scored

    Three independent signals. One score.

    The reasoning stays attached. Any layer can escalate, none can silently wave a call through.

    01

    Static rules

    Hard policy that holds regardless of what the model decides. Destructive verbs, spend thresholds, PII access, recipient allowlists. A rule can force a verdict outright.

    02

    Behavioural pattern model

    An online classifier over call features. Argument shapes this agent has never used before score higher. Every human decision updates the weights immediately.

    03

    LLM judge

    A second model asks whether the proposed call actually follows from what the user asked. This is the layer that catches hijacked intent, which name matching alone cannot.

    score = 0.35 * rule + 0.30 * pattern + 0.35 * judge
    
    score >= 0.75          ->  block
    0.40 <= score < 0.75   ->  hold for human approval
    score <  0.40          ->  allow
    any forcing rule       ->  that verdict wins

    Case study

    A prompt injection, caught.

    A support ticket carries “ignore all previous instructions” embedded in the customer's own message, asking for a $300 credit framed as routine goodwill. No rule was ever written for this exact shape, and none should have to be: the judge reads the call's justification against the actual conversation, holds it, and a human reviewing that reasoning blocks it.

    A prompt injected support ticket leads to an update_billing call; AegisAI holds it, the judge names the injected instruction, and a human blocks it

    What it does

    Interception

    • One chokepoint every tool call must pass through
    • Three way verdict: allow, hold for a human, or block
    • Blocked calls return a structured refusal the agent can adapt to
    • Framework agnostic, wraps existing tool calling code

    Scoring

    • Three independent signals combined into one explainable score
    • Per layer sub scores persisted on every call
    • Every dependency fails toward hold, never toward allow
    • Editable policy rules, no redeploy needed

    Learning and audit

    • Online weight updates on every approve or reject
    • Full audit trail of calls, scores, reasoning, and outcomes
    • Block rate and drift tracked over time
    • Per tool and per agent risk breakdown

    Operations

    • Atomic approvals: two concurrent decisions on one call, exactly one wins
    • A crash mid execution can't leave the audit trail understating what ran
    • /health checks the database and judge credentials, not a hardcoded ok
    • Audit export neutralizes formula injection in exported fields

    Score the call.
    Before it runs.