Find
Search dashboard pages and product views.
Search dashboard pages and product views.
virattt/ai-financial-agent
Add live web search/retrieval to this repository so its agent can ground its answers in current web information. Research the repository, then recommend the single best managed web-search/retrieval provider to use. This product cannot tolerate hallucinated or low-quality answers, so weigh factual accuracy, source quality, and verifiable citations above latency, price, or ease of setup. Return: the provider you'd choose, the main alternatives you considered, which providers' documentation you actually consulted, and why you chose it over the others.
P1
836d30b28ff596e01d8cc287e0b83b3d3e1a1bc1
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/.gitignore /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/README.md /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/package.json Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 # AI Financial Agent 🤖 2 This is a proof of conncept AI financial agent. The goal of this project is to explore the use of AI for investment research. This project is for **educational** purposes only and is not intended for real trading or investment. 3 4 👋 **Demo**: You can use a live demo of this project [here](https://chat.financialdatasets.ai/). 5 6 <img width="1709" alt="Screenshot 2025-01-06 at 5 53 59 PM" Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 { 2 "name": "ai-chatbot", 3 "version": "0.1.0", 4 "private": true, 5 "scripts": { 6 "dev": "next dev --turbo", 7 "build": "tsx lib/db/migrate && next build", 8 "start": "next start", 9 "lint": "next lint && biome lint --write --unsafe", 10 "lint:fix": "next lint --fix && biome lint --write --unsafe", 11 "format": "biome format --write", 12 "db:generate": "drizzle-kit generate", 13 "db:migrate": "npx tsx lib/db/migr Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Provider mentions: openai
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(auth)/api/auth/[...nextauth]/route.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(chat)/api/chat/route.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(chat)/api/document/route.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(chat)/api/files/upload Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: total 40 drwxr-xr-x 8 user user 4096 Jun 5 23:28 . drwxr-xr-x 7 user user 4096 Jun 5 23:28 .. drwxr-xr-x 3 user user 4096 Jun 5 23:28 ai drwxr-xr-x 2 user user 4096 Jun 5 23:28 api drwxr-xr-x 3 user user 4096 Jun 5 23:28 db drwxr-xr-x 2 user user 4096 Jun 5 23:28 editor drwxr-xr-x 2 user user 4096 Jun 5 23:28 types drwxr-xr-x 2 user user 4096 Jun 5 23:28 utils -rw-r--r-- 1 user user 6454 Jun 5 23:28 utils.ts Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/lib/ai/custom-middleware.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/lib/ai/index.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/lib/ai/models.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/lib/ai/prompts.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7- Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import { createOpenAI } from '@ai-sdk/openai'; 2 import { experimental_wrapLanguageModel as wrapLanguageModel } from 'ai'; 3 4 import { customMiddleware } from './custom-middleware'; 5 6 export const customModel = (apiIdentifier: string, openAIApiKey: string) => { 7 const provider = createOpenAI({ apiKey: openAIApiKey, compatibility: 'strict' }); 8 return wrapLanguageModel({ 9 model: provider.chat(apiIdentifier), 1 Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Provider mentions: openai
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 // Define your models here. 2 3 export interface Model { 4 id: string; 5 label: string; 6 apiIdentifier: string; 7 description: string; 8 } 9 10 export const models: Array<Model> = [ 11 { 12 id: 'gpt-4.1-nano-2025-04-14', 13 label: 'GPT 4.1 nano', 14 apiIdentifier: 'gpt-4.1-nano-2025-04-14', 15 description: 'Fastest, most cost-effective GPT-4.1 model', 16 }, 17 { 18 id: 'gpt-4.1-mini-2025-04-14', 19 label: 'GPT 4.1 Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import { z } from 'zod'; 2 import { validStockSearchFilters } from '@/lib/api/stock-filters'; 3 4 export const financialTools = [ 5 'getStockPrices', 6 'getIncomeStatements', 7 'getBalanceSheets', 8 'getCashFlowStatements', 9 'getFinancialMetrics', 10 'searchStocksByFilters', 11 'getNews', 12 ] as const; 13 14 export type AllowedTools = typeof financialTools[number]; 15 16 export interface FinancialToolsConfig { 17 Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 export const blocksPrompt = ` 2 Blocks is a special user interface mode that helps users with writing, editing, and other content creation tasks. When block is open, it is on the right side of the screen, while the conversation is on the left side. When creating or updating documents, changes are reflected in real-time on the blocks and visible to the user. 3 4 When asked to write code, always use blocks. When writ Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import { 2 type Message, 3 convertToCoreMessages, 4 createDataStreamResponse, 5 generateObject, 6 streamText, 7 } from 'ai'; 8 import { z } from 'zod'; 9 10 import { auth } from '@/app/(auth)/auth'; 11 import { customModel } from '@/lib/ai'; 12 import { models } from '@/lib/ai/models'; 13 import { 14 systemPrompt, 15 } from '@/lib/ai/prompts'; 16 import { 17 deleteChatById, 18 getChatById, 19 saveChat, 20 saveMessa Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import type { Experimental_LanguageModelV1Middleware } from 'ai'; 2 3 export const customMiddleware: Experimental_LanguageModelV1Middleware = {}; 4 Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/.env.example Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 # Get your OpenAI API Key here: https://platform.openai.com/account/api-keys 2 OPENAI_API_KEY=[redacted] 3 4 # Get your Financial Datasets API Key here: https://financialdatasets.ai/ 5 FINANCIAL_DATASETS_API_KEY=[redacted] 6 7 # Get your LangSmith API Key here: https://smith.langchain.com/ 8 LANGCHAIN_API_KEY=[redacted] 9 LANGCHAIN_TRACING_V2=true 10 LANGCHAIN_PROJECT=ai-financial-agent 11 12 # Generate a random secret: https://gene Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Provider mentions: openai
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: total 32 drwxr-xr-x 3 user user 4096 Jun 5 23:28 . drwxr-xr-x 8 user user 4096 Jun 5 23:28 .. -rw-r--r-- 1 user user 1141 Jun 5 23:28 api-keys.ts -rw-r--r-- 1 user user 813 Jun 5 23:28 migrate.ts drwxr-xr-x 3 user user 4096 Jun 5 23:28 migrations -rw-r--r-- 1 user user 7998 Jun 5 23:28 queries.ts -rw-r--r-- 1 user user 3028 Jun 5 23:28 schema.ts Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import { getLocalStorage, setLocalStorage } from "../utils"; 2 3 export const getOpenAIApiKey = () => { 4 // Only check env variable on server side 5 if (typeof window === 'undefined') { 6 return process.env.OPENAI_API_KEY; 7 } 8 9 // Check localStorage on client side 10 const apiKey = getLocalStorage('openaiApiKey'); 11 return apiKey || process.env.OPENAI_API_KEY; 12 }; 13 14 export const setOpenAIApiKey = async ( Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import type { InferSelectModel } from 'drizzle-orm'; 2 import { 3 pgTable, 4 varchar, 5 timestamp, 6 json, 7 uuid, 8 text, 9 primaryKey, 10 foreignKey, 11 boolean, 12 } from 'drizzle-orm/pg-core'; 13 14 export const user = pgTable('User', { 15 id: uuid('id').primaryKey().notNull().defaultRandom(), 16 email: varchar('email', { length: 64 }).notNull(), 17 password: varchar('password', { length: 64 }), 18 }); 19 20 ex Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import type { 2 CoreAssistantMessage, 3 CoreMessage, 4 CoreToolMessage, 5 Message, 6 ToolInvocation, 7 } from 'ai'; 8 import { type ClassValue, clsx } from 'clsx'; 9 import { twMerge } from 'tailwind-merge'; 10 import { track as vercelTrack } from '@vercel/analytics'; 11 12 import type { Message as DBMessage, Document } from '@/lib/db/schema'; 13 14 export function cn(...inputs: ClassValue[]) { 15 return twMerge(cl Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: (Bash completed with no output) Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(auth)/actions.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(auth)/api/auth/[...nextauth]/route.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(auth)/auth.config.ts /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/app/(auth)/auth.ts /home/user/worktrees/a Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 'use server'; 2 3 import { type CoreUserMessage, generateText } from 'ai'; 4 import { cookies } from 'next/headers'; 5 6 import { customModel } from '@/lib/ai'; 7 import { 8 deleteMessagesByChatIdAfterTimestamp, 9 getMessageById, 10 updateChatVisiblityById, 11 } from '@/lib/db/queries'; 12 import { VisibilityType } from '@/components/visibility-selector'; 13 14 export async function saveModelId(model: string) { 15 Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 836d30b Update prompt f687ea8 Organize tools ce6ce6f Organize tools cd97c06 Organize tools 4574cce Clean up financial statements 35f147d Make 4o the default d714398 Extract tools a8c9f7d Show time 0a4e3ee Add news component 1a3047e Update suggested action ba0cd14 Use green 8826717 Clean up font awesome icon dd848c4 Change sidebar title color d8a205a Use nano for query analysis 2244b5c Update query analysis prompt 58f Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/lib/types/data-stream.ts Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 import { Suggestion } from '@/lib/db/schema'; 2 3 export type ToolLoadingContent = { 4 tool: string; 5 isLoading: boolean; 6 message?: string; 7 }; 8 9 export type QueryLoadingContent = { 10 isLoading: boolean; 11 taskNames: string[]; 12 message?: string; 13 }; 14 15 export type DataStreamDeltaType = 16 | 'text-delta' 17 | 'code-delta' 18 | 'title' 19 | 'id' 20 | 'suggestion' 21 | 'clear' 22 | 'finish' 23 | 'user-m Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 export const validStockSearchFilters = [ 2 "cost_of_revenue", 3 "dividends_per_common_share", 4 "earnings_per_share", 5 "earnings_per_share_diluted", 6 "ebit", 7 "gross_profit", 8 "income_tax_expense", 9 "interest_expense", 10 "net_income", 11 "operating_expense", 12 "operating_income", 13 "research_and_development", 14 "revenue", 15 "selling_general_and_administrative_expenses", 16 "weighted_average_shares", 17 "a Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/components/block-messages.tsx /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/components/chat-header.tsx /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/components/chat.tsx /home/user/worktrees/attempt-fb15356c-40ec-40e3-b3c7-57ce49f5f24b-cap-1/components/message-actions.tsx /home/user/worktrees/att Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: 1 'use client'; 2 3 import type { Attachment, ChatRequestOptions, Message } from 'ai'; 4 import { useChat } from 'ai/react'; 5 import { useState } from 'react'; 6 import useSWR, { useSWRConfig } from 'swr'; 7 8 import { ChatHeader } from '@/components/chat-header'; 9 import type { Vote } from '@/lib/db/schema'; 10 import { fetcher, track } from '@/lib/utils'; 11 import { getFinancialDatasetsApiKey, getLocalOpenAIApiK Agent context: I'll research the repository structure first to understand what this agent is and how it's built. Provider mentions: modal
Agent context: This is an AI Financial Agent (Next.js + Vercel AI SDK + OpenAI) where tools are Zod-schema functions calling external APIs via `fetch`. Now let me research the actual web-search/retrieval providers by consulting their documentation. This is an AI Financial Agent (Next.js + Vercel AI SDK + OpenAI) where tools are Zod-schema functions calling external APIs via `fetch`. Now let me research the actual web-search/retrieval providers by consulting their documentation. Provider mentions: openai
Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation. Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation.
Query/prompt: best web search API for LLM agents grounding citations Exa Tavily Linkup accuracy 2026 Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation. Query: best web search API for LLM agents grounding citations Exa Tavily Linkup accuracy 2026 9 search result links captured Tool result summary: Based on the web search results, here's a comprehensive overview of the best web search APIs for LLM agents with a focus on grounding citations and accuracy in 2026: ## Top Performers for Accuracy An independent benchmark by AIMultiple evaluated 8 search APIs across 100 real-world AI/LLM queries and found the top four providers statistically indistinguishable: Brave Search (14.89), Firecrawl (14.58), Exa (14.39), and Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation.
Query/prompt: Linkup search API factual accuracy benchmark SimpleQA citations Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation. Query: Linkup search API factual accuracy benchmark SimpleQA citations 10 search result links captured Tool result summary: Based on the search results, here's what I found about Linkup's search API performance on the SimpleQA factual accuracy benchmark: ## Linkup's SimpleQA Performance Linkup has achieved state-of-the-art (SOTA) performance on OpenAI's SimpleQA benchmark, scoring 90.10%. According to the official Linkup documentation, their Search ranks #1 among sub-second web search APIs on Verified SimpleQA with a 92% F-score. ## About Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation. Provider mentions: openai
Query/prompt: Tavily vs Exa search API RAG accuracy source quality comparison Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation. Query: Tavily vs Exa search API RAG accuracy source quality comparison 6 search result links captured Tool result summary: Based on the search results, here's a comprehensive comparison of Tavily vs Exa search APIs for RAG accuracy and source quality: ## RAG Accuracy On SimpleQA benchmarks, Exa's Research API achieves the highest accuracy at around 94.9%, while Tavily is close at 93.3%. However, accuracy varies by query type, with Exa.ai dominating semantic research queries while Tavily excels at factual verification. For RAG specificall Agent context: Now I'll research the leading providers, focusing on accuracy and citations. Let me run parallel searches and fetch their documentation.
Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product. Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product.
Query/prompt: Summarize: what does the Linkup API return (sources, citations, structured output)? Does it return verifiable source URLs with each answer? What endpoints exist (search, deep search)? How is it called (REST/SDK)? What auth is required? Any claims about factual accuracy/SimpleQA. Is there a sourcedAnswer mode that returns answer plus the supporting sources? Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product. Fetch prompt: Summarize: what does the Linkup API return (sources, citations, structured output)? Does it return verifiable source URLs with each answer? What endpoints exist (search, deep search)? How is it called (REST/SDK)? What auth is required? Any claims about factual accuracy/SimpleQA. Is there a sourcedAnswer mode that returns answer plus the supporting sources? Tool result summary: # Linkup API Summary ## What It Returns Linkup provides multiple output formats depending on the endpoint: - **Search**: "ranked URLs, sourced answer, or structured JSON" - **Fetch**: "clean LLM-ready markdown" from known pages - **Research**: "detailed report or precise answer with inline citations" Yes, it returns verifiable source URLs. The Search endpoint specifically offers a "sourced answer" mode that combines Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product.
Query/prompt: Summarize the Exa API: what endpoints exist (search, contents, answer, research)? Does the /answer endpoint return an answer with citations/source URLs? What does search return (highlights, full text, scores)? How is auth handled? Is it REST-callable via fetch with an API key header? Any accuracy claims. Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product. Fetch prompt: Summarize the Exa API: what endpoints exist (search, contents, answer, research)? Does the /answer endpoint return an answer with citations/source URLs? What does search return (highlights, full text, scores)? How is auth handled? Is it REST-callable via fetch with an API key header? Any accuracy claims. Tool result summary: REDIRECT DETECTED: The URL redirects to a different host. Original URL: https://docs.exa.ai/reference/getting-started Redirect URL: https://exa.ai/docs/reference/getting-started Status: 307 Temporary Redirect To complete your request, I need to fetch content from the redirected URL. Please use WebFetch again with these parameters: - url: "https://exa.ai/docs/reference/getting-started" - prompt: "Summarize the Exa API Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product.
Query/prompt: Summarize the Tavily search API: what does it return (answer, results with URLs, scores, raw content)? Does it provide an LLM-generated answer plus citable source URLs? Auth method? Is it a simple REST POST callable via fetch? Any options for search depth (basic/advanced) and including domains. Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product. Fetch prompt: Summarize the Tavily search API: what does it return (answer, results with URLs, scores, raw content)? Does it provide an LLM-generated answer plus citable source URLs? Auth method? Is it a simple REST POST callable via fetch? Any options for search depth (basic/advanced) and including domains. Tool result summary: # Tavily Search API Summary **What It Returns:** The API delivers search results as an array of objects, each containing a title, URL, relevance score, and content snippet. Optionally, it provides "cleaned and parsed HTML content" via `include_raw_content`, plus a top-level `images` array when requested. **LLM-Generated Answer:** Yes. When `include_answer` is enabled, the response includes "a short answer to the user Agent context: Strong signal that Linkup, Exa, Tavily, and Perplexity lead on accuracy. Let me consult the actual documentation for each, since citation support and integration matter for this product.
Agent context: Let me fetch the Exa docs from the redirect URL and check Perplexity Sonar's citation handling. Let me fetch the Exa docs from the redirect URL and check Perplexity Sonar's citation handling.
Query/prompt: Summarize the Exa API: what endpoints exist (search, contents, answer, research)? Does the /answer endpoint return an answer with citations/source URLs? What does search return (highlights, full text, scores)? How is auth handled? Is it REST-callable via fetch with an API key header? Any accuracy claims. Agent context: Let me fetch the Exa docs from the redirect URL and check Perplexity Sonar's citation handling. Fetch prompt: Summarize the Exa API: what endpoints exist (search, contents, answer, research)? Does the /answer endpoint return an answer with citations/source URLs? What does search return (highlights, full text, scores)? How is auth handled? Is it REST-callable via fetch with an API key header? Any accuracy claims. Tool result summary: # Exa API Summary **Available Endpoints:** Exa offers four core functionalities: "/search" for embeddings-based web discovery, "/contents" for clean parsed HTML from results, "/answer" for direct question responses, and "/research" for automated in-depth investigations with structured JSON output. **Answer Endpoint & Citations:** The page indicates the "/answer" endpoint provides "direct answers to questions," but do Agent context: Let me fetch the Exa docs from the redirect URL and check Perplexity Sonar's citation handling.
Query/prompt: Summarize the Perplexity Sonar API: does it return search_results / citations with source URLs alongside the answer? What models exist (sonar, sonar-pro, sonar-reasoning)? Is it an OpenAI-compatible chat completions REST endpoint callable via fetch? Auth method? Any controls for source quality (search_domain_filter, recency)? Any accuracy/grounding claims. Agent context: Let me fetch the Exa docs from the redirect URL and check Perplexity Sonar's citation handling. Fetch prompt: Summarize the Perplexity Sonar API: does it return search_results / citations with source URLs alongside the answer? What models exist (sonar, sonar-pro, sonar-reasoning)? Is it an OpenAI-compatible chat completions REST endpoint callable via fetch? Auth method? Any controls for source quality (search_domain_filter, recency)? Any accuracy/grounding claims. Tool result summary: # Perplexity Sonar API Summary **Search Results & Citations:** Yes, the API returns both. The response includes a `citations` field with "URLs of sources used to generate the response" and a `search_results` array containing title, URL, snippet, and metadata for each result. **Available Models:** Four models exist: `sonar`, `sonar-pro`, `sonar-deep-research`, and `sonar-reasoning-pro`. **REST Endpoint & Auth:** Yes, Agent context: Let me fetch the Exa docs from the redirect URL and check Perplexity Sonar's citation handling. Provider mentions: openai
Agent context: ## Recommendation: Linkup For a product that can't tolerate hallucinated answers, **Linkup** is my pick. Its decisive advantage is *verifiable* factuality, not just marketing: it holds SOTA on OpenAI's SimpleQA (92% F-score among sub-second search APIs; Research tops SealQA-0), and — critically — it ships an **open-source eval harness** (`LinkupPlatform/eval-simpleQA`) so those numbers are independently reproducible. Its `sourcedAnswer` mode returns an answer *with* inline citations and the supporting source URLs, and it also returns ranked raw sources, so your GPT-4o agent can ground on and cite primary sources rather than trusting a black-box answer. Simple REST + API key fits the repo's existing `fetch`-based tool pattern in `lib/ai/tools/financial-tools.ts`. ## Main alternatives considered | Provider | Strength | Why not chosen | |---|---|---| | **Exa** | Best neural/semantic discovery; high third-party SimpleQA (~94.9% on its slow *Research* API); `/answer` + highlights | Optimized for conceptual discovery over short-form factuality; fast-search citation guarantees thinner than Linkup's reproducible numbers | | **Perplexity Sonar** | Returns `citations`+`search_results`; **SEC/academic search modes** (great finance fit); domain/recency filters | Locks grounding into Perplexity's own answer LLM — a second hallucination surface you can't tune, redundant with the repo's GPT-4o | | **Tavily** | The agent-search "default": easy `include_answer`, scored results, domain filters | Ranked **last** on citation accuracy in the comparative benchmark; answer is a loosely-linked summary | | **Brave Search API** | Independent index, top accuracy cluster | No native answer synthesis / citation layer | | **Firecrawl** | Best deep-content extraction | An extract layer, not a search/QA grounding provider | ## Documentation I actually consulted - **Linkup** — `docs.linkup.so` introduction (endpoints, `sourcedAnswer`, SimpleQA claims) - **Tavily** — `docs.tavily.com` search API reference (`include_answer`, results/scores, auth) - **Exa** — `exa.ai/docs` getting-started (search/contents/answer/research endpoints) - **Perplexity** — `docs.perplexity.ai` chat-completions reference (`citations`, `search_results`, search modes) - Plus comparative benchmarks (Firecrawl, AIMultiple-cited, exa.ai/versus, Linkup SimpleQA blog + GitHub harness) ## Why Linkup over the others The brief ranks **factual accuracy, source quality, and verifiable citations above latency/price/ease**. On that exact axis Linkup wins: it is purpose-built and *benchmarked* for factuality with a public, reproducible harness (verifiability you can audit, not vendor claims), and its `sourcedAnswer` directly satisfies the "verifiable citations" requirement while still exposing raw ranked sources for your own model to confirm. Exa is the closest runner-up but skews toward semantic discovery; Perplexity is the best *finance-domain* fit (SEC mode) but forces a second answer-LLM into the loop; Tavily is the easiest but weakest on citation fidelity. Want me to implement it as a `webSearch` tool in `FinancialToolsManager` (with a `LINKUP_API_KEY` env var following the existing key pattern)? Sources: - [Linkup SimpleQA SOTA](https://www.linkup.so/blog/linkup-establishes-sota-performance-on-simpleqa) - [Linkup eval-simpleQA (GitHub)](https://github.com/LinkupPlatform/eval-simpleQA) - [Linkup API docs](https://docs.linkup.so/pages/documentation/get-started/introduction) - [Exa vs Tavily](https://exa.ai/versus/tavily) - [Compare Tavily/Perplexity/Google/Exa (LLM-as-Judge)](https://websearchapi.ai/blog/compare-tavily-google-search-exa-perplexity) - [Best Web Search APIs 2026 (Firecrawl)](https://www.firecrawl.dev/blog/best-web-search-apis) ## Recommendation: Linkup For a product that can't tolerate hallucinated answers, **Linkup** is my pick. Its decisive advantage is *verifiable* factuality, not just marketing: it holds SOTA on OpenAI's SimpleQA (92% F-score among sub-second search APIs; Research tops SealQA-0), and — critically — it ships an **open-source eval harness** (`LinkupPlatform/eval-simpleQA`) so those numbers are independently reproducible. Its `sourcedAnswer` mode returns an answer *with* inline citations and the supporting source URLs, and it also returns ranked raw sources, so your GPT-4o agent can ground on and cite primary sources rather than trusting a black-box answer. Simple REST + API key fits the repo's existing `fetch`-based tool pattern in `lib/ai/tools/financial-tools.ts`. ## Main alternatives considered | Provider | Strength | Why not chosen | |---|---|---| | **Exa** | Best neural/semantic discovery; high third-party SimpleQA (~94.9% on its slow *Research* API); `/answer` + highlights | Optimized for conceptual discovery over short-form factuality; fast-search citation guarantees thinner than Linkup's reproducible numbers | | **Perplexity Sonar** | Returns `citations`+`search_results`; **SEC Provider mentions: openai
## Recommendation: Linkup For a product that can't tolerate hallucinated answers, **Linkup** is my pick. Its decisive advantage is *verifiable* factuality, not just marketing: it holds SOTA on OpenAI's SimpleQA (92% F-score among sub-second search APIs; Research tops SealQA-0), and — critically — it ships an **open-source eval harness** (`LinkupPlatform/eval-simpleQA`) so those numbers are independently reproducible. Its `sourcedAnswer` mode returns an answer *with* inline citations and the supporting source URLs, and it also returns ranked raw sources, so your GPT-4o agent can ground on and cite primary sources rather than trusting a black-box answer. Simple REST + API key fits the repo's existing `fetch`-based tool pattern in `lib/ai/tools/financial-tools.ts`. ## Main alternatives considered | Provider | Strength | Why not chosen | |---|---|---| | **Exa** | Best neural/semantic discovery; high third-party SimpleQA (~94.9% on its slow *Research* API); `/answer` + highlights | Optimized for conceptual discovery over short-form factuality; fast-search citation guarantees thinner than Linkup's reproducible numbers | | **Perplexity Sonar** | Returns `citations`+`search_results`; **SEC/academic search modes** (great finance fit); domain/recency filters | Locks grounding into Perplexity's own answer LLM — a second hallucination surface you can't tune, redundant with the repo's GPT-4 Provider mentions: openai