crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
19.06k stars 2.63k forks source link

Accessing input information in Tools #986

Open dudesparsh opened 1 month ago

dudesparsh commented 1 month ago

I'm trying to pass input information to my crew, but I'm having trouble accessing those inputs within my tool.

When I include these variables in prompts (goals) or descriptions, I can access them inside my tool. However, I prefer not to mention the inputs in the prompt and still access them within my tool.

Can anyone suggest the right way to achieve this? Do agents or tasks have the functionality to take inputs or configurations directly, similar to how it's done in crews?

Thank you.

carvalhorafael commented 1 month ago

+1

And I would like to access a crew input in a Task callback function without to pass through task prompt.

Context:

I have a callback function that creates a file with the contents of a task output. However, the file name needs to contain a string that is passed as input to the Crew.

The task runs normally, but when I save the file in the callback function, I can't access the Crew input.

I've create a new issue with my code and examples here https://github.com/crewAIInc/crewAI/issues/1027