DS DevShelfHub Projects · AI tools
Tutorials / CrewAI / Reference / Classes / Fingerprint
Class security

Fingerprint: Reference Guide

By DevShelfHub

Hashable, stable identifier auto-assigned to every Agent and Crew for telemetry without PII leakage.

See the CrewAI API reference index, CrewAI introduction, and core concepts for surrounding context.

What is Fingerprint?

Fingerprint is CrewAI's stable, hashable identifier for Agents and Crews — not a cryptographic secret, but a deterministic handle tracing systems can join across kicks without shipping raw role names, goals, or user prompts. It is minted when the entity is constructed, stays immutable for the object's lifetime, and shows up in event payloads, SecurityConfig-aware telemetry, and structured logs when you export traces to vendors like Datadog or Honeycomb.

Operationally, fingerprints let you aggregate token usage, failure rates, or tool-call histograms per logical worker even when agents share similar textual roles. They also pair with redaction rules on SecurityConfig so downstream sinks never receive prompt bodies by accident. Because the value is not meant to be human-readable, dashboards should map fingerprint → friendly label in your own metadata store rather than exposing the hash to end users.

You cannot override or spoof a fingerprint through public APIs: that invariant is intentional so compliance reviews can trust that correlation keys were not hand-edited between environments.

When to Use

Whenever you look up an entity in traces.

Use Cases

  • Tracing
  • Cross-run analytics
  • Compliance

Key Features

  • Auto-assigned
  • Immutable
  • Hashable

When NOT to Use

Human-facing UIs — show role/name instead.

Notes

Not a secret rotation axis

Treat fingerprint like a metric label, not an API key. Anyone with logs can see it, so never use it alone for authorization.

Recreate = new fingerprint

Re-instantiating an Agent inside hot loops produces new identifiers and fragments time-series. Cache agent instances when long-lived correlation matters.

Pair with SecurityConfig redaction

Fingerprinting does not remove PII from prompts. Combine with SecurityConfig patterns so traces stay joinable without leaking customer text.

Dashboard mapping

Operators need human labels. Store a side table mapping fingerprint hashes to crew names and versions at deploy time.

Import

python
from crewai.security import Fingerprint

Code Examples

Log fingerprint next to task outcomes

python
from crewai import Agent, Task, Crew

researcher = Agent(role='Researcher', goal='Find facts', backstory='You cite sources.')
print('researcher fingerprint =', researcher.fingerprint)

t1 = Task(description='Summarize topic', expected_output='Bullets', agent=researcher)
crew = Crew(agents=[researcher], tasks=[t1], verbose=True)
out = crew.kickoff(inputs={'topic': 'CrewAI'})
print('crew fingerprint =', crew.fingerprint, 'raw snippet =', out.raw[:120])

Join traces in your analytics pipeline

python
def emit(span_name, agent):
    fp = str(agent.fingerprint)
    print({'span': span_name, 'fingerprint': fp})

Compare fingerprints across clones

python
from crewai import Agent

a1 = Agent(role='Writer', goal='Draft', backstory='Concise.')
a2 = Agent(role='Writer', goal='Draft', backstory='Concise.')
print(a1.fingerprint == a2.fingerprint)

Common Mistakes

❌ Expecting the fingerprint to encode semantic identity

✅ It identifies object instances, not business entities — use your own IDs for customers.

Fingerprint FAQ

What is Fingerprint in CrewAI?

Hashable, stable identifier auto-assigned to every Agent and Crew for telemetry without PII leakage. Fingerprint is CrewAI's stable, hashable identifier for Agents and Crews — not a cryptographic secret, but a deterministic handle tracing systems can join across kicks without shipping raw role names, goals, or user prompts. It is minted when the entity is constructed, stays immutable for the object's lifetime, and shows up in event payloads, SecurityConfig-aware telemetry, and structured logs when you export traces to vendors like Datadog or Honeycomb. Operationally, finger…

Which package defines the CrewAI class Fingerprint?

DevShelfHub maps Fingerprint to Python module crewai.security (package path crewai.security in this reference). Pin your installed crewai version and match imports to the snippet on this page.

When should I use Fingerprint?

Whenever you look up an entity in traces.

When should I avoid using Fingerprint?

Human-facing UIs — show role/name instead.

How do I import Fingerprint in Python?

from crewai.security import Fingerprint

Where can I explore more CrewAI API reference pages?

Open the CrewAI API reference index on DevShelfHub to search 58 classes, 30 methods, and 16 decorators, each with runnable examples, parameters, common mistakes, and cross-links.