Skip to content
Invaris Labs

Open sourceAgentSec · AgentAuth · Dashboard

Security infrastructure for autonomous AI agents.

Agents read private data, invoke tools, delegate work, talk to other agents and take actions with real consequences. Application security and identity systems weren't designed for software that decides what to do at runtime.

Invaris Labs builds the infrastructure to test how agents behave, and to identify and authorize what they do.

pip install invaris-agentsec
An autonomous agent reads user prompts, retrieved documents, tool and MCP results and memory, then acts through tool calls, APIs, sub-agents and payments. AgentSec tests this workflow adversarially before production. AgentAuth gives the agent a cryptographic identity and checks scoped authority on every request.
AGENTSECAdversarial scenarios across the whole workflow, before production

Reads

  • User prompts
  • Retrieved documents
  • Tool & MCP results
  • Memory

Agent

autonomous

did:agent:QmfJZCnu…GjQmDRiMxux

Ed25519 · signs every request

Acts

  • Tools · MCP servers
  • APIs & databases
  • Sub-agents
  • Payments
AGENTAUTHIdentity and scoped, delegable authority, verified on every request

Products: Three open-source projects for agents that act with real authority.

AgentSec tests how an agent behaves under attack, and the AgentSec Dashboard keeps every run's findings and history in one place. AgentAuth gives the agent a verifiable identity and bounds what it is allowed to do.

AgentSec: Test agents before they reach production.

AgentSec is an open-source framework for adversarial security and reliability testing of AI agents. It runs stateful attack scenarios, from prompt injection and tool poisoning to unauthorized actions, against complete agent workflows (LLMs, retrieval, memory, MCP servers, tools and sensitive actions), records the full execution trace, and checks that your security policy holds from the first step to the last.

$ agentsec test
Invaris AgentSec

42 scenarios executed
36 passed
6 findings

CRITICAL  Indirect prompt injection triggered send_email
HIGH      Retrieved confidential content appeared in the response
HIGH      Agent attempted a forbidden payment action
MEDIUM    Tool-call budget exceeded

Report written to .agentsec/report.json
Report written to .agentsec/report.html

Commands and output from the AgentSec README. Lines starting with # describe documented behaviour.

version: "1"agent:  name: support-agent  endpoint: http://localhost:8000/agentallowed_tools:  - search_documents  - create_draftforbidden_actions:  - send_email  - reveal_credentials  - execute_paymentlimits:  max_steps: 12  max_tool_calls: 10  max_cost_usd: 0.50tests:  - prompt_injection  - indirect_prompt_injection  - secret_extraction  - unauthorized_tool_use  - tool_output_poisoning  - unsafe_retrieved_documents  - loop_and_budget_limits

Policies declare what the agent may do. Tests assert behaviour, not a particular model response.

Coverage

What AgentSec tests

Every check is deterministic and opt-in by declaration. Findings are mapped to the OWASP Top 10 for Agentic Applications (opens in a new tab) (ASI01–ASI10).

Injection & poisoning

Untrusted content that tries to steer the agent.

  • Direct & indirect prompt injection

    prompt_injection · indirect_prompt_injection

    Instructions arriving from the user, or hidden in documents and tool results.

  • Tool-output & MCP-server poisoning

    tool_output_poisoning

    Adversarial content delivered through the results of the tools the agent calls.

  • Unsafe retrieved documents

    unsafe_retrieved_documents

    Retrieval pipelines that hand the agent hostile or confidential content.

  • Memory poisoning

    memory_poisoning

    Malicious instructions persisted to memory and acted on in a later session.

Authority & actions

What the agent does, and whether anyone authorised it.

  • Unauthorized tool use

    unauthorized_tool_use

    Calls to tools outside the policy's allowed set, including forbidden decoys.

  • Action without authorization

    action_without_authorization

    Effects a tool may perform globally but the current task never authorised.

  • Dangerous compositions

    dangerous_composition

    Individually allowed calls chained into exfiltration or command execution, tracked as data flow.

  • Identity & session confusion

    identity_and_session_confusion

    Acting on another user's resource or reusing a permission from another session.

  • Multi-agent privilege abuse

    multi_agent_delegation

    Sub-agents exceeding their role, confused-deputy escalation, unauthorized delegation.

