Join our Newsletter — 33% off our NHI Course
Home› Glossary› NHI Lifecycle Management› Ghost agent
NHI Lifecycle Management

Ghost agent

← Back to Glossary
By NHI Mgmt Group Updated October 23, 2026 Domain: NHI Lifecycle Management

A ghost agent is an AI or software agent that still has active credentials, access paths, or trust relationships after it is no longer visible, managed, or needed. In identity security, this creates orphaned NHI risk, because stale tokens, keys, or registrations can continue to access systems unnoticed.

What a ghost agent really is

A ghost agent is not just an unused account, it is an agentic identity or software actor that still retains working access after it has fallen out of visibility, ownership, or operational need. The security problem is the mismatch between what the organisation believes exists and what can still act.

That mismatch matters because systems often keep trusting tokens, keys, service registrations, delegated grants, or cached sessions even after the agent is no longer actively managed. In practice, the ghost survives longer than the workflow that created it.

Why ghost agents are dangerous

Ghost agents are dangerous because they turn lifecycle drift into active exposure. If an abandoned agent still has credentials or trust relationships, it can continue to read data, call APIs, invoke tools, or move through connected systems without being noticed.

This is especially risky in agentic environments where access is distributed across SaaS apps, orchestration layers, APIs, and internal tools. A stale agent can retain more reach than a human reviewer expects, and the longer it persists, the harder it becomes to distinguish legitimate automation from forgotten automation.

How ghost agents are found

Organisations usually find ghost agents by reconciling inventory against live access, not by looking for the word “ghost” itself. Useful checks include comparing approved agent lists with active tokens and keys, reviewing cloud and SaaS app registrations, and identifying principals that still authenticate but no longer have an owning team or business process.

Discovery also depends on tracing where the agent can still appear, because abandoned agents often hide in integration sprawl. A useful starting point is a Shadow AI and AI Agent Discovery Guide approach, then matching what you find against live identity and access records.

What good remediation looks like

Remediation is about retiring the agent cleanly, not merely deleting its label in one console. The practical goal is to revoke active credentials, remove delegated access, disable unused registrations, and confirm that downstream systems no longer trust the orphaned principal.

Where the agent still has a valid purpose, replace standing access with tighter delegation and explicit approval gates. An AI Agent Authorisation Guide is useful when the real issue is excessive or permanent access that should have been task-scoped from the start, while a Agentic AI Identity Guide helps frame registration, delegation, and retirement as one lifecycle rather than separate events.

Risk and Threat Considerations

Ghost agents create a quiet persistence path because their access can survive after teams stop watching them. That makes them attractive to attackers who harvest stale secrets, abuse forgotten service credentials, or revive dormant trust relationships to blend in with normal automation.

Failure mechanism: The agent is removed from dashboards or ownership lists, but its tokens, keys, or trust grants remain valid in connected systems, so access continues after governance has lapsed.

Impact: The result can be unauthorized data access, hidden API use, lateral movement through connected services, and delayed detection because the principal no longer has an obvious human owner.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Improper OffboardingGhost agents persist after lifecycle offboarding fails to remove access.
NHI-02 — Secret LeakageGhost agents often remain useful because their tokens or keys still work.
NHI-09 — NHI ReuseA ghost agent is a reused or lingering non-human identity that outlives its intended purpose.
Recommendation — Revoke all credentials, registrations, and trust paths when an agent is retired. Inventory and rotate any secrets that still authenticate a retired agent. Eliminate reuse of dormant agent identities and issue fresh access for each lifecycle.
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseA ghost agent survives through lingering identity and privilege relationships.
Recommendation — Reduce standing privileges and verify that every agent action is explicitly authorized.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementGhost agents depend on unmanaged authenticators such as tokens, keys, and secrets.
Recommendation — Track, revoke, and rotate agent authenticators when the agent is decommissioned.

Practitioner Guidance

Why practitioners should care: A ghost agent is usually a lifecycle and accountability failure before it becomes a technical one. If no one owns the retirement step, credentials and trust paths can outlive the business use case and become standing exposure.

What to watch for: Pay special attention to agents that still authenticate but no longer appear in inventory, documentation, or deployment pipelines. The clearest warning sign is a live principal with no current business justification or responder who can explain why it still exists.

Practitioner takeaway: Treat agent retirement as part of identity hygiene, not a cleanup task after the fact, because stale access is often the easiest access to overlook.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 23, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org