feat: Add inject_date flag to Agent for automatic date injection

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-05-21 03:24:06 +00:00
parent e21d54654c
commit 547e46b8cf
3 changed files with 86 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
from crewai import Agent, Task, Crew
agent = Agent(
role="research_analyst",
goal="Provide timely and accurate research",
backstory="You are a research analyst who always provides up-to-date information.",
inject_date=True, # Enable automatic date injection
)
task = Task(
description="Research market trends and provide analysis",
expected_output="A comprehensive report on current market trends",
agent=agent,
)
crew = Crew(
agents=[agent],
tasks=[task],
)
result = crew.kickoff()
print(result)