Data & reliability

Leaks, runaway behaviour and drift.

  • Secret & sensitive-data leakage

    secret_extraction

    Synthetic credentials and confidential data appearing where they shouldn't.

  • Loops, budgets & cost

    loop_and_budget_limits

    Excessive steps, tool calls, tokens or cost, and missing termination.

  • Deceptive action reports

    deceptive_action_report

    Agents denying a side effect the trace shows, or claiming work that never happened.

  • Behavioural regressions

    agentsec compare

    New, fixed and worse findings across model, prompt and tool updates.

Categories that need tool_effects or agent_roles build no scenarios without them, and a multi-agent scenario run against a system that reports no agent attribution is reported as not observable, never as passed. Unauthorized financial and on-chain actions are covered by a bundled attack pack and the policy's spend_limits / address_allowlist. What a passing test does and doesn't prove (opens in a new tab).

MCP security: Scan the servers. Attack through them.

MCP servers hand agents tool descriptions and tool results, both of which can carry instructions. AgentSec tests the server definitions statically and delivers adversarial scenarios through MCP itself.

MCP testing docs (opens in a new tab)

agentsec mcp scan

Lists a server's tools, resources and prompts without calling, reading or fetching any of them, and flags:

  • Poisoned tool descriptions
  • Hidden / invisible characters
  • Tool shadowing
  • Homoglyph tool-name impersonation
  • Lying read-only / destructive annotations
  • Forbidden or unlisted tools
  • Rug pulls: pin definitions, compare across runs

agentsec test --mcp-listen

AgentSec becomes the MCP server your agent connects to, delivering the same adversarial scenarios through MCP tool results.

# agent ⇄ MCP ⇄ AgentSec

agentsec test --mcp-listen 127.0.0.1:8765

The MCP attack host has been run against a real LLM-backed agent (the Claude Code CLI, built-in tools disabled, every MCP tool simulated), with results checked into the repo.

Workflow

Built for the way you already ship.

AgentSec is CI-first. Exit codes gate the job (1 on findings, 2 on configuration errors), --seed makes runs reproducible, and reports compare across pull requests.

  1. 01

    Build agent

    agentsec init

    Declare allowed tools, forbidden actions and limits.

  2. 02

    Run AgentSec

    agentsec test

    Stateful adversarial scenarios against the full workflow.

  3. 03

    Detect failures

    .agentsec/report.html

    Input, trace, violated policy and observed action.

  4. 04

    Fix

    agentsec replay

    Re-run findings with the recorded seed to confirm the fix.

  5. 05

    Regression test

    agentsec compare

    Diff reports on every pull request; exit 1 on regressions.

  6. 06

    Ship

    uses: invarislabs/invaris-agentsec@main

    The packaged GitHub Action gates the job.

Reports
Terminal, JSON, self-contained HTML, Markdown and SARIF 2.1.0. Secrets masked in every format.
CI
Workflow annotations and job summary in GitHub Actions, a packaged Action with baseline comparison and PR comments, and SARIF to GitHub Code Scanning.
Frameworks
OpenAI-compatible HTTP (optionally streaming), LangChainAdapter for LangChain and LangGraph, and a generic CallableAdapter for in-process agents.
Extending
Python API, a pytest plugin, and attack packs, with reference packs for coding, browser, RAG, customer-support and on-chain agents.
  • Evidence over scores

    Every finding includes the input, trace, violated policy and observed action.

  • Stateful testing

    Tests cover complete workflows rather than isolated prompts.

  • Local by default

    Test locally without sending private traces to a hosted service.

  • Reproducible

    A failed scenario is replayable with the same configuration and evidence.

AgentAuth: Give every agent an identity. Control what it can do.

AgentAuth gives each AI agent a self-certifying DID backed by an Ed25519 keypair. The agent proves who it is by signing every request. Capability grants say what it may do, and anyone can verify all of it without trusting the registry.

