From exa-pack
Choose and implement Exa validated architecture blueprints for different scales. Use when designing new Exa integrations, choosing between monolith/service/microservice architectures, or planning migration paths for Exa applications. Trigger with phrases like "exa architecture", "exa blueprint", "how to structure exa", "exa project layout", "exa microservice".
How this skill is triggered — by the user, by Claude, or both
Slash command
/exa-pack:exa-architecture-variantsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Deployment architectures for Exa neural search at different scales. Exa's search-and-contents model supports everything from simple search features to full RAG pipelines and semantic knowledge bases.
Deployment architectures for Exa neural search at different scales. Exa's search-and-contents model supports everything from simple search features to full RAG pipelines and semantic knowledge bases.
Best for: Adding search to an existing app, < 1K queries/day.
User Query -> Backend -> Exa Search API -> Format Results -> User
from exa_py import Exa
exa = Exa(api_key=os.environ["EXA_API_KEY"])
@app.route('/search')
def search():
query = request.args.get('q')
results = exa.search_and_contents(
query, num_results=5, text={"max_characters": 1000} # 1000: 1 second in ms
)
return jsonify([{
"title": r.title, "url": r.url, "snippet": r.text[:200] # HTTP 200 OK
} for r in results.results])
Best for: High-traffic search, 1K-50K queries/day, content aggregation.
User Query -> Cache Check -> (miss) -> Exa API -> Cache Store -> User
|
v (hit)
Cached Results -> User
class CachedExaSearch:
def __init__(self, exa_client, redis_client, ttl=600): # 600: timeout: 10 minutes
self.exa = exa_client
self.cache = redis_client
self.ttl = ttl
def search(self, query: str, **kwargs):
key = self._cache_key(query, **kwargs)
cached = self.cache.get(key)
if cached:
return json.loads(cached)
results = self.exa.search_and_contents(query, **kwargs)
serialized = self._serialize(results)
self.cache.setex(key, self.ttl, json.dumps(serialized))
return serialized
Best for: AI-powered apps, 50K+ queries/day, LLM-augmented answers.
User Query -> Query Planner -> Exa Search -> Content Extraction
|
v
Vector Store (cache)
|
v
LLM Generation with Context -> User
class ExaRAGPipeline:
def __init__(self, exa, llm, vector_store):
self.exa = exa
self.llm = llm
self.vectors = vector_store
async def answer(self, question: str) -> dict:
# 1. Search for relevant content
results = self.exa.search_and_contents(
question, num_results=5, text={"max_characters": 3000}, # 3000: 3 seconds in ms
highlights=True
)
# 2. Store in vector cache for future queries
for r in results.results:
self.vectors.upsert(r.url, r.text, {"title": r.title})
# 3. Generate answer with citations
context = "\n\n".join([f"[{i+1}] {r.text}" for i, r in enumerate(results.results)])
answer = await self.llm.generate(
f"Based on the following sources, answer: {question}\n\n{context}"
)
return {"answer": answer, "sources": [r.url for r in results.results]}
| Factor | Direct | Cached | RAG Pipeline |
|---|---|---|---|
| Volume | < 1K/day | 1K-50K/day | 50K+/day |
| Latency | 1-3s | 50ms (cached) | 3-8s |
| Use Case | Simple search | Content aggregation | AI-powered answers |
| Complexity | Low | Medium | High |
| Issue | Cause | Solution |
|---|---|---|
| Slow search in UI | No caching | Add result cache with TTL |
| Stale cached results | Long TTL | Reduce TTL for time-sensitive queries |
| RAG hallucination | Poor source selection | Use highlights, increase num_results |
| High API costs | No query deduplication | Cache layer deduplicates identical queries |
Basic usage: Apply exa architecture variants to a standard project setup with default configuration options.
Advanced scenario: Customize exa architecture variants for production environments with multiple constraints and team-specific requirements.
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Provides Slack GIF creation utilities with dimension/FPS/color constraints and Python PIL-based frame generation. Use for animated Slack emoji or message GIFs.
npx claudepluginhub p/ktiseos-nyx-exa-pack-plugins-saas-packs-exa-pack