Building AI Agents That Can Use Tools: My First Experience with Strands
While exploring AI agent development, I learned that modern AI assistants can do much more than generate text. This article shares my experience of building an AI agent that can use tools, remember information, and retrieve AWS documentation using Strands and Amazon Bedrock.
When most people think about AI assistants, they imagine a chatbot that answers questions. Before working with AI agents, that was my understanding too. I assumed an AI model simply received a prompt, generated text, and returned an answer.
After working with the Strands framework, I realized that modern AI agents are much more than language models. They can make decisions, call external tools, remember information, and interact with cloud services.
This completely changed how I think about AI applications.
Starting with a Local Model
I began by creating a simple agent using Ollama and the Llama 3.2 model running locally. Instead of calling a cloud API, the agent communicated with my local Ollama server.
Although the program itself was small, it helped me understand the basic structure of an AI agent.
The agent required only three main components:
- a model
- a system prompt
- a user prompt
Seeing responses generated locally without relying on an external API was a good introduction to the framework.
Teaching an Agent to Use Tools
The most interesting part of the project was adding tools.
Instead of expecting the language model to perform every task itself, I created Python functions that the agent could invoke whenever required.
I implemented three simple tools:
- Calculator
- Weather lookup
- Age calculator
One thing that surprised me was that I never directly called these functions in my code. After registering them with Strands, the agent automatically decided which one to use based on the user's question.
For example, asking:
What is 42 × 17?
caused the calculator tool to execute.
Similarly,
How old is someone born on 2000-05-15?
automatically triggered the age calculator.
This helped me understand that AI agents are not simply generating answers—they are deciding when to perform actions.
Adding Memory
Another concept I experimented with was memory.
Rather than storing conversations in a database, I kept things simple by using a JSON file.
The application remembered information such as a user's name or favourite food between sessions.
Although this approach is basic, it demonstrated an important idea: an AI assistant becomes much more useful when it can retain information instead of starting every conversation from scratch.
Learning About MCP
The concept that interested me the most was the Model Context Protocol (MCP).
Instead of manually creating another tool, I connected my agent to the AWS Documentation MCP Server.
This allowed the agent to retrieve AWS documentation whenever it needed additional information.
Rather than relying only on what the language model already knows, the agent can access reliable documentation while generating a response.
Understanding this workflow made me appreciate why MCP has become an important part of modern AI agent development.
Challenges Along the Way
The development process wasn't completely straightforward.
Some of the issues I encountered included configuring the AWS CLI, downloading the required Ollama model, understanding how tool calling worked, and setting up the AWS Documentation MCP Server.
Most of my learning came from debugging these problems rather than simply writing Python code.
Key Takeaways
Working on this project helped me understand several concepts that I had only read about previously.
Some of the most valuable lessons were:
- AI agents can perform actions instead of only generating text.
- Tool calling makes AI applications much more practical.
- Even simple memory mechanisms improve user interactions.
- Local models and cloud models both have their advantages.
- MCP provides a clean way to connect AI agents with external knowledge sources.
Conclusion
Before building this project, I viewed AI assistants primarily as conversational models.
After experimenting with Strands, Ollama, Amazon Bedrock, and MCP, I now see AI agents as systems capable of reasoning, using tools, and interacting with external services.
This experience gave me a much clearer understanding of how modern AI assistants are designed, and I'm looking forward to exploring more advanced topics such as retrieval-augmented generation (RAG), long-term memory, and multi-agent workflows.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article