AgentAuth request flow: agent identity, signed request, scoped authority, delegation, verification.

did:agent:QmfJZCnucexGhSZqdsAcKnFcv4RxyhPFMUiGjQmDRiMxux

└─ sha2-256 multihash of the agent's signed inception event

Authorization: AgentSig did="…",kid="…#key-1",aud="api.example.com",ts="…",nonce="…",sig="…"

  1. 01

    Agent identity

    did:agent:Qm…

    A self-certifying DID derived from the agent's own Ed25519 key material and signed inception event. The registry can't mint or reassign it.

  2. 02

    Signed request

    Authorization: AgentSig …

    Every request is signed over method, path, body, audience, timestamp and a single-use nonce. No API key or bearer token crosses the wire.

  3. 03

    Scoped authority

    AgentGrant

    A short-lived capability grant: iss lets sub do scope at aud until exp. Default 15 minutes, maximum 24 hours.

  4. 04

    Delegation

    scope ⊆ parent · depth − 1

    An agent can pass a narrower slice to a sub-agent. Scopes, audiences, validity windows and limits only shrink.

  5. 05

    Verification

    root_policy

    The service checks every link, that the leaf signed the request, that the root is a principal it trusts, and that nothing is revoked.

Delegation

Authority narrows as it's delegated. It never widens.

A person issues an agent a short-lived, scoped grant. The agent can pass a narrower slice to a sub-agent, and every action traces back to the human who authorized it.

Scopes, audiences and validity windows only shrink, and depth strictly decreases. Limits on resources, spend, rate and uses can only tighten, and a hand-crafted grant that loosens one is rejected by the service.

Counters are shared across the chain. Give an agent a 50 USD budget and let it hand two sub-agents 30 USD each: together they still can't spend more than 50 USD.

  • Scopes

    tools.* covers tools.search

  • Lifetimes

    15 min default · 24 h max

  • Depth

    strictly decreases

  • Expiry

    clamped to the parent's

Delegation narrows authority. arunima grants shopper payments.* with a 5000 USD-cent budget, 2000 per call, 10 calls per 60 seconds and depth 1. shopper delegates payments.buy to helper with a 3000 budget and depth 0. A child grant with a 9000 budget would exceed its parent and is refused.
authoritynarrower →
arunima(human)──▶shopper

payments.*

  • --budget 5000
  • --per-call 2000
  • --rate 10/60
  • --depth 1
shopper(agent)──▶helper

payments.buy

  • --budget 3000
  • per-call ≤ 2000
  • rate ≤ 10/60
  • depth 0
shopper ──▶ helper--budget 9000

Refused: a child grant can't exceed its parent on any limit.

Example from the AgentAuth README. Amounts are integer USD-cents; floats are never signed.

Control

Revoke it, rotate it, switch it off, cap it.

  • Revocation that cascades

    POST /v1/revocations

    An issuer revokes one of its grants by id. Revoking a grant, or switching off any agent in the chain, cuts off everything below it.

  • Kill switch

    agentauth deactivate did:agent:… --as arunima

    An agent can be killed by itself, or by the human or org controller that countersigned its creation.

  • Rotation with pre-rotation

    agentauth rotate researcher

    The next key is committed in advance, so the current key alone can't rotate the identity. Relying parties pick up the new key automatically.

Grant limits and how they are enforced
LimitMeaning
resourcesWhat the call may touch: an exact pattern, or a prefix ending in *Enforced: Per call
spend.per_callMax amount for one callEnforced: Per call
spend.totalMax amount across all calls under this grantEnforced: Shared ledger
rateMax count calls per per seconds (sliding window)Enforced: Shared ledger
usesMax total callsEnforced: Shared ledger

Fail-closed: a resource-limited grant is refused at any endpoint that doesn't declare a resource, an unknown limit field invalidates the grant, and a mismatched spend unit is refused.

In practice

CLI, SDK and a FastAPI integration.

