langchain-fokals
LangChain tools for Fokals.
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.
This package gives a LangChain agent that data as tools: find companies by what they show, enrich a list of accounts, profile one company in depth, follow what changed, and size a market.
Install
pip install -U langchain-fokals
Get a key
Sign up at fokals.com and make a key on your account page. Then set it:
export FOKALS_API_KEY="your-key"
Or pass it to a tool or the toolkit as fokals_api_key.
Use it in an agent
With langchain and a model package installed (pip install -U langchain langchain-anthropic):
from langchain.agents import create_agent
from langchain_fokals import FokalsToolkit
tools = FokalsToolkit().get_tools()
agent = create_agent("anthropic:claude-sonnet-5-5", tools)
result = agent.invoke({"messages": [{"role": "user", "content": "Which US companies running HubSpot are hiring now?"}]})
print(result["messages"][-1].content)
To give the agent only some tools, name them:
tools = FokalsToolkit(include=["find_companies", "company_profile", "count_companies"]).get_tools()
Call a tool directly
from langchain_fokals import FokalsCompanyProfile
profile = FokalsCompanyProfile()
print(profile.invoke({"company": "stripe.com", "sections": ["technology", "hiring"]}))
Each tool returns the API's own sentence about what it did, followed by the data as JSON. Called with a tool call, the data is also the tool message's artifact.
Tools
| Tool | What it does | Cost |
|---|---|---|
fokals_find_companies |
Finds companies by a technology they run, a buying topic, hiring, an announcement, a project in their job ads, a pricing change, agent readiness, health, industry or country | Paid |
fokals_count_companies |
Counts the companies that match the same filters, and says what getting them would cost | Free |
fokals_enrich_companies |
Fills in your own list of companies, by website or name, up to 100 a call | Paid |
fokals_company_profile |
One company in depth: technologies and since when, open roles, buying topics, announcements, website changes, traffic, health and likely next technologies | Paid |
fokals_company_changes |
What is new at your companies since a date: website changes and announcements, in plain words | Paid |
fokals_search_job_postings |
Searches open job postings by title, function, seniority, country, work mode, technology and pay | Paid |
fokals_similar_companies |
Lookalikes of a company, or its competitors, with what they share | Paid |
fokals_company_connections |
The customers, partners, integrations and investors a company's website names, and who names it | Paid |
fokals_identify_company |
Which company a name or website address means | Free |
fokals_market_breakdown |
How a market divides by industry, country, technology, buying topic and more | Paid |
fokals_vendor_scorecard |
A technology vendor month by month: companies won and lost, churn, and the rivals they came from or moved to | Paid |
fokals_companies_like_customers |
Companies that look today the way your customers looked when they bought | Paid |
fokals_company_health |
A company's health this week, with the reasons | Paid |
fokals_likely_next |
The technologies a company is likeliest to add next | Paid |
fokals_list_filters |
The values the search tools filter by: technologies, buying topics, industries, countries | Free |
fokals_account_balance |
The balance, what this month has spent, and the prices | Free |
Prices
Paid tools are charged from your prepaid Fokals balance at the prices on the pricing page, also at api.fokals.com/v1/prices. A company that is not found costs nothing.
A call that would cost more than your account lets run unasked does not run. It returns its price instead, and the tool passes that on to the agent: the agent tells the person, and when they agree it calls again with max_usd. This is a normal answer, not an error.
Errors
A refused call (a bad argument, a key that is not valid, too many calls in a minute) reaches the agent as an error tool message in the API's own words, so the agent can correct itself. Set handle_tool_error=False on a tool to raise ToolException instead.
Prefer MCP?
Fokals is also a remote MCP server at https://mcp.fokals.com/mcp, with the same account, balance and prices. Use it from LangChain with langchain-mcp-adapters. See fokals.com/docs/connect.
Development
The tools are written from the API's own OpenAPI document, so their names, descriptions and arguments match the API:
python scripts/generate.py
Tests:
pip install -e . --group test
pytest tests/unit_tests --disable-socket --allow-unix-socket
FOKALS_API_KEY=your-key pytest tests/integration_tests # free tools only
Licence
MIT
Metadata
Release files for langchain-fokals 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_fokals-0.1.0.tar.gz | 20.3 kB | With provenance | Details for langchain_fokals-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_fokals-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_fokals-0.1.0-py3-none-any.whl |
Total release size: 37.5 kB
Release files / langchain_fokals-0.1.0.tar.gz
| Download URL | langchain_fokals-0.1.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d63b54738c53856381325dd964d162a516fe593f844aff706d09911dd2c83d1
|
|
BLAKE2b-256 checksum How to use checksums |
80e74a88e9032d29fa7192970af5dd8ec3e1e453a794f424344c6a57f70e7af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / langchain_fokals-0.1.0-py3-none-any.whl
| Download URL | langchain_fokals-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c210820d521ec03097daffaef6cd52ce29f42f74377b7d5817bd3e9870f0793
|
|
BLAKE2b-256 checksum How to use checksums |
e4ca9a134c83dfb6f44b505e015aab5baf4cb1f426a43fc7f9a53cf8e6ab3441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for langchain-fokals 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for langchain_fokals-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.