What you’ll build
- A CrewAI agent that checks for mentions (e.g.,
@agent). - Backstory rules to ignore chatter unless addressed.
- A
/kickoffstream that returns concise answers and optional tool calls.
Prerequisites
- CrewAI project and
/kickoffendpoint from crew-ai.mdx - Client ability to pass conversation history and mention metadata
Steps
1
Set a mention keyword
Decide on a handle (e.g.,
@agent or @support) that users will type in group rooms.2
Add mention logic
Pass a boolean or mention list into the task input so the agent knows when it is addressed.
3
Keep answers short
In the backstory, limit reply length and avoid re-quoting the entire thread.
4
Connect in CometChat
Point your AI Agent to the CrewAI
/kickoff URL and set a friendly display name/icon.Agent configuration
src/crew_demo/config/agents.yaml
src/crew_demo/config/tasks.yaml
mentioned in its prompt and return an empty string to suppress replies.
CometChat setup
- Provider: CrewAI
- Agent ID:
group_agent - Deployment URL:
/kickoff - Suggested prompts: “@agent what is our refund policy?”