agentauth serve &                                            # registry :8000agentauth init arunimaagentauth init researcher --controller arunimaagentauth init summarizer --controller researcher# arunima → researcher (may delegate once) → summarizer (search only)agentauth grant arunima researcher --scope 'tools.*' --aud 127.0.0.1:9000 --depth 1 -o researcher.grantagentauth grant researcher summarizer --scope tools.search --aud 127.0.0.1:9000 \          --parent researcher.grant -o summarizer.grantagentauth inspect summarizer.grant# Revoke the root grant; the summarizer loses access tooagentauth revoke arunima <grant-id-from-inspect># Limits: a 50 USD budget (max 20 USD per call, 10 calls/min) that can be split onceagentauth grant arunima shopper --scope 'payments.*' --aud 127.0.0.1:9000 --depth 1 \          --budget 5000 --per-call 2000 --rate 10/60 -o pay.grantagentauth grant shopper helper --scope payments.buy --aud 127.0.0.1:9000 \          --budget 3000 --parent pay.grant -o helper.grant       # --budget 9000 would be refused

Snippets from the AgentAuth README.

Verification

What a service checks before it says yes.

  • Every link is signed by its issuer's current key

    No forged or stale grants

  • Each issuer is the previous link's subject

    The chain is unbroken

  • Scopes, audiences and validity only shrink; depth strictly decreases

    Delegation can't escalate

  • The leaf's subject is the agent that signed the request

    A stolen grant is useless to anyone else

  • The request signature covers the AgentGrant header

    The agent asserts which authority it's using

  • The root issuer is a principal the service trusts

    The service decides whose word counts

  • Nothing in the chain is deactivated or revoked

    Revocation and kill switches cascade

Why not API keys?

Shared secrets were built for services, not agents.

  • Shared secrets leak through logs, prompts and tool output

    Private key never leaves the agent; requests carry signatures

  • A leaked key can be replayed anywhere, forever

    Signatures are bound to method, path, body, audience (host), a timestamp and a single-use nonce

  • Identity = whatever the issuer's database says

    DID is derived from the agent's own key material; the registry can't mint or reassign it

  • Rotation means coordinating a new secret everywhere

    Rotate with one call; relying parties pick up the new key automatically

  • Stolen key = full takeover

    Pre-rotation: the next key is committed in advance, so the current key alone can't rotate the identity

  • No link between an agent and who's responsible for it

    Optional controller (a human or org DID) countersigns the agent's creation and holds a kill switch

v0.4Shipped: identity (v0.1), delegated grants (v0.2), limits (v0.3), and in v0.4 production hardening, an internal security review with every finding fixed, and a TypeScript verifier that shares test vectors with Python. It hasn't had an independent security audit yet; the threat model lists the known gaps.

AgentSec Dashboard: Every AgentSec run, in one place.

The hosted dashboard for AgentSec reports. Teams upload the report.json files AgentSec writes from CI or their machines, and get every run of every agent together: findings with their evidence, full traces, history across runs, and what changed between any two runs.

From test to review: AgentSec writes report.json, agentsec upload or the GitHub Action sends it to the dashboard, and the dashboard shows every run with findings, traces, history and comparisons.
  1. 01

    Test

    agentsec test

    AgentSec runs its scenarios against your agent and writes report.json, in CI or on your machine.

  2. 02

    Upload

    agentsec upload

    Or the AgentSec GitHub Action with dashboard-url and dashboard-token. Branch, commit, CI-run link and label are recorded.

  3. 03

    Review

    project · run · compare

    Every run of every agent in one place: findings with evidence, full traces, history, and what changed between any two runs.

Sending reports

One command after the test run.

Sign in with GitHub, create a project and a project upload token, then upload from your machine or from CI. In GitHub Actions, the AgentSec Action takes dashboard-url and dashboard-token inputs, and a failed upload is a warning, never a failed job.

# create a project and an upload token in the dashboard, then:export AGENTSEC_TOKEN=asp_...agentsec test --policy agentsec.yamlagentsec upload .agentsec/report.json --server http://localhost:8000

Snippets from the Dashboard README.

Honest verdicts

