Skip to content
fn2aiPublic

About

Ask FN2 AI anything about public markets from Claude Code, Codex, or Pi, then put the good questions on a schedule. Dependency-free Python skill.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

FN2 AI skill: start, watch, and schedule FN2 AI research agents right from Claude Code, Codex, or Pi

CI version license python dependencies harnesses

Ask FN2 AI anything about public markets, then put the good questions on a schedule. From your terminal.

Get started · Direct research · Research cookbook · Run it yourself · In use · Commands · Scheduling · Security


Get started

Skills CLI

From your project directory, install the fn2 skill with the open Skills CLI:

npx skills add fn2ai/fn2-skill --skill fn2

Choose your assistant when prompted. For a project-local Codex installation with anonymous install telemetry disabled:

DISABLE_TELEMETRY=1 npx skills add fn2ai/fn2-skill --skill fn2 --agent codex

This copies the skill into .agents/skills/fn2; it does not add a command to your shell's PATH. Node.js/npm runs the installer; the installed FN2 helper requires Python 3.9+ and has no Python package dependencies. You can inspect the package before installing with --list, or read skills/fn2/SKILL.md and the bundled scripts here.

Then ask your assistant to connect my FN2 account. Approve the displayed device code at fn2.ai/start, then try: "What did IBM say about revenue growth in its latest earnings call?" An FN2 account and available plan quota are required to run research. The skill is MIT-licensed; the hosted FN2 service has a free tier and paid plans. Installation alone does not create an account or start a paid subscription.

Plugin marketplaces

Use this route if you prefer your assistant's plugin marketplace. Choose one installation method for each assistant to avoid duplicate skill entries.

Claude CodeCodex
claude plugin marketplace add fn2ai/fn2-skill
claude plugin install fn2@fn2
codex plugin marketplace add fn2ai/fn2-skill
codex plugin add fn2@fn2

FN2 AI runs autonomous research agents on public markets: earnings-call transcripts, prices and volume, SEC filings, FRED macro series, prediction markets, and the news around them. This skill hands that to your assistant, so Claude Code, OpenAI Codex, or Pi can read FN2's data directly for a factual question, or launch an agent for the deeper ones, read what it found, and put it on a cadence.

Things worth asking:

  • The latest earnings. "Summarize Netflix's most recent earnings report and call." Reported EPS and revenue against analyst consensus, the quarter and report date, and what management said, read straight from FN2's data in seconds.
  • Earnings calls. "What did NVIDIA say about data-center demand on the last call?" Answered with the executives' own words.
  • Price action. "How is NVDA trading today, and what moved it?"
  • Standing watches. "Notify me when AAPL drops more than 5% in a day."
  • The daily brief. "Brief me on my watchlist every weekday before the open."
  • Macro and filings. "Where is the yield curve now versus a year ago?" · "What changed in TSLA's latest 10-Q?"
  • What the market is pricing. "What odds are prediction markets giving a Fed cut this year?"

It is one dependency-free Python 3 file tree: no pip install, no build step, standard library only.

Claude Code answering 'what did NVIDIA say about data-center demand on the last earnings call?' by running a one-off FN2 AI agent and reading the quoted result

Ask in natural language. The skill does the API work.

Install details

The installer options are under Get started. Pi, or local development in any harness: clone the repository and link the canonical skill directory.

git clone https://github.com/fn2ai/fn2-skill ~/.fn2-skill
make -C ~/.fn2-skill install-pi

make install-pi uses ~/.pi/agent/skills/fn2, or the skills/fn2 directory under PI_CODING_AGENT_DIR when set. Reload Pi after installation with /reload. make install from a checkout links the canonical skill into Claude, Codex, and Pi at once.

A plugin installs a skill, not a binary, so nothing lands on your PATH. Usually that is fine: you talk to your assistant, not to a shell command. If you want fn2 in your own terminal too, run this once (or just ask your assistant to "put fn2 on my PATH"):

python3 "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/fn2/fn2/*/skills/fn2/scripts/fn2 link

That writes a small launcher into the first writable bin directory on your PATH and tells you if there isn't one. The launcher re-resolves the skill on every run, so plugin updates do not strand it. fn2 unlink removes it.

Once linked, fn2 auth login is the same browser device flow as asking your assistant to connect: code in the terminal, approval at fn2.ai/start, credential in the Keychain.

fn2 auth login prints a short code, opens fn2.ai/start, and stores a scoped device credential in the macOS Keychain

Running it yourself

