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.
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 promptsinput
Retrieved documentsuntrusted
Tool & MCP resultsuntrusted
Memorypersistent
Agent
autonomous
did:agent:QmfJZCnu…GjQmDRiMxux
Ed25519 · signs every request
Acts
Tools · MCP serversinvoke
APIs & databasesmodify
Sub-agentsdelegate
Paymentsirreversible
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.
01
AgentSec
TEST
Does the agent behave safely?
Open-source adversarial testing for AI agents. Runs stateful attack scenarios, from prompt injection to MCP poisoning, against complete agent workflows and verifies your policy holds throughout.
Cryptographic identity and delegated authority for AI agents. Self-certifying DIDs, signed requests instead of API keys, and scoped grants that only narrow as they're delegated.
The hosted home for AgentSec reports. Upload report.json from CI or your machine and see every run with findings, evidence, traces, history and run-to-run comparison.
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.
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.
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.
01
Build agent
agentsec init
Declare allowed tools, forbidden actions and limits.
02
Run AgentSec
agentsec test
Stateful adversarial scenarios against the full workflow.
03
Detect failures
.agentsec/report.html
Input, trace, violated policy and observed action.
04
Fix
agentsec replay
Re-run findings with the recorded seed to confirm the fix.
05
Regression test
agentsec compare
Diff reports on every pull request; exit 1 on regressions.
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.
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.
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.
03→
Scoped authority
AgentGrant
A short-lived capability grant: iss lets sub do scope at aud until exp. Default 15 minutes, maximum 24 hours.
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.
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
Limit
Meaning
Enforced
resources
What the call may touch: an exact pattern, or a prefix ending in *Enforced: Per call
Per call
spend.per_call
Max amount for one callEnforced: Per call
Per call
spend.total
Max amount across all calls under this grantEnforced: Shared ledger
Shared ledger
rate
Max count calls per per seconds (sliding window)Enforced: Shared ledger
Shared ledger
uses
Max total callsEnforced: Shared ledger
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
agentauth serve --db agentauth.db &# registry on 127.0.0.1:8000agentauth init arunima --meta kind=human # a human principalagentauth init researcher --controller arunima \--meta model=claude # an agent she ownsagentauth whoami researcher # authenticated call, signed with the agent's keyagentauth rotate researcher # move to the pre-committed keyagentauth resolve did:agent:… --verify# replay the full log locallyagentauth agents arunima # everything arunima controlsagentauth deactivate did:agent:… --as arunima # kill switch
from agentauth importLimitsroot = human.grant(researcher.did, ["tools.*"], ["tools.example.com"], ttl=900, depth=1, limits=Limits.build(resources=["repo:acme/*"], rate=(30, 60)))chain = researcher.grant(summarizer.did, ["tools.search"], ["tools.example.com"], parent=root, limits=Limits.build(resources=["repo:acme/website"], uses=20))httpx.post("https://tools.example.com/search", json={"q": "…"}, auth=summarizer.httpx_auth(chain))reg.revoke_grant(human, root.leaf.id) # summarizer is cut off too
from agentauth importGrantVerifier, RegistryRevocationChecker, trust_principalsfrom agentauth.backends.redis importRedisNonceCache, RedisUsageLedgerfrom agentauth.integrations import fastapi_authorizerreg = RegistryClient("https://registry.example.com")keys = RegistryKeyResolver(reg, ttl=30)require = fastapi_authorizer(RequestVerifier(keys, audiences={"tools.example.com"}, nonce_cache=RedisNonceCache(REDIS_URL)), # shared by all replicasGrantVerifier(keys, root_policy=trust_principals({ORG_DID: ["tools.*"]}), revoked=RegistryRevocationChecker(reg, ttl=5), ledger=RedisUsageLedger(REDIS_URL)), # budgets shared by all replicas)@app.post("/search")defsearch(body: dict, agent = Depends(require("tools.search"))):return {"caller": agent.did, "on_behalf_of": agent.principal, "chain": agent.via}
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.
API keys for agents
AgentAuth
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.
01→
Test
agentsec test
AgentSec runs its scenarios against your agent and writes report.json, in CI or on your machine.
02→
Upload
agentsec upload
Or the AgentSec GitHub Action with dashboard-url and dashboard-token. Branch, commit, CI-run link and label are recorded.
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
# Postgres plus the app, development sign-in ondocker compose up --build
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.
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.
A research note on what an AgentSec pass is made of. Runs against seven frameworks, two memory stores and the Claude Code CLI show five ways to pass without the agent resisting anything, and why passes need the same evidence findings get.
A hands-on guide to AgentSec 0.7's authority checks: did the task authorize this effect, where did private data go, did the agent's report match its trace, whose resource did it touch, and which agent acted on whose authority.
A hands-on walkthrough from installing AgentSec and attacking a deliberately vulnerable practice agent, to writing a policy for your own agent, then on to replay, regression comparison, GitHub Actions, model-assisted judging and MCP server scanning.
I asked a coding agent whether something was right or wrong. Instead of a yes or no, it made the changes and committed them. On the boundary between what an agent is asked to do and what it is able to do, why a document should never be able to grant an agent permission it didn't have, and how that led to AgentSec.
User intent
Prompt injection
AgentSec
Read article
Arunima Chaudhuri · Hashnode
Community: Questions from people building agents.
Developers asked hard questions about AgentSec when it launched. Here they are, word for word, with the answers.
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.
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.
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
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.
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.
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.
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.
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.
“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.
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!
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.
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.
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
AC
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).
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.
Adversarial security testing for AI agents: prompt injection, tool misuse, memory poisoning and MCP scanning, with CI-ready regression testing and reports.
Cryptographic identity and delegated authority for autonomous AI agents: self-certifying DIDs, signed requests instead of API keys, and scoped delegation chains with budgets and cascading revocation.
The hosted dashboard for AgentSec reports: every run of every agent in one place, with findings and their evidence, full traces, history across runs, and what changed between any two runs. Self-hostable with Docker.
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.