Exclusive Content:

Haiper steps out of stealth mode, secures $13.8 million seed funding for video-generative AI

Haiper Emerges from Stealth Mode with $13.8 Million Seed...

Running Your ML Notebook on Databricks: A Step-by-Step Guide

A Step-by-Step Guide to Hosting Machine Learning Notebooks in...

“Revealing Weak Infosec Practices that Open the Door for Cyber Criminals in Your Organization” • The Register

Warning: Stolen ChatGPT Credentials a Hot Commodity on the...

Creating Web Search-Enabled Agents Using Strands and Exa

Unlocking Web-Enabled AI Agents: Integrating Exa with Strands Agents SDK

Co-authored by Ishan Goswami and Nitya Sridhar from Exa

In this comprehensive guide, explore how the Exa integration enhances the Strands Agents SDK, making it easier for developers to build AI agents equipped with effective web search and retrieval capabilities. Learn about the tools offered and their practical applications for research and competitive intelligence.

Bridging the Gap: Integrating Exa with Strands Agents to Empower AI Workflows

Co-written by Ishan Goswami and Nitya Sridhar from Exa

In the rapidly evolving landscape of artificial intelligence, access to current and reliable information is paramount—especially for web search-enabled AI agents developed for research, fact-checking, or competitive intelligence. While general-purpose search APIs provide a wealth of data, they often present HTML-heavy pages and short snippets tailored for human consumption rather than structured data suitable for AI workflows. For developers, this creates an unnecessary hurdle, necessitating the building of additional layers, custom crawlers, parsers, and ranking logic.

Enter Exa’s Integration with the Strands Agents SDK. This integration delivers an AI-native search and retrieval layer that seamlessly fits into the developer’s toolkit. By providing clean, structured content formatted for direct consumption in LLM (Large Language Model) context windows, developers can attain the rich web knowledge their agents require without the cumbersome post-processing. Coupled with the Strands Agents SDK’s model-driven architecture, the integration ensures that AI agents can access real-time web data effortlessly.

Strands Agents: Rethinking AI Workflows

The Strands Agents SDK, an open-source framework from AWS, revolutionizes the way AI agents are built through its model-driven approach. Instead of creating rigid, hardcoded workflows, developers provide a model along with a system prompt and a collection of tools. The model itself takes charge of decision-making, determining which tools to utilize and in what sequence.

At the heart of the SDK is the agent loop. With each iteration, the model receives the complete conversation history, encompassing prior tool calls and their outcomes. If additional information is required, the model can request a tool, prompting Strands Agents to execute it and feed the results back. This iterative process empowers agents to tackle complex, multi-step tasks that far surpass the capabilities of a single LLM call.

The SDK provides over 40 pre-built tools, ranging from file I/O to web search, AWS APIs, and even memory management. Furthermore, the Model Context Protocol (MCP) ensures that tools exposed by MCP servers can be easily integrated into an agent’s workflow with minimal additional configuration.

Introducing Exa: The AI-Native Search Engine

Exa stands out as a web-scale search engine explicitly designed for LLMs and AI agents. Unlike traditional search engines that rely on mere keyword matching, Exa interprets the meaning of queries to deliver semantically relevant content. A query like “startups building climate solutions” would yield actual results even if those pages do not use the exact keywords.

Results are returned as clean, structured content, devoid of advertisements or SEO noise, ensuring that LLMs can ingest and process the data effortlessly.

Integration Overview: Exa and Strands Agents

The integration is available via the strands-agents-tools package, empowering AI agents with two key functionalities:

  1. exа_search: Execute semantic searches across various categories, including news, research papers, and repositories.

  2. exa_get_contents: Fetch the full content from designated URLs identified during searches.

These tools optimize for AI consumption, providing structured data that can be directly reasoned over by agents.

Searching with exa_search

The exa_search tool offers nuanced search capabilities that surpass basic query strings. With four search modes—Instant, Fast, Auto, and Deep—agents can choose how to engage with web content.

For example:

  • Instant (~200ms): Ideal for real-time situations like autocompletion or live suggestions.
  • Deep (~3-6s): Conducts parallel searches across variations of the query, perfect for exhaustive research.

In addition to these modes, agents can also filter searches for specific categories like news, academic papers, or financial reports, drastically refining their results.

Content Extraction with exa_get_contents

Once relevant URLs are acquired, the exa_get_contents tool retrieves comprehensive content. With built-in caching for previously crawled pages, the tool can rapidly serve content or opt for live crawling to ensure the latest information is accessible.