Not reached isn't passed.

  • passed
  • findings
  • error
  • not observable
  • inconclusive

Verdicts follow AgentSec. Inconclusive means the adversarial content never reached the agent: it didn't open the poisoned email or page, or stopped before a mid-task injection. Nothing was measured, so it is never shown or counted as passed.

A finding whose scenario is inconclusive in the newer run is never counted as fixed, and rates are computed over tested scenarios only.

The numbers come from AgentSec's own code, so the hosted dashboard, the local agentsec dashboard and the CLI always agree.

What you see

Findings, evidence and history, run after run.

  • Project page

    history

    The latest run's verdict and how it changed from the run before, a findings-per-run chart by severity (filter by agent and branch), and every run with its CI link.

  • Report views

    OWASP ASI01–ASI10

    Scenario grid by attack category, attack vectors and tools called. Findings with evidence and agentsec replay commands, traces as timelines, the policy as run, and MCP scans.

  • Attack goals and timelines

    attack_goals

    For each achieved attack goal: which tool result delivered the payload, and which later tool call achieved the attacker's goal. The trace marks both events.

  • Baseline vs hardened

    compare

    Comparing two runs shows what each measured and every scenario whose verdict changed, so hardening that only stopped the agent reading the poisoned content isn't mistaken for a fix.

  • Download and replay

    report.json

    Download any run's original report.json and replay it locally. agentsec replay reports each finding as reproduced, not reproduced, inconclusive or error.

  • Upload tokens

    asp_…

    Per-project tokens that can only upload. Shown once, stored as SHA-256 hashes, revocable, with last-used times.

The dashboard shows what the report records and never presents findings as a model's behaviour. A scripted backend is labelled as a scripted stand-in.

Security

Built to display hostile reports.

  • Report text is treated as hostile

    Inserted as text only, never parsed as HTML, under a strict CSP. Invisible characters and look-alike tool names are made visible.

  • Minimal GitHub sign-in

    Only the GitHub id, login, name and avatar are kept. The OAuth access token is used once to read the profile and discarded.

  • Signed, HttpOnly session cookies

    State-changing requests must come from the dashboard's own origin. Uploads use bearer tokens, never the cookie.

  • Not found and not allowed look the same

    Both return 404 across projects, reports and tokens.

  • Gzip bombs are refused

    Uploads may be gzip-compressed; the size limit is enforced after decompression.

  • Production refuses weak config

    It won't start with a weak SECRET_KEY, with development sign-in enabled, or without GitHub OAuth.

Security details ↗ (opens in a new tab)

The Invaris agent security stack: Behaviour and authority, secured separately.

AgentSec determines whether an agent behaves safely. AgentAuth determines who the agent is and what it is allowed to do. The AgentSec Dashboard keeps the evidence and history of every test run. Together they're the beginning of the Invaris agent security stack.

The Invaris agent security stack: AgentSec for testing, AgentAuth for identity and authorization, and the AgentSec Dashboard for reviewing test runs, all around the agent.

Research & writing: Notes from building agent security in the open.

Technical writing and research notes by Arunima Chaudhuri on how agents fail, how to test for it, and what a test result actually proves.

All writing on Hashnode (opens in a new tab)

Community: Questions from people building agents.

Developers asked hard questions about AgentSec when it launched. Here they are, word for word, with the answers.

Evidence & replay

X

Nice, testing agents the way an attacker would is overdue. One request: tag each finding with the tool call and arguments that triggered it. That turns a failed test into a rule you can enforce at the call, and lets you re-run to prove the fix holds.

DVARA@dvarahq

It already does. Every finding carries the exact trace events behind it: tool name, arguments, sequence number. agentsec replay re-runs just that finding against the fixed agent to prove the fix holds. Enforcing it at call time is the runtime half we're prototyping now.

Arunima Chaudhuri · reply

Correct tool, wrong intent

X

This is the category classic threat modeling completely misses — CVE-style frameworks assume the vulnerability is in the code, not in a decision the agent was authorized to make. ‘Correct tool, wrong intent’ isn’t a permissions bug, RBAC can’t see it.

