Skip to main content

Research Agent

Let’s build a research agent to generate a report using Exa.
1

Create a research agent

research_agent.py
2

Run the agent

Install libraries
Run the agent
View the report

Agentic RAG

We were the first to pioneer Agentic RAG using our Auto-RAG paradigm. With Agentic RAG (or auto-rag), the Agent can search its knowledge base (vector db) for the specific information it needs to achieve its task, instead of always inserting the “context” into the prompt. This saves tokens and improves response quality.
1

Create a RAG agent

rag_agent.py
2

Run the agent

Install libraries
Run the agent

Structured Outputs

Agents can return their output in a structured format as a Pydantic model. Create a file structured_output.py
1

Create a structured output agent

structured_output.py
2

Run the agent

Reasoning Agent

Reasoning is an experimental feature that helps agents work through a problem step-by-step, backtracking and correcting as needed.
1

Create a reasoning agent

reasoning_agent.py
2

Run the reasoning agent

Reasoning is an experimental feature and will break ~20% of the time. It is not a replacement for o1. It is an experiment that combines COT and tool use. Set your expectations very low for this initial release. For example: It will not be able to count ‘r’s in ‘strawberry’.