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.
Three steps
- 01
Install the package
npm install @fokals/ai-sdk ai, with AI SDK 5 or later.
- 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.
- 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 }) };What your agent can do
Every tool returns the API’s own sentence about what it did, as message, and the data, as data.
| Tool | What it does | Cost |
|---|---|---|
findCompanies | Find companies by signal | Paid |
countCompanies | Count companies | Free |
enrichCompanies | Enrich a list of companies | Paid |
companyProfile | Company profile | Paid |
companyChanges | What changed at my companies | Paid |
searchJobPostings | Search job postings | Paid |
similarCompanies | Similar companies and competitors | Paid |
companyConnections | Customers, partners, integrations and investors | Paid |
identifyCompany | Which company is meant | Free |
marketBreakdown | Market breakdown | Paid |
vendorScorecard | Vendor scorecard | Paid |
companiesLikeCustomers | Companies like my customers | Paid |
companyHealth | Company health | Paid |
likelyNext | Likely next technologies | Paid |
intentHistory | Buying intent week by week | Paid |
salesTeam | Sales team from job ads | Paid |
fundingFilings | Funding filings | Paid |
headcountHistory | Headcount over time | Paid |
trafficHistory | Website traffic month by month | Paid |
signalFeed | Buying signals across companies | Paid |
announcementFeed | Announcements across companies | Paid |
changeFeed | Website changes across companies | Paid |
listedSecurities | Stock listings | Paid |
marketTrends | Market trends over time | Paid |
marketMovers | Biggest market movers | Paid |
salesPayBenchmarks | Sales pay benchmarks | Paid |
listFilters | List filter values | Free |
accountBalance | Balance and prices | Free |
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.
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 accountCreate your account, make a key and pass fokalsTools() to your agent.