AI SDK

Company intelligence as AI SDK tools

AI-powered company intelligence on how companies around the world grow, change and compete. Fokals derives advanced signals from company data, covering everything from technology and hiring to funding, buying intent and company health. Refreshed every day and brought together into a clear view of every market. The @fokals/ai-sdk package gives an agent built with the AI SDK that data as tools.

Set up

Three steps

  1. 01

    Install the package

    npm install @fokals/ai-sdk ai, with AI SDK 5 or later.

  2. 02

    Make a key

    Create a key on your account page and set it as FOKALS_API_KEY, or pass it to a tool as apiKey.

  3. 03

    Give your agent the tools

    Pass fokalsTools() as the tools of generateText or streamText, or take the ones you need.

import { generateText, isStepCount } from 'ai';
import { fokalsTools } from '@fokals/ai-sdk';

const { text } = await generateText({
  model: 'anthropic/claude-sonnet-5.5',
  prompt: 'Which US companies running HubSpot are hiring right now?',
  tools: fokalsTools(),
  stopWhen: isStepCount(5),
});

console.log(text);
import { companyProfile, fokalsTools } from '@fokals/ai-sdk';

// Only some of the tools
const tools = fokalsTools({ include: ['findCompanies', 'countCompanies', 'companyProfile'] });

// Or one tool on its own, with its key passed in
const research = { companyProfile: companyProfile({ apiKey: process.env.FOKALS_API_KEY }) };
Tools

What your agent can do

Every tool returns the API’s own sentence about what it did, as message, and the data, as data.

ToolWhat it doesCost
findCompaniesFind companies by signalPaid
countCompaniesCount companiesFree
enrichCompaniesEnrich a list of companiesPaid
companyProfileCompany profilePaid
companyChangesWhat changed at my companiesPaid
searchJobPostingsSearch job postingsPaid
similarCompaniesSimilar companies and competitorsPaid
companyConnectionsCustomers, partners, integrations and investorsPaid
identifyCompanyWhich company is meantFree
marketBreakdownMarket breakdownPaid
vendorScorecardVendor scorecardPaid
companiesLikeCustomersCompanies like my customersPaid
companyHealthCompany healthPaid
likelyNextLikely next technologiesPaid
intentHistoryBuying intent week by weekPaid
salesTeamSales team from job adsPaid
fundingFilingsFunding filingsPaid
headcountHistoryHeadcount over timePaid
trafficHistoryWebsite traffic month by monthPaid
signalFeedBuying signals across companiesPaid
announcementFeedAnnouncements across companiesPaid
changeFeedWebsite changes across companiesPaid
listedSecuritiesStock listingsPaid
marketTrendsMarket trends over timePaid
marketMoversBiggest market moversPaid
salesPayBenchmarksSales pay benchmarksPaid
listFiltersList filter valuesFree
accountBalanceBalance and pricesFree
Prices

Paid from your balance, never past your yes

Paid tools are charged from your prepaid Fokals balance at the prices on the pricing page. A company that is not found costs nothing, and counting matches is free, so an agent can size a request before it pays.

A call that would cost more than your account lets run unasked does not run. It returns { needsApproval: true, message, details } with its price instead: the agent tells the person, and when they agree it calls again with max_usd.

A refused call (a bad argument, a key that is not valid, too many calls in a minute) throws a FokalsError in the API’s own words. The AI SDK hands it to the model as a tool error, so the agent can correct itself.

Questions

Good to know

Which versions of the AI SDK does it work with?

AI SDK 5, 6 and 7. The tools go wherever the AI SDK takes tools, such as generateText and streamText, with any model it supports.

Can I use Fokals without the package?

Yes. Fokals is also a remote MCP server at https://mcp.fokals.com/mcp, and every tool is an API endpoint, on the same account, balance and prices. See MCP and API.

Where is the source?

On GitHub, under the MIT licence. The tools are written from the API’s own OpenAPI document, so their names, descriptions and inputs match the API.

I need the data in bulk, or in my own product

The tools are for your own agents, a company or a list at a time. For bulk delivery, a data feed or redistribution, ask for a data licence from your account page.

Give your agent company intelligence

Create your account

Create your account, make a key and pass fokalsTools() to your agent.