What can a Haystack agent do?
1. What can a Haystack agent do?
Let’s take a moment to understand what an AI agent actually is and what makes it different from just using a large language model on its own.2. Comparing LLMs and Agents
Large language models, on their own, are powerful, but limited. They can answer questions, summarize text, or write code. But they can’t interact with the outside world. They can’t fetch real-time data, query a private database, trigger a function. Once they generate a response, that’s it, they’re done. That’s where the key difference lies. An AI agent is an autonomous system that can understand a user’s request, figure out what needs to be done, and take real actions using external tools. It still relies on an LLM to reason and interpret language, but it doesn’t stop at generating a response. It goes beyond that.3. Agents' assets
Agents don’t just generate text; they make decisions.4. Agents' assets
When they get a question, they think things through, like: “Do I need to search the web for up-to-date information?”5. Agents' assets
“Should I run a function to calculate something?”6. Agents' assets
“Is this a case where I should look in a database?”7. Agents' assets
And then, they actually take those actions. This kind of behavior is known as function calling or tool use — and it’s what gives agents their real power.8. Agents in Haystack
Creating an agent with Haystack is quite straightforward. We give it a language model to power its thinking,9. Agents in Haystack
a system prompt to steer its behavior,10. Agents in Haystack
and a list of tools it can call. Those tools could be Python functions,11. Agents in Haystack
external APIs,12. Agents in Haystack
other Haystack components like retrievers, rankers, or other agents,13. Agents in Haystack
and even connections to MCP servers for distributed tasks. We define the tools, and the agent figures out how to use them based on the situation.14. Our healthcare agent
In this course, we’ll build a healthcare agent that decides whether to query a patient database, search the web for medical information, or combine both to answer a complex question. The language model handles the reasoning, and Haystack takes care of the orchestration.15. Let's practice!
Let’s start creating our agent.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.