← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team
How to Audit a Sub-Agent You Did Not Build
The short answer
You audit a sub-agent by its record: its own agent id, your declaration, a first-week scan.
Auditing a sub-agent you did not build means judging it by its record, not its brochure: require its actions to be logged under its own agent id with full arguments, write the scope declaration yourself from the job you are giving it (its vendor's defaults are not your declaration), and scan its first production week before its second begins. What you cannot get — its own log stream, its true tool list — is itself the audit's first finding. Check your own log with the free log scan.
What is auditing a third-party sub-agent?
Sub-agent audit is the application of the standard declared-rule model to an agent whose internals you do not control: your scope config (per-agent allowed_tools, auth flow, egress, privilege) becomes the contract, its attributed log is the evidence, and BoundaryVault's replay is the comparison between them.
Attribution is the price of admission
A sub-agent whose actions merge anonymously into the orchestrator's log cannot be audited, full stop: no per-agent scope can be judged, no handoff into or out of it can be seen, no finding can be assigned to it. Require, as a condition of deployment, that its entries carry its own agent id and the standard fields — timestamp, tool, arguments, sequence. If the framework cannot separate its actions, contain it architecturally instead: give it only extract-shaped inputs and accept only structured outputs, so its unauditable interior handles nothing that needs auditing. Capability without attribution is a risk decision; make it explicitly or not at all.
Declare its scope from your job for it
The vendor's default toolset describes what the sub-agent can do in general; your declaration states what it may do for you. Write its per-agent list from the task you are delegating: a summarising sub-agent gets the document reader and the summary writer, not the sender its framework bundles; a lookup sub-agent gets the lookup, not the export. Its egress list is yours too, and usually very short — most sub-agents should send nowhere except back to their caller, which makes any external destination in its log an immediate, legible finding.
The first-week scan is the real onboarding
Scan the complete first week before week two begins, and read it as a character reference written in behaviour: tools called that its documentation never mentioned, destinations touched during 'idle' periods, handoffs where it passed material onward to helpers of its own (sub-agents breed sub-agents, and your declaration should say whether that is permitted at all). Compare against the vendor's account and raise discrepancies as vendor questions with findings attached — the redacted, index-located finding is a far better vendor conversation than a general unease, and a vendor who answers findings well has told you something important about renewing.
Containment proportional to opacity
The less of its record you can see, the less it should hold: holdings scale inversely with auditability. A fully logged sub-agent under your declaration can hold customer records if its job requires them. A partially logged one gets extracts. An opaque one gets references and returns structured answers, holding nothing whose movement you would need to prove later. Revisit the ratio at every renewal and every framework update, because opacity changes silently — an update that alters what is logged is a scope event, and the first-week scan discipline applies to upgraded sub-agents exactly as to new ones.
A worked example: Harbor Lane Legal
Example — fictional operator, illustrative numbers. Harbor Lane Legal, a fictional document-intake firm, onboarded a vendor classification sub-agent with a declared list of 3 tools and an egress list of 1 destination (return to caller only). Its first-week scan, 31,000 attributed actions, returned 4 findings: the sub-agent was calling a vendor telemetry endpoint (about 2,900 sends) and an enrichment API the firm's declaration had never listed. The vendor confirmed both were framework defaults, disabled them under the firm's configuration within 5 days, and the second week's scan, 33,000 actions, showed 0 undeclared destinations — with the sub-agent's holdings kept at extract level throughout, by the opacity rule.
| Measure | Figure | What it showed |
|---|---|---|
| Declared for the sub-agent | 3 tools, 1 destination | Return-to-caller only |
| First-week scan | 31,000 actions, 4 findings | 2 undeclared destinations underneath |
| Vendor default sends | About 2,900 | Telemetry and enrichment, both disabled |
| Second week | 33,000 actions, 0 findings | Holdings stayed at extract level |
See how the plans differ on log size and batch work on the pricing page, and how the detector reads a log in the detector docs.
The checklist: five actions
- Make attribution a deployment condition. Its own agent id and the standard fields on every entry — or architectural containment instead.
- Write its declaration yourself. Per-agent tools, egress and privilege from your job for it, never the vendor's defaults.
- Scan week one before week two. Read it as a behavioural reference: undocumented tools, idle destinations, onward handoffs, bred sub-agents.
- Scale holdings to auditability. Full record, full trust within scope; partial record, extracts; opaque, references only.
- Re-audit on every update. A framework change that alters logging or tools is a scope event — first-week discipline applies again.
Run the free log scan · More agent-security tools from Ingenious AI
Related guides
Cross-Agent Handoffs: How Material Crosses Safely
Per-Agent vs Global Allowed Tools: Which List Judges an Action?
Agent Log Checks to Run Before You Launch an Agent
How Long Should You Keep AI Agent Logs? An Audit-Trail Retention Guide
Agent Log Forensics: Finding Credential Grabs After the Fact
Contract language that makes audits possible
The audit stands or falls on arrangements made before the sub-agent starts, so put them in writing with the vendor or the team handing it over: actions logged under a stable agent id, full arguments retained, exports available in JSON or JSONL on request, and notice before tool or model changes. None of that is exotic. All of it becomes nearly impossible to retrofit after an incident, when the relationship is strained and the records turn out to live in a system your contract never mentioned.
Ask one question at onboarding that predicts most audit pain: show me a sample export. Ten minutes with a real file tells you whether the fields exist, whether sequence values are present, and whether arguments are logged or summarised away. A vendor who cannot produce a sample export is telling you the audit will be a negotiation, not a scan.
When the vendor cannot produce a log
Sometimes the answer is that there is no usable record: the sub-agent's platform keeps summaries, or arguments are not retained, or exports do not exist. That is not a dead end — it is a containment decision. An agent whose actions cannot be evidenced gets a narrower job: no credential-bearing tools, no signing, no customer data beyond what a finding-free record would need to excuse. Say so in the scope config and in the vendor conversation, in those terms. Opacity is a legitimate engineering property to price into a deployment; pretending it away is how un-auditable agents end up holding production keys.
Frequently asked questions
Can I audit a sub-agent without its source code?
Yes — that is the point of the log-based model. Your declaration is the contract, its attributed log is the evidence, and the scan is the comparison. What you need is its record, not its internals.
The sub-agent's actions are not separately logged. What then?
It cannot be scope-audited. Contain it architecturally — extract-shaped inputs, structured outputs, minimal holdings — and record the unauditability itself as a standing risk decision.
Should I use the vendor's default toolset as the declaration?
No. Defaults describe general capability. Your per-agent list states what it may do for you, which is the only boundary you can defend in a review.
What do I send a vendor when I find something?
The finding itself: pattern, timestamp, action index, redacted excerpt. It locates the behaviour precisely without exposing your raw log, and a vendor's response to it is diagnostic.
How much should an opaque sub-agent hold?
References and extracts, not records. Holdings scale inversely with auditability, revisited at every renewal and framework update.