I want to pass string value as is to custom tool using agent and task which is the result of another crew how can i do that ? I only need to pass string and perform rest of the operation inside custom tool.
why its adding description ?
class JiraCustomToolInput(BaseModel):
"""Input schema for MyCustomTool."""
body: str = Field(..., description="Description of the argument.")
class JiraCustomTool(BaseTool):
name: str = "JiraTool"
description: str = (
"Clear description for what this tool is useful for, your agent will need this information to use it."
)
args_schema: Type[BaseModel] = JiraCustomToolInput
def _run(self, body: str) -> str:
print("body inside tool", body)
story = parse_markdown(body)
Agent
def jira_draft_agent(self):
return Agent(
role="Jira Draft Agent",
goal="""Pass the input as is to tool""",
backstory=(
"You are an AI agent specialized in creating Jira tickets. "
"You can process input strings and interact with Jira's API to create tasks."
),
tools=[JiraCustomTool()],
llm=azure_llm,
verbose=True
)
Task
def jira_draft_task(self, agent, body):
return Task(
description=body,
expected_output=("""To return whether the Jira ticket was created successfully or not"""),
agent=agent,
tools=[JiraCustomTool()],
)