Building AI Agents That Search the Web: A Complete Guide to Strands and Exa Integration

admin May 12, 2026 4 min read LLM Development

The Challenge of Web-Enabled AI Agents

Building AI agents that can effectively search the web has traditionally been a complex undertaking. Most general-purpose search APIs weren't designed with AI workflows in mind - they return HTML-heavy pages and short snippets optimized for human browsing, not the structured data that agents need to reason effectively.

This means developers typically end up building additional layers: custom crawlers, parsers, and ranking logic to transform web content into something their agents can actually use. It's a lot of overhead for what should be a straightforward capability.

Enter Strands Agents and Exa: A Purpose-Built Solution

The new Exa integration for the Strands Agents SDK changes this game entirely. Instead of wrestling with HTML parsing and content cleanup, you get an AI-native search and retrieval layer that delivers clean, structured content ready for direct use in LLM context windows.

What Makes Strands Agents Special

The Strands Agents SDK takes a model-driven approach to AI agent development. Rather than hard-coding every workflow step, you provide:

  • A language model
  • A system prompt
  • A list of available tools

The model itself decides what to do next - which tools to call, in what order, and when the task is complete. This agent loop continues until the model produces a final answer, with each iteration building on the full conversation history.

Why Exa is Different

Exa isn't just another search engine - it's built specifically for LLMs and AI agents. It understands the meaning of queries, not just keywords. When you search for "startups building climate solutions," you get actual climate startups, even if those pages never use that exact phrase. The results come back as clean, structured content with no ads or SEO noise.

Two Powerful Tools at Your Agent's Disposal

The Exa integration provides your agents with two core capabilities through the strands-agents-tools package:

1. exa_search: Intelligent Web Discovery

This tool goes far beyond basic search queries. It offers four search modes to match your specific needs:

  • Instant (~200ms) - Perfect for real-time applications like autocomplete and voice agents
  • Fast (~450ms) - Optimized for speed while maintaining quality, ideal when your agent makes multiple search calls
  • Auto (~1s) - The recommended default, balancing speed with high-quality results
  • Deep (~3-6s) - Runs parallel searches for maximum coverage, perfect for comprehensive research

You can also filter results by content categories (news, research papers, GitHub repositories, PDFs) and even request summaries inline:

agent.tool.exa_search(
    query="recent advances in AI safety research",
    num_results=10,
    summary={"query": "key research areas and findings"}
)

2. exa_get_contents: Full Content Extraction

Once your agent discovers relevant URLs, this tool retrieves complete page content. It maintains a content cache for instant results on previously crawled pages and supports live crawling for the most current information.

You can control how much content to retrieve:

agent.tool.exa_get_contents(
    urls=["https://example.com/blog-post"],
    highlight={"maxCharacters": 5000}
)

Real-World Applications

This integration opens up powerful use cases for AI agents:

  • Research Assistants - Agents that can conduct deep research across multiple sources and synthesize findings
  • Fact-Checking Systems - Verify claims by searching for and analyzing supporting evidence
  • Competitive Intelligence - Monitor industry developments and competitor activities
  • Content Creation - Research topics thoroughly before generating articles or reports

Getting Started

Ready to build your own web-enabled AI agent? Here's what you'll need:

  • Python 3.10 or later
  • An AWS account with Amazon Bedrock access
  • An Exa API key
  • The required packages: pip install strands-agents strands-agents-tools

The setup follows the same pattern as other Strands tools - simply import the Exa tools and add them to your agent's tools list. The underlying LLM handles the rest, deciding when and how to use web search as part of its reasoning process.

The Future of AI Agent Development

This integration represents a significant step forward in making AI agents more capable and autonomous. By combining Strands' model-driven architecture with Exa's AI-native search capabilities, developers can create agents that truly understand and interact with the web in meaningful ways.

Whether you're building research assistants, fact-checking systems, or competitive intelligence tools, this integration provides the foundation for agents that can access and reason over real-time web information - without the traditional complexity of web scraping and content processing.

This post is based on content originally published by Manoj Selvakumar, co-written with Ishan Goswami and Nitya Sridhar from Exa, on the AWS Machine Learning Blog.

Related Posts

Attribution & Credits

Content Type: Original content created by the author.

No external sources or adaptations.

Share Feedback