Setting Up the Integration

Integrating Exa with Strands Agents is straightforward, requiring a few key prerequisites and setup steps:

  1. API Key: Secure your Exa API key and set it in your environment.

    export EXA_API_KEY="your_exa_api_key_here"
  2. Import Tools:

    from strands import Agent
    from strands_tools.exa import exa_search, exa_get_contents
    
    agent = Agent(tools=[exa_search, exa_get_contents])
  3. Invoke the Agent:

    response = agent("Search for the latest trends in AI and summarize key developments.")

With these steps, agents can begin leveraging Exa’s capabilities effectively across various search scenarios.

Real-World Application: Building a Deep Research Agent

Imagine deploying a deep research assistant powered by Exa. This agent could perform targeted searches across varied source types, extract critical content from the most promising results, and synthesize a structured research brief—all within a single invocation.

The Multi-Step Workflow

  1. Initial Search: Conduct a broad understanding search using the auto mode.
  2. News Search: Narrow down specific news sources from a recent timeframe.
  3. Research Papers: Focus on academic content, extracting key findings.
  4. GitHub Projects: Explore open-source implementations.
  5. Deep Dive: Extract full content from the most relevant results.
  6. Synthesis: Compile a structured brief with insights, developments, and sources.

Conclusion: Elevating AI Agents

The combination of Strands Agents SDK and Exa enables developers to create sophisticated AI agents grounded in real-time web information. Exa’s semantic search capabilities, along with the structured outputs and simple integration, facilitate efficient AI workflows.

This integration is not just limited to research—it spans competitive intelligence, technical support, and myriad domains requiring instant access to reliable information.

Get started today by obtaining your Exa API key and exploring the exponential possibilities in AI agent development!

About the Authors

Ishan Goswami: Founding DevRel Engineer at Exa, Ishan specializes in building integrations and demo applications that simplify Exa for developers.

Nitya Sridhar: Head of Marketing at Exa, Nitya focuses on product launches, technical storytelling, and community engagement.


This blog post serves as a comprehensive overview for developers looking to optimize their AI agent workflows using Exa and Strands Agents. For additional inquiries or guidance, feel free to explore the Amazon Bedrock documentation or connect with the developers at Exa!

Latest

I Tested the ‘Goldfish Prompt’ with ChatGPT — and It Helped Me Overcome Overthinking Instantly

Navigating the Noise: Finding Clarity with the 'Goldfish Prompt'...

Quantum Circuits Enhance AI Language Abilities by 1.4 Percent

Breakthrough in Quantum Computing: Enhancing Large Language Models Quantum Circuits...

Nvidia CEO Jensen Huang Identifies Key Professions Poised to Thrive in the Generative AI Surge

Nvidia CEO Envisions Bright Future for Trades Amid AI...

Don't miss

Haiper steps out of stealth mode, secures $13.8 million seed funding for video-generative AI

Haiper Emerges from Stealth Mode with $13.8 Million Seed...

Running Your ML Notebook on Databricks: A Step-by-Step Guide

A Step-by-Step Guide to Hosting Machine Learning Notebooks in...

Investing in digital infrastructure key to realizing generative AI’s potential for driving economic growth | articles

Challenges Hindering the Widescale Deployment of Generative AI: Legal,...

VOXI UK Launches First AI Chatbot to Support Customers

VOXI Launches AI Chatbot to Revolutionize Customer Services in...

Introducing OS-Level Actions in the Amazon Bedrock AgentCore Browser

Unlocking Browser Automation: Introducing OS Level Actions for AgentCore Browser Enhancing Web Workflow Automation Beyond the DOM Overcoming Browser Limitations: Direct Interaction with Native OS Elements The...

Navigating Reward Signal Challenges: Implementing Verifiable Rewards-Based Reinforcement Learning with GRPO...

Enhancing Large Language Model Training with Reinforcement Learning and Verifiable Rewards Introduction Technical Overview Solution Overview Prerequisites Environment Setup Prepare the Dataset for Fine-tuning The Verifiable Reward Function Integrating RLVR with GRPO Results Extending...

Optimize Short-Term GPU Resources for ML Workloads with EC2 Capacity Blocks...

Navigating GPU Capacity Challenges for Machine Learning Workloads Overview of Short-Term GPU Options on AWS On-Demand GPU Instances Spot GPU Instances Amazon EC2 Capacity Blocks for ML Amazon SageMaker...