Animesh Shaw@animesh_infosec

Exactly. The tool call is valid, the permission exists, the code has no bug. What’s wrong is that this task never authorized it. You can only catch that by comparing what the agent did against what the user actually asked for, per task, not per role.

Arunima Chaudhuri · reply

Inconclusive ≠ pass

Hashnode

The read_inbox trace is the scariest kind of green: the poisoned body was never fetched because the agent never called open_email, and it still counted as a pass. I've seen the same thing in my own evals where a RAG agent never retrieved the adversarial doc and the score looked like resistance. Splitting that into inconclusive feels right. How do you keep teams from reading a pile of inconclusives as passes on dashboards?

Kartik N V J K

Agreed, a run that never fetched the poisoned body is the scariest kind of green. A few rules, all in one shared module so the CLI, compare and both dashboards can’t drift apart:

  • The finding rate is calculated over tested scenarios only. If nothing was tested, it’s null, not 0%.
  • Coverage (tested / total) sits right next to it, so “0 findings, 20% coverage” reads as “we barely measured,” not “safe.”
  • A run with inconclusive scenarios is never labelled “all passed,” and the CLI prints a warning that N scenarios were inconclusive, not passed.
  • In compare, a finding is never called “fixed” if that scenario was inconclusive in the newer run. Not reaching the poisoned doc doesn’t count as a fix.

If you’d like to try it on your RAG evals, I’d love to know whether the delivery tracking catches your case: github.com/invarislabs/invaris-agentsec

Arunima Chaudhuri · reply

Multi-agent delegation

X

mcp attacks are basically confused deputy again, server trusts the client, client trusts the agent, agent gets owned. does it test permissions across that whole chain or just per tool

Harley Lewis Foote@harleyfoote_

Across the chain. AgentSec 0.7 records who acted and who delegated (including MCP clientInfo), then checks that authority only narrows as it's handed down. A planner can't launder a forbidden call through an executor. Confused deputy is one of the test cases.

Arunima Chaudhuri · reply

Exposure vs. ordering

Hashnode

Exposure tracking and causal ordering both have to line up before the inconclusive status can be attached to anything. Exposure tracking gets you the first half and causal ordering the second. Can the two disagree, and what does the harness report when they do? If the ordering is reconstructed from the agent's own logs, the verdict inherits whatever the agent decided to record, which is the same trust problem the verdict is meant to solve.

Adam Lewis

Good question. In the default setup they can’t disagree, because they come from the same place. AgentSec runs the simulated tools itself, so it is the one that serves the poisoned email. Exposure is the harness’s own record of the tool result that carried the injection, and every event gets one sequence number from the harness. A finding needs a goal-matching call with a higher sequence number than delivery, and calls before delivery don’t count. Nothing is rebuilt from the agent’s logs.

Your concern does apply to agents that run their own tools and report them back to us. Then the trace is the agent’s account, and the verdict inherits whatever it chose to record. Those events are flagged executed_by_agent in the report, but flagging isn’t verification. The real fix is observing independently, below the agent: for example, logging network egress per test case. That’s on the roadmap.

Arunima Chaudhuri · reply

Names the call, not a banner

X

Catching an agent doing something I never asked only counts if the report names the tool call. I will look for that call, not a warning banner.

剑的 AI 实验室@swordBluesy

Fully agree. Happy to have you try to break it. AgentSec reports the offending call itself, not a warning. If you find a case where it flags without naming the call, I’d treat that as a bug.

Arunima Chaudhuri · reply

Injection from pages & email

X

most of the nasty stuff doesn't come thru the chat box either, it's hidden in the page or email the agent reads mid-task. does it cover that?

Wyatt Brocato@thewyattbrocato

Yep. Indirect injection and tool-output poisoning are their own attack categories, plus checks for untrusted content getting executed or used to leak private data. Anything a tool returns (page, email) is untrusted. Dedicated inbox/browser pack is next.

Arunima Chaudhuri · reply

Null, not 0.0

Hashnode

