mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
Add crew context tracking using OpenTelemetry baggage for thread-safe propagation. Context is set during kickoff and cleaned up in finally block. Added thread safety tests with mocked agent execution.
17 lines
423 B
Python
17 lines
423 B
Python
"""Models for crew-related data structures."""
|
|
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class CrewContext(BaseModel):
|
|
"""Model representing crew context information."""
|
|
|
|
id: Optional[str] = Field(
|
|
default=None, description="Unique identifier for the crew"
|
|
)
|
|
key: Optional[str] = Field(
|
|
default=None, description="Optional crew key/name for identification"
|
|
)
|