Skip to main content
What makes an agent an agent is the ability to chain multiple tool calls to solve more complex problems. The dartantic Agent calls your tools for you automatically. You create an agent with a set of tools — which themselves each have a callback — and the Agent will handle the tool calls from the model and map them to the callbacks on your tools.

Multi-Step Reasoning

As an example, here’s an agent defined with two tools:
We’re asking the agent to call both two in succession here, one to find out the current date and another to find the events associated with that date. That’s multiple round trips between the agent and the model, but the ultimate response comes back from the model after it’s done calling tools and has the data it needs.

Complex Workflows

Here’s another example where we’re configuring the agent with multiple tools that the model can choose to call or not:
Here the agent calls the tools it decides it needs, potentially using the results of one to form calls to another.

Loop Behavior

Often we don’t know how many tooling round-trips are going to happen, but the Agent implementation will keep looping until the model is done calling tools and provides its final response.

Examples

Next Steps