Giving "not measured" its own value all the way to the last consumer is the part I'd copy. A finding rate of null reads as no measurement, where 0.0 reads as perfect. We label figures the same way at ML Systems up in Rhode Island: measured, modeled, or aspirational.

Salman Parvez

Thanks Salman, that’s exactly the reasoning. A 0.0 that really means “we never checked” is worse than no number, because it looks like proof. Your measured / modeled / aspirational split is a nice way to put it, and I like that it makes the confidence visible right next to the figure.

AgentSec is open source if you’d like to try it: GitHub. If you have agents in your stack at ML Systems, I’d love to hear what it catches and what it misses. And if you find it useful, a star helps more people find it.

Arunima Chaudhuri · reply

Not observable ≠ pass

Hashnode

“When a scenario can't be judged, it isn't a pass” is the line that stuck with me. I'd want the same rule for records: an entry nobody could judge carries that state, it doesn't default to green. I also like that question five asks on whose authority, not only which agent.

Salman Parvez

Yeah, exactly. If something can't be judged, that should stay visible instead of quietly turning into “safe.” And I agree — knowing whose authority the agent acted on matters just as much as knowing which agent acted.

Arunima Chaudhuri · reply

Task intent

Hashnode

Allowed is not authorized is the right distinction, and the yes-or-no question that turned into a commit is the perfect origin story: the agent held the tool rights but had no authorization for that effect. The five authority questions are what an allowlist structurally cannot answer. When you check 'did the task authorize this effect', how do you represent the task's intent so tool_effects can be matched against it?

Kartik N V J K

Great question, Kartik! The idea is to capture the user's original request as the source of authority, then evaluate tool effects against what that request actually permits — not just which tools the agent can access. The tricky part is translating natural-language intent into explicit constraints without assuming permissions the user never granted. That's one of the problems I'm exploring with AgentSec!

Arunima Chaudhuri · reply

Per-hop audit

X

Does the audit show which hop narrowed the scope, or only the final effective authority?

AXIALIS | Desktop App Tools@AxialisSoftware

Per hop. The finding names the agent in the chain that lacked the authority, the effects it was missing, and the full path (planner -> researcher -> executor). Every trace event also carries actor + delegated_by, so you can audit each hand-off.

Arunima Chaudhuri · reply

Verifying a fix

X

Can you replay a captured attack after changing the agent permissions? That would make it easier to tell whether the fix actually closes the hole.

Spoorthi@spoorthiv20

Yes, that's exactly what agentsec replay does. Change the permissions, point it at the new policy, and each finding comes back REPRODUCED or NOT REPRODUCED. agentsec compare diffs two full runs, so you can gate CI on it.

Arunima Chaudhuri · reply
01 / 12

FAQ: AI agent security, answered.

What AgentSec, AgentAuth and the AgentSec Dashboard do, what they test, and how they fit into the way you already build agents.

What is Invaris Labs?

Invaris Labs builds open-source security infrastructure for autonomous AI agents: AgentSec for adversarial security and reliability testing, the AgentSec Dashboard for keeping every test run and its evidence in one place, and AgentAuth for cryptographic agent identity and delegated authorization.

What is AgentSec?

AgentSec is an open-source Python framework for testing AI agents adversarially. It runs stateful attack scenarios against a complete agent workflow (the LLM, retrieval, memory, MCP servers, tools and sensitive actions), records the execution trace, and checks every step against a security policy you declare in agentsec.yaml. Install it with pip install invaris-agentsec.

Which AI agent security risks does AgentSec test for?

Direct and indirect prompt injection, tool-output and MCP-server poisoning, unsafe retrieved documents, memory poisoning, unauthorized tool use, actions the task never authorized, dangerous tool chains, identity and session confusion, multi-agent privilege abuse, secret and sensitive-data leakage, loops and budget overruns, deceptive action reports, and behavioural regressions between runs. Findings are mapped to the OWASP Top 10 for Agentic Applications (ASI01–ASI10).

Is AgentSec an AI red-teaming or penetration-testing tool?

