Skip to main content

llama-index-tools-alphai

LlamaIndex tool spec for AlphAI — AI-scored, ticker-linked financial news and SEC Form 4 insider events, built for AI agents and trading bots.

Every article on the AlphAI feed is enriched before you see it: per-ticker impact analysis, one of 14 categories, and a 1-10 market-relevance score. The tools here fetch and filter that feed — no scraping, no scoring of your own.

AlphaAIToolSpec exposes four tools (each with a native async twin):

  • search_news — the scored news feed with ticker / category / relevance filters
  • get_insider_news — SEC Form 4 insider events with a structured who-sold-what block
  • get_ticker_sentiment — 7-day bullish/neutral/bearish rollup for one ticker
  • get_insider_summary — 30-day insider buy/sell rollup for one ticker

Install

pip install llama-index-tools-alphai

Requires Python 3.10+.

Authentication

Create an API key at alphai.io/developers — the free tier works without a card. Export it as ALPHAI_API_KEY, or pass api_key=... to the spec.

export ALPHAI_API_KEY="ak_live_..."

Use in an agent

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.anthropic import Anthropic

from llama_index.tools.alphai import AlphaAIToolSpec

agent = FunctionAgent(
    tools=AlphaAIToolSpec().to_tool_list(),
    llm=Anthropic(model="claude-sonnet-4-5"),
)

response = await agent.run(
    "Are NVDA insiders net buying or selling this month, "
    "and does news sentiment agree with what they're doing?"
)

Use the tools directly

from llama_index.tools.alphai import AlphaAIToolSpec

spec = AlphaAIToolSpec()

docs = spec.search_news(symbol="NVDA", min_relevance=7, max_results=5)
docs[0].text  # title + summary
docs[0].metadata  # tickers, category, relevance_score, url, source, ...

events = spec.get_insider_news(symbol="NVDA", min_relevance=7)
events[0].metadata["insider"]  # side, shares, avg price, total value, 10b5-1 flag

spec.get_ticker_sentiment("NVDA")  # {"bullish": 30, "neutral": 8, "bearish": 4, ...}
spec.get_insider_summary("NVDA")  # 30-day buy/sell counts and dollar values

News documents map cleanly into RAG pipelines — text is the article title plus summary, everything else rides in metadata.

Filters

  • symbol — one ticker ("NVDA"; crypto "BTC-USD", foreign listings the Yahoo suffix "VOD.L"). Share-class siblings are included on the insider feed.
  • category — one of 14: earnings, mergers_acquisitions, regulation, macro_economy, sector_analysis, market_movers, technology, commodities, crypto, ipo, geopolitics, insider, corporate_actions, other.
  • min_relevance — 1-10 floor; 7+ keeps only high-signal articles. On the insider feed the score is deterministic from the event's dollar value, so it works as an "only large trades" dial.
  • max_results — cap on returned items (1-50).

Rate limits

Limits are per AlphAI account, two-layer (per-minute burst + per-day volume): Free 20/min · 100/day, Basic 60/min · 10,000/day, Pro 150/min · 100,000/day. The underlying alphai-sdk retries 429s with backoff automatically.

AlphAI output is AI-generated financial information for research, not investment advice — see alphai.io/terms.

Metadata

Release files for llama-index-tools-alphai 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-alphai 0.1.1
File Size Uploaded
llama_index_tools_alphai-0.1.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-alphai 0.1.1
File Interpreter ABI Platform
llama_index_tools_alphai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.5 kB

Release files / llama_index_tools_alphai-0.1.1.tar.gz

Download URL llama_index_tools_alphai-0.1.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7f50806805b874d6cb18c3e6898171c23b6a9bde3a351a422f7ceaed02950424
BLAKE2b-256 checksum
How to use checksums
1ac4837b0ea05612e03e1ef81f5bded33a979edc225dc030608f8891ef01af70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 13, 2026.

Transparency log

Release files / llama_index_tools_alphai-0.1.1-py3-none-any.whl

Download URL llama_index_tools_alphai-0.1.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8748a32c7bf179e9d223560c6ed45fa38def2d41673816fee76fabc4a323ba95
BLAKE2b-256 checksum
How to use checksums
129b33ad68c23cdf93a248cde90f6adad710820ec3c5606db9aecdc6f54abc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page