Skip to main content

Agents & Tools

Agent Best Practices

0:00
LearnStep 1/4

Debugging Agents

Finding and Fixing Agent Issues

Enable Verbose Mode

python

Inspect Intermediate Steps

python

Common Issues

IssueSolution
Agent loops foreverSet max_iterations, improve tool descriptions
Wrong tool selectedMake descriptions more specific and distinct
Bad tool inputsAdd examples in docstring, use Pydantic schemas
Agent ignores tool resultsImprove system prompt to use observations