Index of every page on this site: llms.txt
All skills
exa-labs avatar

/build-with-exa

@9d220cc
by Exa Labsexa-labs/agent-skills75 stars
8
Run it yourself

Build applications and agents with Exa's API: search, contents extraction, answer, Agent API, monitors, websets, OpenAI-compatible endpoints, and exa-py/exa-js SDKs. Use when choosing Exa endpoints, writing Exa API calls, integrating semantic web search or research into products, or debugging Exa request shapes.

Use this Skill: https://skilld.dev/gh/exa-labs/agent-skills/build-with-exa

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencessdks.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

SDKs Reference

Practical naming and surface guide for exa-py and exa-js.

Canonical Docs Links

  • Base docs URL: https://exa.ai/docs
  • Python SDK spec: /sdks/python-sdk-specification
  • TypeScript SDK spec: /sdks/typescript-sdk-specification
  • Python README: https://github.com/exa-labs/exa-py
  • JavaScript README: https://github.com/exa-labs/exa-js

Contents

  • Shared guidance
  • Python SDK
  • TypeScript SDK
  • Raw HTTP vs SDK shapes
  • Critical pitfalls

Shared Guidance

  • Install the latest SDK release with the package manager so it resolves the latest release and all SDK surfaces will be available.
  • Use official docs as canonical for behavior
  • Use SDK docs and repos to confirm method names, casing, and helper ergonomics
  • Distinguish request-shape casing carefully:
    • raw HTTP: camelCase
    • Python core endpoint methods: snake_case
    • TypeScript SDK: camelCase
  • Current Python Monitors and Websets docs often show params={...} dicts that keep API-shaped field names such as numResults. Treat those resource families as a surface-specific exception rather than forcing the core search/contents casing rule onto every SDK namespace.

Python SDK (exa-py)

Install:

pip install exa-py

Instantiate:

from exa_py import Exa

exa = Exa(api_key="YOUR_EXA_API_KEY")

Current Primary Methods

  • search(...)
  • stream_search(...)
  • get_contents(...)
  • answer(...)
  • stream_answer(...)
  • agent.runs.create(...)
  • agent.runs.get(...)
  • agent.runs.list(...)
  • agent.runs.poll_until_finished(...)
  • openai.web_search(), anthropic.web_search(), tools.web_search() (LLM tool helpers that ask the model for query and objective)
  • monitors.*
  • websets.*

Naming Rules for Core Endpoint Methods

Use snake_case everywhere, including nested dict keys:

result = exa.search(
    "latest AI funding rounds",
    contents={"highlights": True},
    output_schema={
        "type": "object",
        "properties": {"summary": {"type": "string"}},
        "required": ["summary"]
    }
)

Documented Default-Contents Caveat

Current Python SDK docs explicitly say search() returns text contents with a 10,000-character default unless you disable contents. If you do not want that default behavior, pass contents=False.

Helper Methods

The Python SDK's search_and_contents(...) helper is deprecated. Use search(...), which returns contents, and get_contents(...).

Monitors and Websets

monitors and websets methods take a params dict shaped like the API request body, with camelCase keys, instead of snake_case keyword arguments. Follow those resources' docs rather than the naming rules above.

TypeScript SDK (exa-js)

Install:

npm install exa-js

Instantiate:

import Exa from "exa-js";

const exa = new Exa();

Current Primary Methods

  • search(...)
  • streamSearch(...)
  • getContents(...)
  • answer(...)
  • streamAnswer(...)
  • agent.runs.create(...)
  • agent.runs.get(...)
  • agent.runs.list(...)
  • agent.runs.pollUntilFinished(...)
  • openai.webSearch(), anthropic.webSearch(), tools.webSearch() (LLM tool helpers that ask the model for query and objective)
  • monitors.*
  • websets.*

Naming Rules

Use camelCase everywhere:

const result = await exa.search("latest AI funding rounds", {
  contents: { highlights: true },
  outputSchema: {
    type: "object",
    properties: { summary: { type: "string" } },
    required: ["summary"]
  }
});

Helper Methods

Examples and SDK source may show helpers such as searchAndContents(...). They are valid helpers, but they are not the primary pattern in this skill. Prefer understanding the underlying endpoint family first.

Raw HTTP vs SDK Shapes

Concern Raw HTTP Python SDK TypeScript SDK
Results count numResults num_results numResults
Output schema outputSchema output_schema outputSchema
System prompt systemPrompt system_prompt systemPrompt
Text cap maxCharacters max_characters maxCharacters
Freshness maxAgeHours max_age_hours maxAgeHours
Search contents nested contents nested contents with snake_case keys nested contents with camelCase keys
Contents endpoint text top-level text top-level text top-level text

Critical Pitfalls

  1. Do not paste raw JSON keys into core Python SDK methods as top-level keyword arguments; numResults= and outputSchema= raise TypeError. Nested dict keys tolerate either casing, but stay snake_case for consistency.
  2. Do not assume helper methods define the canonical API shape.
  3. Remember the Python SDK's documented search() default-contents behavior.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2d3 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    The skill provides official documentation and SDK guidance for the Exa API. It includes instructions for installing and using official Python and TypeScript libraries and provides best practices for semantic search and AI research workflows.

  • Socket2d

    No alerts

  • Snyk3d

    Risk: MEDIUM · 1 issue

Signed by skilld at 9d220cc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 5 days ago
metadata
{
  "author": "Exa",
  "version": "0.3.0",
  "docs": "https://exa.ai/docs"
}

README badge

README badge for exa-labs/agent-skills/build-with-exa