Utilities

Pre-built tools for web access, code execution, and data fetching

Letta provides pre-built tools that enable agents to search the web, execute code, and fetch webpage content.

Available Utilities

Search the internet in real-time using Exa’s AI-powered search engine.

1agent = client.agents.create(
2 tools=["web_search"],
3 memory_blocks=[{
4 "label": "persona",
5 "value": "I use web_search for current events and external research."
6 }]
7)

Key features:

  • AI-powered semantic search
  • Category filtering (news, research papers, PDFs, etc.)
  • Domain filtering
  • Date range filtering
  • Highlights and AI-generated summaries

Setup: Works out of the box on Letta Cloud. Self-hosted requires EXA_API_KEY.

Read full documentation →


Code Interpreter

Execute code in a secure sandbox with full network access.

1agent = client.agents.create(
2 tools=["run_code"],
3 memory_blocks=[{
4 "label": "persona",
5 "value": "I use Python for data analysis and API calls."
6 }]
7)

Key features:

  • Python with 191+ pre-installed packages (numpy, pandas, scipy, etc.)
  • JavaScript, TypeScript, R, and Java support
  • Full network access for API calls
  • Fresh environment per execution (no state persistence)

Setup: Works out of the box on Letta Cloud. Self-hosted requires E2B_API_KEY.

Read full documentation →


Fetch Webpage

Fetch and convert webpages to readable text/markdown.

1agent = client.agents.create(
2 tools=["fetch_webpage"],
3 memory_blocks=[{
4 "label": "persona",
5 "value": "I fetch and read webpages to answer questions."
6 }]
7)

Key features:

  • Converts HTML to clean markdown
  • Extracts article content
  • Multiple fallback extraction methods
  • Optional Exa integration for enhanced extraction

Setup: Works out of the box everywhere. Optional EXA_API_KEY for enhanced extraction.

Read full documentation →