exa-reference-architecture
Implement Exa reference architecture for search pipelines, RAG, and content discovery. Use when designing new Exa integrations, reviewing project structure, or establishing architecture standards for neural search applications. Trigger with phrases like "exa architecture", "exa project structure", "exa RAG pipeline", "exa reference design", "exa search pipeline".
Best use case
exa-reference-architecture is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Implement Exa reference architecture for search pipelines, RAG, and content discovery. Use when designing new Exa integrations, reviewing project structure, or establishing architecture standards for neural search applications. Trigger with phrases like "exa architecture", "exa project structure", "exa RAG pipeline", "exa reference design", "exa search pipeline".
Teams using exa-reference-architecture should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/exa-reference-architecture/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How exa-reference-architecture Compares
| Feature / Agent | exa-reference-architecture | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Implement Exa reference architecture for search pipelines, RAG, and content discovery. Use when designing new Exa integrations, reviewing project structure, or establishing architecture standards for neural search applications. Trigger with phrases like "exa architecture", "exa project structure", "exa RAG pipeline", "exa reference design", "exa search pipeline".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Exa Reference Architecture
## Overview
Production architecture for Exa neural search integration. Covers search service design, content extraction pipeline, RAG integration, domain-scoped search profiles, and caching strategy.
## Architecture Diagram
```
┌──────────────────────────────────────────────────────────┐
│ Application Layer │
│ RAG Pipeline | Research Agent | Content Discovery │
└──────────┬──────────────┬───────────────┬────────────────┘
│ │ │
▼ ▼ ▼
┌──────────────────────────────────────────────────────────┐
│ Exa Search Service Layer │
│ ┌────────────┐ ┌────────────┐ ┌──────────────────┐ │
│ │ search() │ │ findSimilar│ │ getContents() │ │
│ │ neural/ │ │ (URL seed) │ │ (known URLs) │ │
│ │ keyword/ │ └────────────┘ └──────────────────┘ │
│ │ auto/fast │ │
│ └────────────┘ ┌──────────────────┐ │
│ │ answer() / │ │
│ Content Options: │ streamAnswer() │ │
│ text | highlights | summary └──────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ Result Cache (LRU + Redis) │ │
│ └────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────┐
│ api.exa.ai — Exa Neural Search API │
│ Auth: x-api-key header | Rate: 10 QPS default │
└──────────────────────────────────────────────────────────┘
```
## Instructions
### Step 1: Search Service Layer
```typescript
// src/exa/service.ts
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
interface SearchRequest {
query: string;
type?: "auto" | "neural" | "keyword" | "fast" | "instant";
numResults?: number;
startDate?: string;
endDate?: string;
includeDomains?: string[];
excludeDomains?: string[];
category?: "company" | "research paper" | "news" | "tweet" | "people";
}
interface ContentOptions {
text?: boolean | { maxCharacters?: number };
highlights?: boolean | { maxCharacters?: number; query?: string };
summary?: boolean | { query?: string };
}
export async function searchWithContents(
req: SearchRequest,
content: ContentOptions = { text: { maxCharacters: 2000 } }
) {
return exa.searchAndContents(req.query, {
type: req.type || "auto",
numResults: req.numResults || 10,
startPublishedDate: req.startDate,
endPublishedDate: req.endDate,
includeDomains: req.includeDomains,
excludeDomains: req.excludeDomains,
category: req.category,
...content,
});
}
export async function findRelated(url: string, numResults = 5) {
return exa.findSimilarAndContents(url, {
numResults,
text: { maxCharacters: 1000 },
excludeSourceDomain: true,
});
}
```
### Step 2: Research Pipeline
```typescript
// src/exa/research.ts
export async function researchTopic(topic: string) {
// Phase 1: Broad neural search
const sources = await exa.searchAndContents(topic, {
type: "neural",
numResults: 15,
text: { maxCharacters: 2000 },
highlights: { maxCharacters: 500, query: topic },
startPublishedDate: "2024-01-01T00:00:00.000Z",
});
// Phase 2: Find similar to best result
const topUrl = sources.results[0]?.url;
const similar = topUrl
? await exa.findSimilarAndContents(topUrl, {
numResults: 5,
text: { maxCharacters: 1500 },
excludeSourceDomain: true,
})
: { results: [] };
// Phase 3: Get AI answer with citations
const answer = await exa.answer(
`Based on recent research, summarize: ${topic}`,
{ text: true }
);
return {
primary: sources.results,
related: similar.results,
aiSummary: answer.answer,
sources: answer.results.map(r => ({ title: r.title, url: r.url })),
};
}
```
### Step 3: RAG Integration Pattern
```typescript
// src/exa/rag.ts
export async function ragSearch(userQuery: string, contextWindow = 5) {
const results = await exa.searchAndContents(userQuery, {
type: "neural",
numResults: contextWindow,
text: { maxCharacters: 2000 },
highlights: { maxCharacters: 500, query: userQuery },
});
// Format for LLM context injection
const context = results.results
.map((r, i) =>
`[Source ${i + 1}] ${r.title}\n` +
`URL: ${r.url}\n` +
`Content: ${r.text}\n` +
`Key points: ${r.highlights?.join(" | ")}`
)
.join("\n\n---\n\n");
return {
context,
sources: results.results.map(r => ({
title: r.title,
url: r.url,
score: r.score,
})),
};
}
```
### Step 4: Domain-Specific Search Profiles
```typescript
const SEARCH_PROFILES = {
technical: {
includeDomains: [
"github.com", "stackoverflow.com", "arxiv.org",
"developer.mozilla.org", "docs.python.org",
],
},
news: {
category: "news" as const,
includeDomains: ["techcrunch.com", "theverge.com", "arstechnica.com"],
},
research: {
category: "research paper" as const,
includeDomains: ["arxiv.org", "nature.com", "science.org"],
},
companies: {
category: "company" as const,
},
};
export async function profiledSearch(
query: string,
profile: keyof typeof SEARCH_PROFILES
) {
const config = SEARCH_PROFILES[profile];
return searchWithContents({ query, ...config, numResults: 10 });
}
```
### Step 5: Competitor Discovery
```typescript
export async function discoverCompetitors(companyUrl: string) {
const similar = await exa.findSimilarAndContents(companyUrl, {
numResults: 10,
excludeSourceDomain: true,
text: { maxCharacters: 500 },
summary: { query: "What does this company do?" },
});
return similar.results.map(r => ({
name: r.title,
url: r.url,
description: r.summary || r.text?.substring(0, 200),
score: r.score,
}));
}
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| No results | Query too specific | Broaden query, switch to neural search |
| Low relevance | Wrong search type | Use `auto` type for hybrid results |
| Empty text/highlights | Site blocks scraping | Use `livecrawl: "preferred"` or try `summary` |
| Rate limit | Too many concurrent requests | Add request queue with 8-10 concurrency |
## Resources
- [Exa API Documentation](https://docs.exa.ai)
- [Exa Search Types](https://docs.exa.ai/reference/search)
- [Exa Contents Retrieval](https://docs.exa.ai/reference/contents-retrieval)
## Next Steps
For architecture variants at different scales, see `exa-architecture-variants`.Related Skills
exa-architecture-variants
Choose and implement Exa architecture patterns at different scales: direct search, cached search, and RAG pipeline. Use when designing Exa integrations, choosing between simple search and full RAG, or planning architecture for different traffic volumes. Trigger with phrases like "exa architecture", "exa blueprint", "how to structure exa", "exa RAG design", "exa at scale".
evernote-reference-architecture
Reference architecture for Evernote integrations. Use when designing system architecture, planning integrations, or building scalable Evernote applications. Trigger with phrases like "evernote architecture", "design evernote system", "evernote integration pattern", "evernote scale".
elevenlabs-reference-architecture
Implement ElevenLabs reference architecture for production TTS/voice applications. Use when designing new ElevenLabs integrations, reviewing project structure, or building a scalable audio generation service. Trigger: "elevenlabs architecture", "elevenlabs project structure", "how to organize elevenlabs", "TTS service architecture", "elevenlabs design patterns", "voice API architecture".
documenso-reference-architecture
Implement Documenso reference architecture with best-practice project layout. Use when designing new Documenso integrations, reviewing project structure, or establishing architecture standards for document signing applications. Trigger with phrases like "documenso architecture", "documenso best practices", "documenso project structure", "how to organize documenso".
deepgram-reference-architecture
Implement Deepgram reference architecture for scalable transcription systems. Use when designing transcription pipelines, building production architectures, or planning Deepgram integration at scale. Trigger: "deepgram architecture", "transcription pipeline", "deepgram system design", "deepgram at scale", "enterprise deepgram", "deepgram queue".
databricks-reference-architecture
Implement Databricks reference architecture with best-practice project layout. Use when designing new Databricks projects, reviewing architecture, or establishing standards for Databricks applications. Trigger with phrases like "databricks architecture", "databricks best practices", "databricks project structure", "how to organize databricks", "databricks layout".
customerio-reference-architecture
Implement Customer.io enterprise reference architecture. Use when designing integration layers, event-driven architectures, or enterprise-grade Customer.io setups. Trigger: "customer.io architecture", "customer.io design", "customer.io enterprise", "customer.io integration pattern".
cursor-reference-architecture
Reference architecture for Cursor IDE projects: directory structure, rules organization, indexing strategy, and team configuration patterns. Triggers on "cursor architecture", "cursor project structure", "cursor best practices", "cursor file structure".
coreweave-reference-architecture
Reference architecture for CoreWeave GPU cloud deployments. Use when designing ML infrastructure, planning multi-model serving, or establishing CoreWeave deployment standards. Trigger with phrases like "coreweave architecture", "coreweave design", "coreweave infrastructure", "coreweave best practices".
configuration-reference-generator
Configuration Reference Generator - Auto-activating skill for Technical Documentation. Triggers on: configuration reference generator, configuration reference generator Part of the Technical Documentation skill category.
cohere-reference-architecture
Implement Cohere reference architecture with layered project layout for RAG and agents. Use when designing new Cohere integrations, reviewing project structure, or establishing architecture standards for Cohere API v2 applications. Trigger with phrases like "cohere architecture", "cohere project structure", "cohere layout", "organize cohere app", "cohere design pattern".
coderabbit-reference-architecture
Implement CodeRabbit reference architecture with production-grade .coderabbit.yaml configuration. Use when designing review configuration for a new project, establishing team standards, or building a comprehensive review setup from scratch. Trigger with phrases like "coderabbit architecture", "coderabbit best practices", "coderabbit project structure", "coderabbit reference config", "coderabbit full setup".