Every screenshot in this README is a command you can run once fn2 link has put the launcher on your PATH. A few things make it quick to live in:

fn2 agents                       # ids print 8 characters wide...
fn2 status ebab1623              # ...and 8 characters is enough to refer back
fn2 status "market open"         # so is a name
fn2 result ebab1623              # newest run, no run id to copy
fn2 start "..." --wait           # ask and get the answer in one command
fn2 run ebab1623 --wait          # trigger and block until it finishes

Ambiguous references are refused with the candidates listed, never guessed. --wait uses the API's own long-poll rather than hammering it, and takes --timeout (default 300s); Ctrl-C is always safe.

Output is colourised when it is going to a terminal and plain everywhere else. --color never and NO_COLOR both turn it off; --json is never colourised. On a console that cannot encode ✓, the glyphs fall back to ASCII instead of raising UnicodeEncodeError.

Research without an agent

A factual question about one company or one data series does not need an agent run. Eight read-only commands fetch FN2's data directly, one request each:

fn2 earnings NFLX                  # reported quarters vs analyst consensus, report dates, the next report
fn2 calls NFLX                     # the earnings calls FN2 holds text for
fn2 transcript NFLX                # read the most recent call, in speaker order, a page at a time
fn2 search "ad tier" --symbol NFLX # what executives said, across calls or inside one (--call ID)
fn2 financials NFLX --quarterly    # revenue, margins, cash flow, debt from SEC filings
fn2 price NFLX --range 1M          # quote, plus price history
fn2 fred DGS10                     # a FRED macro series (fred alone lists them)
fn2 recall "holdings"              # notes your FN2 agents saved on your account

Your assistant chains them: earnings names the quarter, the report date and that call's transcript id; transcript reads the call; financials supplies the filed margins. The output is built to be quoted accurately: exact figures, ISO dates, an explicit "not available" wherever FN2 has no data, and consensus labelled as analyst consensus rather than company guidance. Company guidance itself comes from the call text, when management gave it.

These commands use the research scope and a weekly request allowance that is separate from your token quota (fn2 whoami shows both). If you connected before 0.8.0, run fn2 auth login once more to add the scope; your agents and schedules are untouched. Details: skills/fn2/references/research.md.

Research cookbook

Three reproducible workflows ship with the skill:

Workflow What it helps you check
Earnings comparison Two fiscal periods, source-linked changes, guidance and cash-flow comparability
GAAP reconciliation Issuer adjustments, tax/share basis, arithmetic residuals and missing disclosures
Scheduled watchlist Dated evidence before market open, with an explicit pilot end date

The cookbook previews each complete prompt locally without credentials or network access. Add --execute after review to create an agent through the existing CLI. It includes source-review rules, result retrieval, schedule inspection, and pause commands. Offline contract tests cover all three workflows; no sample financial results are presented as live research.

In use

Standing watches, in one sentence.

Claude Code turning 'notify me when AAPL drops more than 5% in a day' into an agent that runs after every close and emails the verdict

fn2 agents, the whole fleet

Every agent, its cadence, and when it last ran.

fn2 agents lists five agents with status, schedule, last run, and run count

fn2 status <id>, one agent in full

Cadence, model, the prompt it runs, and its recent runs.

fn2 status shows an agent's schedule, prompt, and its five most recent runs

fn2 result <id> <run>, read the research

The finished briefing, in the terminal, with token accounting.

fn2 result prints a completed market-sentiment briefing with index, sector, macro, and prediction-market sections

fn2 start --when, cadences in words

"market close", "weekdays at 7am", "before market open".

fn2 start with different --when phrases, each echoing the cadence it resolved to

fn2 whoami and fn2 models

Plan, quota, device scopes, and the models you can run on.

fn2 whoami shows plan, token quota and device scopes; fn2 models lists the available models

fn2 permissions and fn2 doctor

What the credential cannot do, and a one-command health check.

fn2 permissions lists granted scopes and what the credential cannot do; fn2 doctor reports seven passing checks

Every screenshot is generated by running the real CLI. See tools/screenshots.

Commands

Any command that takes an agent takes an id, an id prefix, or a name.

