Skip to content

Conversation

vria
Copy link

@vria vria commented Jul 28, 2025

Description

In my workflow there is a task without any tools. Currently there is no way to create such task.

parent_agent = Agent(
    name="Parent agent",
    system_prompt="...",
    tools=[workflow, file_read, file_write],
)

result = parent_agent.tool.workflow(
    action="create",
    workflow_id="...",
    agent=parent_agent,
    tasks=[
        {
            "task_id": "task_without_tools",
            "description": "...",
            "system_prompt": "...",
            "tools": [], # <--- Explicit empty array should mean no tools
            # <--- omit "tools" or setting it to None should inherit tools from parent_agent
        },
    ]
}

In fact there is a trick to create an agent without tools:

"tools": ["non_existent"],

It just causes a warning in the workflow tool but successfully creates an agent without tools.

Related Issues

None

Documentation PR

None

Type of Change

Bug fix
Breaking change for those who explicitly set tools: [] in workflow task and relay on tools inherited from parent_agent.

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@vria vria requested a review from a team as a code owner July 28, 2025 13:00
@cagataycali cagataycali enabled auto-merge (squash) September 2, 2025 16:18
Copy link
Member

@cagataycali cagataycali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants