Fingerprinting
Learn how to use CrewAI’s fingerprinting system to uniquely identify and track components throughout their lifecycle.
Fingerprinting in CrewAI
Overview
Fingerprints in CrewAI provide a way to uniquely identify and track components throughout their lifecycle. Each Agent
, Crew
, and Task
automatically receives a unique fingerprint when created, which cannot be manually overridden.
These fingerprints can be used for:
- Auditing and tracking component usage
- Ensuring component identity integrity
- Attaching metadata to components
- Creating a traceable chain of operations
How Fingerprints Work
A fingerprint is an instance of the Fingerprint
class from the crewai.security
module. Each fingerprint contains:
- A UUID string: A unique identifier for the component that is automatically generated and cannot be manually set
- A creation timestamp: When the fingerprint was generated, automatically set and cannot be manually modified
- Metadata: A dictionary of additional information that can be customized
Fingerprints are automatically generated and assigned when a component is created. Each component exposes its fingerprint through a read-only property.
Basic Usage
Accessing Fingerprints
Working with Fingerprint Metadata
You can add metadata to fingerprints for additional context:
Fingerprint Persistence
Fingerprints are designed to persist and remain unchanged throughout a component’s lifecycle. If you modify a component, the fingerprint remains the same:
Deterministic Fingerprints
While you cannot directly set the UUID and creation timestamp, you can create deterministic fingerprints using the generate
method with a seed:
Advanced Usage
Fingerprint Structure
Each fingerprint has the following structure:
Was this page helpful?