It automates the adversarial part. AgentSec plays the attacker against your agent with seeded, reproducible scenarios and judges the outcome with deterministic checks against your policy, so the same attacks can run in CI on every pull request. It is a framework you run yourself, not a hosted or manual penetration-testing service.

How does AgentSec test MCP servers?

In two ways. agentsec mcp scan lists a server's tools, resources and prompts without calling them and flags poisoned tool descriptions, hidden characters, tool shadowing, homoglyph tool names, misleading annotations, forbidden or unlisted tools, and rug pulls. agentsec test --mcp-listen makes AgentSec the MCP server your agent connects to, so attack scenarios arrive through MCP tool results.

How does AgentSec run in CI?

AgentSec is CI-first. It exits with code 1 on findings and 2 on configuration errors, --seed makes runs reproducible, and agentsec compare diffs reports across pull requests. It ships a pytest plugin and a packaged GitHub Action, and writes SARIF for GitHub Code Scanning alongside terminal, JSON, HTML and Markdown reports.

Does AgentSec send my agent's traces to a hosted service?

No. AgentSec runs locally by default, so private traces stay on your machine. Uploading a report to the AgentSec Dashboard is a separate, explicit step with agentsec upload.

What is AgentAuth?

AgentAuth provides cryptographic identity and delegated authorization for AI agents. Each agent gets a self-certifying DID backed by an Ed25519 keypair and signs every request. Short-lived capability grants say what it may do; an agent can delegate a narrower grant to a sub-agent, and a service can verify the whole chain without trusting the registry. Install it with pip install invaris-agentauth.

Why not just give AI agents API keys?

Shared secrets leak through logs, prompts and tool output, and a leaked key can be replayed anywhere. With AgentAuth the private key never leaves the agent: each request carries a signature bound to its method, path, body, audience, a timestamp and a single-use nonce. Delegated grants can only narrow, revocation cascades down the chain, and an optional human or organization controller holds a kill switch.

What is the AgentSec Dashboard?

A hosted dashboard for AgentSec reports. Teams upload the report.json AgentSec writes from CI or their machines and see every run of every agent in one place: findings with their evidence, full traces, history across runs, and what changed between any two runs. Its code is open source and it can be self-hosted with Docker.

Are the tools open source?

Yes. AgentSec, AgentAuth and the AgentSec Dashboard are developed in the open on GitHub under the invarislabs organization. All three are licensed under Apache-2.0, and AgentSec and AgentAuth are published on PyPI as invaris-agentsec and invaris-agentauth.

About Invaris Labs: A new execution model needs its own security infrastructure.

Traditional software follows execution paths someone wrote down. Agents interpret untrusted input, choose their own tools, retain memory and make decisions at runtime. A single poisoned document or tool response can change what they do.

Invaris Labs is building security infrastructure for that model: open, testable and verifiable without asking anyone to trust a black box.

Agents are increasingly able to
  • 01readsensitive data
  • 02invoketools
  • 03callAPIs
  • 04modifysystems
  • 05delegatework to sub-agents
  • 06messageother agents
  • 07performactions with real consequences

Founder

Arunima Chaudhuri

Arunima founded Invaris Labs and builds AgentSec, the AgentSec Dashboard and AgentAuth. She is a Research Engineer at Status, previously interned at Status, Hyperledger and Solana Labs, and holds an M.Tech in Computer Science and Engineering from NIT Warangal (2025).

  • Distributed systems
  • Peer-to-peer protocols
  • Ethereum protocol research
  • AI agent security
  • Open-source engineering

Open source: Built in the open. Read the code, break the tools.

Security infrastructure should be inspectable. Explore the code, try the tools against your own agents, open issues, contribute, and star the repositories if they're useful.

Where AgentSec welcomes contributions

All three projects are under active development. If you're building an agent and want to be an early design partner, open a discussion or get in touch.

  • Adversarial test cases
  • Agent & framework adapters
  • MCP security testing
  • Deterministic evaluators
  • Trace schemas & interoperability
  • Sandboxing & safe execution
  • Docs & vulnerable examples