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. The agent needs access to high-quality, reputable, and licensed sources rather than generic scraped search-engine results, so weigh source coverage and quality heavily. 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.
P3
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: EISDIR: illegal operation on a directory, read '/home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2' 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 400 drwxr-xr-x 7 user user 4096 Jun 5 23:31 . drwxr-xr-x 4 user user 4096 Jun 5 23:31 .. -rw-r--r-- 1 user user 823 Jun 5 23:31 .env.example -rw-r--r-- 1 user user 463 Jun 5 23:31 .eslintrc.json -rw-r--r-- 1 user user 170 Jun 5 23:31 .git -rw-r--r-- 1 user user 436 Jun 5 23:31 .gitignore -rw-r--r-- 1 user user 552 Jun 5 23:31 LICENSE -rw-r--r-- 1 user user 4859 Jun 5 23:31 README.md drwxr-xr-x 6 user user 4096 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: 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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib/ai/tools 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: lib/ai/tools/financial-tools.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: total 40 drwxr-xr-x 8 user user 4096 Jun 5 23:31 . drwxr-xr-x 7 user user 4096 Jun 5 23:31 .. drwxr-xr-x 3 user user 4096 Jun 5 23:31 ai drwxr-xr-x 2 user user 4096 Jun 5 23:31 api drwxr-xr-x 3 user user 4096 Jun 5 23:31 db drwxr-xr-x 2 user user 4096 Jun 5 23:31 editor drwxr-xr-x 2 user user 4096 Jun 5 23:31 types drwxr-xr-x 2 user user 4096 Jun 5 23:31 utils -rw-r--r-- 1 user user 6454 Jun 5 23:31 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: total 28 drwxr-xr-x 3 user user 4096 Jun 5 23:31 . drwxr-xr-x 8 user user 4096 Jun 5 23:31 .. -rw-r--r-- 1 user user 143 Jun 5 23:31 custom-middleware.ts -rw-r--r-- 1 user user 454 Jun 5 23:31 index.ts -rw-r--r-- 1 user user 891 Jun 5 23:31 models.ts -rw-r--r-- 1 user user 3343 Jun 5 23:31 prompts.ts drwxr-xr-x 2 user user 4096 Jun 5 23:31 tools 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: lib/ai/custom-middleware.ts lib/ai/index.ts lib/ai/models.ts lib/ai/prompts.ts lib/ai/tools/financial-tools.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 { 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 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 // 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 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: /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/(auth)/api/auth/[...nextauth]/route.ts /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/(chat)/actions.ts /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/(chat)/api/chat/route.ts /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/(chat)/api/document/route.ts /home 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 # 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: Found 3 files lib/ai/index.ts lib/ai/models.ts lib/ai/tools/financial-tools.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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib/ai/tools/financial-tools.ts: 'searchStocksByFilters', /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib/ai/tools/financial-tools.ts: searchStocksByFilters: { /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib/ai/tools/financial-tools.ts: ).describe('The filters to search for (e.g. [{field: "n 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 12 drwxr-xr-x 2 user user 4096 Jun 5 23:31 . drwxr-xr-x 8 user user 4096 Jun 5 23:31 .. -rw-r--r-- 1 user user 2470 Jun 5 23:31 stock-filters.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: total 32 drwxr-xr-x 3 user user 4096 Jun 5 23:31 . drwxr-xr-x 8 user user 4096 Jun 5 23:31 .. -rw-r--r-- 1 user user 1141 Jun 5 23:31 api-keys.ts -rw-r--r-- 1 user user 813 Jun 5 23:31 migrate.ts drwxr-xr-x 3 user user 4096 Jun 5 23:31 migrations -rw-r--r-- 1 user user 7998 Jun 5 23:31 queries.ts -rw-r--r-- 1 user user 3028 Jun 5 23:31 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: 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. Provider mentions: modal
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: 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 { 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 { cookies } from 'next/headers'; 2 3 import { Chat } from '@/components/chat'; 4 import { DEFAULT_MODEL_NAME, models } from '@/lib/ai/models'; 5 import { generateUUID } from '@/lib/utils'; 6 import { DataStreamHandler } from '@/components/data-stream-handler'; 7 8 export default async function Page() { 9 const id = generateUUID(); 10 11 const cookieStore = await cookies(); 12 const modelIdFromCookie = cookie 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: import { z } from 'zod'; import { validStockSearchFilters } from '@/lib/api/stock-filters'; export const financialTools = [ 'getStockPrices', 'getIncomeStatements', 'getBalanceSheets', 'getCashFlowStatements', 'getFinancialMetrics', 'searchStocksByFilters', 'getNews', ] as const; export type AllowedTools = typeof financialTools[number]; export interface FinancialToolsConfig { financialDatasetsApiKey: string; dataStre 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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/api-keys-modal.tsx /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/app-sidebar.tsx /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/auth-form.tsx /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/balance-sheets-table.tsx /home/user/wor 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: 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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/chat.tsx: const financialDatasetsApiKey = getFinancialDatasetsApiKey(); /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/chat.tsx: modelApiKey: openAIApiKey, /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/chat.tsx: financialDatasetsApiKey, 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: I'll research the repository structure first to understand what this agent is and how it's built. Tool result summary: commit cd97c0664a57c92177c53441be87d3fee0b5c429 Author: virattt <virat.dot@gmail.com> Date: Sat Aug 16 12:31:03 2025 -0400 Organize tools app/(chat)/api/chat/route.ts | 2 +- lib/ai/{ => tools}/financial-tools.ts | 0 2 files changed, 1 insertion(+), 1 deletion(-) 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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/components/icons.tsx:export const LogoAnthropic = () => { 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: import { createOpenAI } from '@ai-sdk/openai'; import { experimental_wrapLanguageModel as wrapLanguageModel } from 'ai'; import { customMiddleware } from './custom-middleware'; export const customModel = (apiIdentifier: string, openAIApiKey: string) => { const provider = createOpenAI({ apiKey: openAIApiKey, compatibility: 'strict' }); return wrapLanguageModel({ model: provider.chat(apiIdentifier), middleware: customM 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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/hooks/use-tool-loading.ts: const setToolLoading = (tool: ToolName, isLoading: boolean, message?: string) => { /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib/ai/tools/financial-tools.ts: tool: 'searchStocksByFilters', /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/lib/ai/tools/financial-tools.t 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-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2 /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/(auth) /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/(chat) /home/user/worktrees/attempt-3f3cac02-4b9e-4e38-a578-11160f05271e-cap-2/app/api /home/user/worktrees/attem Agent context: I'll research the repository structure first to understand what this agent is and how it's built.
Agent context: This is a finance-focused agent (Next.js, Vercel AI SDK, OpenAI, tools in a `FinancialToolsManager`). The key requirement is licensed/high-quality sources over scraped results. Let me research the provider landscape and consult actual documentation. This is a finance-focused agent (Next.js, Vercel AI SDK, OpenAI, tools in a `FinancialToolsManager`). The key requirement is licensed/high-quality sources over scraped results. Let me research the provider landscape and consult actual documentation. Provider mentions: openai
Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent. I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent.
Query/prompt: best web search API for AI agents LLM grounding licensed sources 2026 Exa Tavily Linkup Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent. Query: best web search API for AI agents LLM grounding licensed sources 2026 Exa Tavily Linkup 18 search result links captured Tool result summary: Links: [{"title":"Exa vs Tavily: AI Search API Comparison 2026","url":"https://exa.ai/versus/tavily"},{"title":"Top 6 Exa Alternatives for AI Web Search in 2026","url":"https://brightdata.com/blog/ai/exa-alternatives"},{"title":"Top 5 Exa Alternatives for AI Web Search and Data Extraction in 2026","url":"https://www.firecrawl.dev/blog/exa-alternatives"},{"title":"Best AI Search APIs for Agents 2026: Tavily vs Exa vs Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent.
Query/prompt: Valyu search API licensed financial data proprietary sources for AI agents Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent. Query: Valyu search API licensed financial data proprietary sources for AI agents 9 search result links captured Tool result summary: Based on the search results, here's what I found about Valyu: ## Valyu Search API Overview Valyu is a search API built for AI agents that provides unified access to web search, academic papers, SEC filings, financial data, clinical trials, and 50+ proprietary sources. It positions itself as a Tavily and Exa alternative. ## Key Features for Financial Data The API enables users to search the open web alongside licensed Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent.
Query/prompt: Linkup search API premium licensed publisher content AI agents pricing Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent. Query: Linkup search API premium licensed publisher content AI agents pricing 10 search result links captured Tool result summary: Based on the search results, here's what I found about Linkup's search API for premium licensed publisher content and AI agents pricing: ## Overview Linkup is building an API that lets developers access web content from premium, trusted sources and hand the results to a large language model (LLM) to enrich its answers. Linkup signs content licensing deals with publishers and integrates with their CMS so that it can f Agent context: I'll research the leading providers in parallel, focusing on source quality and licensing for a financial agent.
Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality. Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality.
Query/prompt: What sources does Valyu provide access to? List the licensed/proprietary data sources especially finance-related ones (SEC filings, market data, etc). How does the search API work - endpoints, parameters, response format? Is there a JS/TypeScript SDK? How is pricing structured? Summarize what makes it suitable for grounding an AI agent in licensed sources. Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality. Fetch prompt: What sources does Valyu provide access to? List the licensed/proprietary data sources especially finance-related ones (SEC filings, market data, etc). How does the search API work - endpoints, parameters, response format? Is there a JS/TypeScript SDK? How is pricing structured? Summarize what makes it suitable for grounding an AI agent in licensed sources. Tool result summary: # Valyu AI Search API Summary ## Data Sources The documentation mentions access to "36+ proprietary data sources" including PubMed, SEC filings, clinical trials, arXiv, patents, and real-time financial data. However, the specific finance-related sources aren't detailed beyond "SEC filings" and "Stock prices, market data, and financial metrics." ## How the API Works Valyu offers a unified search endpoint (`https://api Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality.
Query/prompt: What sources does Linkup provide and how are they licensed? Does it cover financial/premium publisher content? How does the API work (endpoints, parameters, modes like standard/deep, sourcedAnswer)? Is there a JS/TypeScript SDK? Summarize what makes it suitable for grounding an AI agent in licensed sources. Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality. Fetch prompt: What sources does Linkup provide and how are they licensed? Does it cover financial/premium publisher content? How does the API work (endpoints, parameters, modes like standard/deep, sourcedAnswer)? Is there a JS/TypeScript SDK? Summarize what makes it suitable for grounding an AI agent in licensed sources. Tool result summary: # Linkup Web Search API: Summary Based on Available Content ## Sources and Licensing The provided documentation doesn't specify which sources Linkup indexes, their licensing terms, or whether premium/financial publisher content is included. You'd need to consult the full documentation at https://docs.linkup.so/llms.txt to find this information. ## API Endpoints and Modes Linkup offers four endpoints optimized for dif Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality.
Query/prompt: How does Exa's search/retrieval API work? What endpoints and parameters does it offer (search, contents, answer)? What is the source coverage and how does neural search work? Is there a JS/TypeScript SDK? How is pricing structured? Does it offer licensed sources or is it crawled web? Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality. Fetch prompt: How does Exa's search/retrieval API work? What endpoints and parameters does it offer (search, contents, answer)? What is the source coverage and how does neural search work? Is there a JS/TypeScript SDK? How is pricing structured? Does it offer licensed sources or is it crawled web? 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: "How does Exa's search Agent context: Valyu stands out for finance — it bundles licensed financial sources (SEC filings, market data, FRED/BLS) with web search. Let me consult the actual documentation of the top candidates to verify integration fit and source quality.
Agent context: Let me get specifics on Valyu's finance coverage and Exa's approach to confirm the comparison. Let me get specifics on Valyu's finance coverage and Exa's approach to confirm the comparison.
Query/prompt: List exactly which financial data sources and types Valyu provides (exchanges, SEC filings, FRED, BLS, World Bank, transcripts, prediction markets, etc). Are these licensed? What's the value proposition for a financial research AI agent? Any details on real-time vs historical, coverage breadth, and source attribution. Agent context: Let me get specifics on Valyu's finance coverage and Exa's approach to confirm the comparison. Fetch prompt: List exactly which financial data sources and types Valyu provides (exchanges, SEC filings, FRED, BLS, World Bank, transcripts, prediction markets, etc). Are these licensed? What's the value proposition for a financial research AI agent? Any details on real-time vs historical, coverage breadth, and source attribution. Tool result summary: # Valyu Financial Data Sources & Value Proposition ## Data Sources Provided Based on the webpage, Valyu aggregates these financial data types: **Market Data:** - "Stocks, forex, crypto, ETFs, commodities, earnings, balance sheets, dividends, insider transactions" - Prediction markets from Polymarket and Kalshi **Economic Indicators:** - US labor statistics from BLS - Federal Reserve data (FRED) - World Bank and IMF g Agent context: Let me get specifics on Valyu's finance coverage and Exa's approach to confirm the comparison.
Query/prompt: How does Exa's search/retrieval API work? Endpoints and parameters (search, contents, answer)? Source coverage - is it crawled web or licensed sources? Is there a JS/TypeScript SDK? How is pricing structured? Agent context: Let me get specifics on Valyu's finance coverage and Exa's approach to confirm the comparison. Fetch prompt: How does Exa's search/retrieval API work? Endpoints and parameters (search, contents, answer)? Source coverage - is it crawled web or licensed sources? Is there a JS/TypeScript SDK? How is pricing structured? Tool result summary: # Exa Search API Overview Based on the provided documentation excerpt, here's what I can tell you: ## Core Functionality Exa offers four main endpoints: "/search" (embeddings-based web discovery), "/contents" (clean HTML parsing), "/answer" (direct question responses), and "/research" (automated in-depth investigation with structured JSON results). ## Coverage & Technical Details The page doesn't specify whether Exa Agent context: Let me get specifics on Valyu's finance coverage and Exa's approach to confirm the comparison.
Agent context: ## Recommendation: **Valyu** (`api.valyu.ai`) For this repo — a **financial research agent** (Next.js + Vercel AI SDK, tools in `FinancialToolsManager` at `lib/ai/tools/financial-tools.ts`, already wired to the Financial Datasets API) — Valyu is the single best fit. **Why Valyu wins here:** - **Licensed, finance-grade sources, not scraped SERPs** — exactly the bar you set. One API covers full-text SEC filings (10-K/10-Q/8-K), market data (stocks/forex/crypto/ETFs/commodities), earnings & insider transactions, FRED, BLS, World Bank/IMF (229 countries), prediction markets (Polymarket/Kalshi) — *plus* general web search and academic sources (arXiv/PubMed). - **Domain alignment** — it complements your existing Financial Datasets tools rather than bolting on a generic search box, and every result is traceable to its source document (important for an investment-research assistant). - **Clean integration** — official `valyu-js` TypeScript SDK and a single `POST /v1/search` endpoint slot directly into your existing tool pattern; pay-per-retrieval CPM pricing. **Main alternatives considered:** - **Linkup** — strongest *pure* licensed-content play: signs CMS-level licensing deals with premium publishers (no scraping), SOC 2 Type II, standard/deep modes. Best if you mainly needed licensed *journalism*. Rejected because it lacks Valyu's structured finance datasets — you'd still need a second integration for filings/market data. - **Exa** — excellent neural/embeddings search with strong relevance benchmarks (~81% vs Tavily's ~71% on complex retrieval) and `search`/`contents`/`answer`/`research` endpoints. Rejected because it's **crawled web**, not licensed sources, so it doesn't meet your "reputable/licensed over generic" requirement. - **Tavily** — the de-facto default agent-search API (single-call aggregation, LLM-ready). Solid and easy, but it ranks/filters *scraped* web results — same licensing gap as Exa. - Briefly weighed: Brave Search API, Perplexity Sonar, Serper/SerpAPI — all general SERP-grade, ruled out on the source-quality/licensing criterion. **Documentation I actually consulted:** - Valyu — `docs.valyu.ai/overview` and `valyu.ai/solutions-finance` (confirmed source list, `valyu-js` SDK, `/v1/search` endpoint, traceability) - Linkup — `docs.linkup.so` intro (endpoints: Search/Fetch/Research/Tasks; licensing model via TechCrunch coverage) - Exa — `exa.ai/docs/reference/getting-started` (four endpoints, SDKs, embeddings search) - Plus comparison surveys (Firecrawl, Composio, NomadLab) for the Tavily/Brave/Perplexity landscape. **Bottom line:** Valyu is the only provider that delivers *licensed, finance-specific* sources and general web search through one TypeScript-friendly API, making it the strongest grounding layer for this particular agent. Want me to implement it as a `webSearch`/`valyuSearch` tool in `FinancialToolsManager` (with a `VALYU_API_KEY` added to `.env.example` and `lib/db/api-keys.ts`)? Sources: - [Valyu Documentation](https://docs.valyu.ai/overview) - [Valyu Finance Solutions](https://www.valyu.ai/solutions-finance) - [Linkup Docs](https://docs.linkup.so/) - [Linkup connects LLMs with premium content legally (TechCrunch)](https://techcrunch.com/2024/11/28/linkup-connects-llms-with-premium-content-sources-legally/) - [Exa Docs](https://exa.ai/docs/reference/getting-started) - [Best Web Search APIs for AI (Firecrawl)](https://www.firecrawl.dev/blog/best-web-search-apis) - [Best AI Search APIs: Tavily vs Exa vs Serper (NomadLab)](https://nomadlab.cc/blog/2026/05/best-ai-search-apis-2026-tavily-exa-serper-firecrawl) ## Recommendation: **Valyu** (`api.valyu.ai`) For this repo — a **financial research agent** (Next.js + Vercel AI SDK, tools in `FinancialToolsManager` at `lib/ai/tools/financial-tools.ts`, already wired to the Financial Datasets API) — Valyu is the single best fit. **Why Valyu wins here:** - **Licensed, finance-grade sources, not scraped SERPs** — exactly the bar you set. One API covers full-text SEC filings (10-K/10-Q/8-K), market data (stocks/forex/crypto/ETFs/commodities), earnings & insider transactions, FRED, BLS, World Bank/IMF (229 countries), prediction markets (Polymarket/Kalshi) — *plus* general web search and academic sources (arXiv/PubMed). - **Domain alignment** — it complements your existing Financial Datasets tools rather than bolting on a generic search box, and every result is traceable to its source document (important for an investment-research assistant). - **Clean integration** — official `valyu-js` TypeScript SDK and a single `POST /v1/search` endpoint slot directly into your existing tool pattern; pay-per-retrieval CPM pricing. **Main alternatives considered:** - **Linkup** — strongest *pure* licensed-content play: signs CMS-level licensing deals with premiu
## Recommendation: **Valyu** (`api.valyu.ai`) For this repo — a **financial research agent** (Next.js + Vercel AI SDK, tools in `FinancialToolsManager` at `lib/ai/tools/financial-tools.ts`, already wired to the Financial Datasets API) — Valyu is the single best fit. **Why Valyu wins here:** - **Licensed, finance-grade sources, not scraped SERPs** — exactly the bar you set. One API covers full-text SEC filings (10-K/10-Q/8-K), market data (stocks/forex/crypto/ETFs/commodities), earnings & insider transactions, FRED, BLS, World Bank/IMF (229 countries), prediction markets (Polymarket/Kalshi) — *plus* general web search and academic sources (arXiv/PubMed). - **Domain alignment** — it complements your existing Financial Datasets tools rather than bolting on a generic search box, and every result is traceable to its source document (important for an investment-research assistant). - **Clean integration** — official `valyu-js` TypeScript SDK and a single `POST /v1/search` endpoint slot directly into your existing tool pattern; pay-per-retrieval CPM pricing. **Main alternatives considered:** - **Linkup** — strongest *pure* licensed-content play: signs CMS-level licensing deals with premium publishers (no scraping), SOC 2 Type II, standard/deep modes. Best if you mainly needed licensed *journalism*. Rejected because it lacks Valyu's structured finance datasets — you'd still need a seco