Does anyone have the details on how to use the new features in .121

These are the new features

• Added markdown attribute to the Task class
• Added reasoning attribute to the Agent class
• Added inject_date flag to Agent for automatic date injection
• Implemented HallucinationGuardrail (no-op with test coverage)

Hey, Tony! Looks like it’s time for another dive into the source code to get the real scoop.

Here’s what I’ve gathered from the recent updates:

  1. markdown attribute in the Task class:
    It’s a new boolean attribute that allows you to instruct an agent to format its final answer for a specific task in Markdown. When you set Task.markdown=True, CrewAI will automatically append instructions to the task’s prompt, guiding the agent to use Markdown syntax (like # for headers, ** for bold, * for lists, etc.). I think it is handy if you want the agent’s output to be easily parsable for reports, documentation, or any rich text display.

  2. reasoning attribute in the Agent class:
    The Agent.reasoning attribute seems to be a pre-execution planning step. Like if you set Agent.reasoning=True, before the agent executes a task, it will first kinda “reflect” on the task and generate a step-by-step plan on how it intends to tackle it. This plan is then added to the task’s description that the agent receives. This can lead to more structured and thoughtful task execution, as the agent outlines its strategy beforehand. It’s particularly useful for complex tasks where a clear plan can improve the quality of the outcome. Pay attention to the extra token costs, right?

  3. inject_date flag in Agent for automatic date injection:
    When you set Agent.inject_date=True, it will automatically append the current date to the description of any task that agent executes. This is useful for tasks that need to be aware of the current date for context (e.g., writing a daily news summary). You can also customize the date format using the new Agent.date_format attribute. Honestly, this is pretty much just a cosmetic addition, if you ask me, since you could always just pass the date in naturally with the inputs in Crew.kickoff(). Anyway, let’s move on.

  4. HallucinationGuardrail (no-op with test coverage):
    The HallucinationGuardrail will probably be used in the future to help detect and prevent LLM hallucinations. In the current open-source version (0.121.0), this feature is implemented as a “no-op” (no operation) placeholder. This means that while you can include it in your task definitions, it won’t actually perform any hallucination checks; it will simply pass the output through. “Test coverage” just means that the structure for this feature is in place and tested, so it’s ready to go once it’s fully implemented.

Here’s hoping the official dev team drops some more solid docs on these features soon.

3 Likes

@tonykipkemboi Can we put Max on the documentation team please. He is awesome!

3 Likes

The docs are partially updated pending some changes.

1 Like

OMG @tonykipkemboi The new documentation update is great!

2 Likes

pulled a late one yesterday to update most of it. i’ll keep trying to keep it most updated.

2 Likes