Command Does
link / unlink put an fn2 launcher on your PATH, or take it off
auth login [--no-browser] [--no-wait] connect via the browser device flow (code at fn2.ai/start); --no-wait prints the code and returns, a later auth login finishes
auth status storage backend, masked credential, scopes, expiry, live check
auth logout [--revoke] disconnect (optionally revoke the credential on FN2 AI first)
permissions what the credential can and cannot do
doctor diagnose config, storage, and connectivity
login --token / whoami manual API-key fallback / show plan + quota
models list models available to your account
earnings <symbol> reported quarters vs analyst consensus, report dates, the next report
calls <symbol> / transcript <symbol> [--id …] list the earnings calls held / read one, a page at a time
search "<query>" [--symbol …] [--call …] search earnings-call text for what executives said
financials <symbol> [--quarterly] income, margin, cash-flow and debt figures from SEC filings (annual by default)
price <symbol> [--range 1M] current quote, plus price history
fred [<series>] / recall [<query>] a FRED macro series / notes your agents saved
start "<prompt>" [--when …] [--wait] create an agent: runs now, or on a schedule
agents (ls) list your agents
status [<id>] overview, or one agent's detail + recent runs
run <id> [--wait] trigger an agent immediately
runs <id> / result <id> [run_id] run history / one run's output (default: newest)
pause / resume / schedule <id> "<cadence>" manage the cadence
delete <id> remove an agent and its history

Every command accepts --json for scripting. Run results are available via fn2 result and in the FN2 AI web app; add --email at creation to have each completed run delivered to your verified address.

Scheduling in everyday words

--when accepts ordinary phrasing:

before market open      every weekday 09:00 ET (30 min before the bell)
market close            every weekday 16:05 ET
weekdays at 8:30am      cron under the hood, your timezone
daily / hourly          named cadences
before next market open a single run at the next open
in 2 hours / tomorrow at 9am / 2026-07-22T13:00    one-off runs
cron:0 9 * * 1-5        raw cron for full control

Market phrases default to America/New_York and resolve against the exchange calendar server side, so they skip holidays and respect half-days. See skills/fn2/references/scheduling.md.

Security and configuration

The credential is resolved in this order, first hit wins:

  1. FN2_API_TOKEN environment variable (canonical headless override; accepts fn2d_… device tokens and fn2_… API keys)
  2. FN2_API_KEY environment variable (legacy alias)
  3. macOS Keychain (service fn2-skill; used automatically on macOS)
  4. ~/.config/fn2/credentials.json (written 0600, directory 0700)

There is no .env support, so a working-directory file can never inject a credential. Other knobs: FN2_BASE_URL (default https://fn2.ai), FN2_CONFIG_HOME.

Hard safety rails:

  • Origin pinning. The API base must be https:// on fn2.ai or *.fn2.ai; the credential is never sent anywhere else (FN2_ALLOW_DEV_BASE=1 exists for local development only and warns loudly).
  • Redaction. The credential appears only as a masked fn2d_…wxyz form in all output, including --json and error text.
  • Scopes. The device credential carries agents, models, and research (read-only: market data and the notes your own agents saved), and nothing else: no billing, no chat, no web session. fn2 permissions lists them.
  • Revocation. Revoke any connected device in the FN2 AI web app under Preferences → Developer → Connected Devices (or fn2 auth logout --revoke); it takes effect within a few minutes everywhere.

Found a security issue? See SECURITY.md.

How it works

skills/fn2/scripts/fn2            → entry point (adds scripts/ to sys.path, calls the CLI)
skills/fn2/scripts/fn2cli/
  config.py            → credential + endpoint resolution, origin pinning, redaction
  storage.py           → macOS Keychain / owner-only file + pending-login state
  deviceauth.py        → the fn2.ai/start device-authorization flow
  client.py            → urllib HTTP layer + typed errors
  api.py               → one function per FN2 AI endpoint
  schedule.py          → "before market open" into an FN2 AI schedule object
  render.py            → human / JSON output
  style.py             → ANSI colour + glyph fallback, off unless stdout is a terminal
  cli.py               → argument parsing + dispatch

It talks only to the documented public API (/api/v1/agents, /runs, /research/*, /usage, /models, /skill/device-auth/*) with your scoped credential. No admin access, no scraping. See skills/fn2/references/api.md.

Development

make test        # unittest, no network
make lint        # byte-compile every module
make validate    # strict Claude plugin validation (when Claude Code is installed)
make install     # link the canonical skill into Claude, Codex, and Pi
make media       # regenerate docs/media (needs Chromium + ImageMagick)

Contributions welcome. Start with CONTRIBUTING.md.

License

MIT, see LICENSE. Bundled documentation fonts (JetBrains Mono, Libre Franklin) are SIL OFL 1.1; see tools/screenshots/fonts.

About

Ask FN2 AI anything about public markets from Claude Code, Codex, or Pi, then put the good questions on a schedule. Dependency-free Python skill.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages