All plugins

openalex

Scholarly search, citation traversal, grouped counts, and fulltext access through OpenAlex with session spending limits.

Adolanium3ToolsUpdated 1 month ago

hermes-plugin-openalex

OpenAlex tools for Hermes Agent. Look up works, authors, sources, and institutions. A session budget refuses a call before it is sent.

No API key required. Anonymous traffic gets $0.10/day. A free key gets $1.00/day. Identifier lookups and name resolution are $0 and still work when the daily budget is gone. The snapshot stays free. You pay OpenAlex only after the daily allowance, if you buy prepaid usage or a plan.

hermes plugins install Adolanium/hermes-plugin-openalex --enable
hermes plugins remove openalex

Install clones the plugin, optionally prompts for OPENALEX_API_KEY, writes it to ~/.hermes/.env, and enables it. Restart the gateway if one is running. Hermes registers the tools on every frontend that shares the tool registry (desktop, CLI, TUI, gateway, ACP, cron).


Demo

Search, get of metadata, then a fulltext probe that does not download. Hermes CLI.

hermes openalex demo

mp4


Try it

Key optional. Free calls work without one.

hermes openalex search "machine learning neuroimaging scikit-learn" --limit 5
hermes openalex get 10.3389/fninf.2014.00014
hermes openalex fulltext 10.3389/fninf.2014.00014
# $0.01, downloads text:
# hermes openalex fulltext 10.3389/fninf.2014.00014 --confirm
hermes openalex doctor

Captured once. Index counts move.

CallWhat came backCost
search … --limit 516 matches, 5 shown, top hit 2,675 cites$0.001
get 10.3389/fninf.2014.00014metadata (title, year, venue, OA, authors)$0
fulltext without --confirmavailable true, formats grobid_xml + pdf$0
fulltext --confirmdownloads text$0.01
$ hermes openalex search "machine learning neuroimaging scikit-learn" --limit 5
16 matches, showing 5
  year    cites    title
  2014    2,675    Machine learning for neuroimaging with scikit-learn
  ...
this call $0.0010 (search)
$ hermes openalex fulltext 10.3389/fninf.2014.00014
┌───────────────────── fulltext ──────────────────────┐
│ Machine learning for neuroimaging with scikit-learn │
│ W2151591509                                         │
└─────────────────────────────────────────────────────┘
  available   true
  formats     grobid_xml, pdf
  download    $0.0100 only with --confirm

  Nothing was downloaded and nothing was spent.
this call $0.0000 (singleton)

get is a catalog record, not the PDF. fulltext without --confirm only asks whether OpenAlex holds the text. --confirm is the download.

Fulltext downloads accept only https://content.openalex.org and do not follow redirects. Downloads stop at 8 MiB, and gzip expansion stops at 32 MiB. Tool responses stay within max_result_chars, including truncation notices. A shortened response is incomplete; narrow the query or request fewer fields when needed.


OpenAlex prices (February 2026)

The API is usage-priced in dollars by call shape. OpenAlex announcement. Data snapshot remains free.

CallPriceCalls in a $0.10 anonymous day
Fetch by id, prefixed form$0unlimited
Autocomplete$0unlimited
List, filter, or group_by$0.00011,000
Search$0.001100
Text classification or fulltext download$0.0110

A query with group_by is billed as a list call even when a search term is present. That is OpenAlex's price table, not a plugin discount. count returns totals and groups. search returns records. They are different responses.

OpenAlex bills $0.0001 on a rejected 400. The plugin predicts cost from the call shape and refuses locally when the session budget would be exceeded, so that refusal is not sent and is not billed. A 400 that does go out is still billed.

Each request reserves its predicted cost before sending, so concurrent calls share the same remaining session budget. Every retry is checked separately. Response headers settle the charge; when a connection fails without a reported cost, the local ledger keeps the estimate because billing is unknown. A server charge above the estimate can still exceed the local limit.

OpenAlex returns 429 for both a short throttle and a spent daily budget. During a throttle, X-RateLimit-Remaining can be 0 while budget remains. Retry-After is the field that distinguishes them: about a second versus tens of thousands (until midnight UTC). The plugin retries the first and does not retry the second.

Captured at zero daily balance:

error_kind: budget_exhausted
http      : 429
details   : {"retry_after_seconds": 42549.0, "cost_required_usd": 0.0001}
next_step : The OpenAlex daily budget is spent and refills at midnight UTC.
            Do not retry this call. ID lookups (openalex_get) and name
            resolution (openalex_resolve) are free and still work...

In that state, openalex_get, openalex_resolve, and openalex_fields still returned data.


What get returns

openalex_get fetches metadata. Default verbosity is summary: id, title, year, venue, citation count, OA status, topic, and up to ten authors plus author_count. It does not include the abstract (detail does). It does not download the paper.

select only accepts top-level fields, so it cannot trim inside authorships. The plugin caps the author list after the response arrives. concepts is dropped (deprecated, replaced by topics). Abstracts arrive as an inverted index. The plugin reconstructs the sentence when reconstruct_abstracts is on.

Measured 2026-08-13 on doi:10.7717/peerj.4375 (W2741809807):

OpenAlex response body     31,468 characters
plugin summary record       1,855 characters
plugin detail record        (abstract + topics + keywords added)

An earlier capture of the same work was 33,475 / 1,921. The index moves.

A separate collaboration work was measured at 2.88 MB raw, 93% one author list.


Tools

One openalex toolset, free tools first.

core (default)

ToolReturnsPrice
openalex_resolveName to id, plus the filter key for the next call$0
openalex_getMetadata by OpenAlex id, DOI, ORCID, ROR, ISSN, or PMID. Up to 20 ids$0
openalex_fulltextAvailability, or text if confirm is set$0 probe / $0.01 download
openalex_fieldsValid filter and select names, from disk$0
openalex_accountDaily budget and session ledger$0
openalex_countTotal, optional group_by breakdown$0.0001
openalex_relatedcited_by, references, or related works$0.0001
openalex_searchRecord list (per_page default 25, max 200)$0.001

full (hermes openalex profile full)

ToolReturns
openalex_harvestCursor pages up to max_records. Cost is estimated first and the call is refused if the session budget cannot cover it
openalex_classifyTopics for arbitrary text. $0.01. Off until allow_text_classification: true

openalex_classify is hidden by default. Ten calls spend a $0.10 anonymous day. If the work is already in OpenAlex, get already has topics.


Examples

Captured output.

Resolve

$ hermes openalex resolve "bengio" --entity authors
'bengio'  (free)
  id            name              type    works   hint
  A5086198262   Yoshua Bengio     author  1,290   Mila / Université de Montréal
  A5017529415   Samy Bengio       author  391

Filter on the id for an exact author. A name search also matches acknowledgements and reference strings.

Count

$ hermes openalex count --search "graph neural network" --group-by publication_year
887,992 works
publication_year
  value      count
  2025     134,581
  2024     134,292
  2023     129,716
  ...
this call $0.0001 (list)   session $0.0001 of $0.0500

That capture used OpenAlex's default (full-text) search. A later title_and_abstract run of the same string returned 101,610 works. count is $0.0001. search of the same string is $0.001 and returns a page of records (per_page, default 25).

get payload (summary)

{
  "ok": true,
  "record": {
    "id": "W2741809807",
    "doi": "10.7717/peerj.4375",
    "title": "The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles",
    "year": 2018,
    "type": "article",
    "cited_by_count": 1241,
    "authors": [
      {"name": "Heather Piwowar", "id": "A5048491430", "institutions": ["Impactstory"]}
    ],
    "author_count": 9,
    "venue": "PeerJ",
    "open_access": "gold",
    "topic": "Scholarly Communication"
  },
  "cost": {"this_call_usd": 0.0, "price_class": "singleton", "spent_usd": 0.0}
}

The snippet above is shortened for the README. Live summary size for this work is in the table earlier.

Spent daily budget

{
  "ok": false,
  "error": "Insufficient budget. This request costs $0.0001 but you only have $0.0000 remaining.",
  "error_kind": "budget_exhausted",
  "http_status": 429,
  "details": {"retry_after_seconds": 42549.0, "cost_required_usd": 0.0001},
  "next_step": "The OpenAlex daily budget is spent and refills at midnight UTC. Do not retry this call. ID lookups (openalex_get) and name resolution (openalex_resolve) are free and still work at zero budget, so use those. A free API key raises the daily budget from $0.10 to $1.00."
}

Configuration

Under plugins.entries.openalex. Defaults work.

plugins:
  enabled: [openalex]
  entries:
    openalex:
      profile: core            # core | full
      verbosity: summary       # summary | detail | raw
      max_result_chars: 24000
      rate_limit_per_second: 8 # API ceiling is 10/s
      timeout_seconds: 30
      retries: 2
      reconstruct_abstracts: true

      cache:
        enabled: true
        ttl_seconds: 3600
        max_entries: 512

      budget:
        usd_per_session: 0.05          # 500 list/count calls, or 50 searches
        allow_text_classification: false

      tools:
        enabled: []
        disabled: []

OPENALEX_API_KEY is sent as a Bearer header. The documented query-parameter form is the fallback.


Terminal

hermes openalex doctor
hermes openalex prices
hermes openalex budget
hermes openalex resolve "eth zurich" --entity institutions
hermes openalex get 10.7717/peerj.4375
hermes openalex fulltext 10.3389/fninf.2014.00014
hermes openalex fulltext 10.3389/fninf.2014.00014 --confirm
hermes openalex count --filter 'is_oa:true,publication_year:2024' --group-by 'open_access.oa_status'
hermes openalex search "protein folding" --limit 10
hermes openalex profile full
hermes openalex cache stats

doctor checks the plugin is enabled, makes one free request so a missing key and a dead network stay distinguishable, prints the live budget and reset time, and refreshes prices from the account headers.


In conversation

/openalex W2741809807         fetch a work by id           $0
/openalex 10.7717/peerj.4375  fetch by DOI                 $0
/openalex bengio              resolve a name to an id      $0
/openalex budget              session spend and balance    $0

Slash only runs those free paths. Count and search go through the agent tools.


Skills

  • openalex:query-syntax — filters, grouping cap, identifier forms, prices. A rejected filter is still billed.
  • openalex:lit-review — order of calls (anchor, size, shape, traverse, retrieve), plus citation-age bias, author merge errors, and coverage gaps.

Development

git clone https://github.com/Adolanium/hermes-plugin-openalex
cd hermes-plugin-openalex
pytest tests

104 tests. None call the API. Use pytest tests, not bare pytest: Hermes needs __init__.py at the plugin root, so pytest would otherwise import that file as a package. tests/pytest.ini pins rootdir.

tests/conftest.py loads the plugin the way hermes_cli/plugins.py does (hermes_plugins.openalex with a synthetic parent).

No extra pip dependencies. httpx, rich, and pyyaml already ship with Hermes.

The HTTP client is a thin httpx layer so X-RateLimit-* headers stay available. pyalex drops the response object after parse, and retries every 429, including a spent daily budget.


Known limits

Semantic search currently returns HTTP 500, so it is not exposed. The n-grams endpoint was removed and now returns the plain work object with no error. Above a few hundred thousand records the free snapshot at s3://openalex is cheaper and faster than paging the API.

License

MIT. See LICENSE.

README from the reviewed commit d38a1ee; it updates when the author re-pins.

More by Adolanium

30 plugins by Adolanium in the catalog.

AdolaniumgadgetTalk to your Hermes from small ESP32 devices with a screen, microphone and speaker: hold a button, ask, and hear the answer. Adds a gateway platform where each device is a chat, plus tools to list devices, show a card on a screen and run device actions (LEDs, relays). Disclosure — the gateway listens for devices on a WebSocket port (8765, all interfaces by default; plain ws:// unless tls_cert/tls_key are set). New devices need a Hermes pairing code unless listed in GADGET_ALLOWED_USERS; GADGET_ALLOW_ALL_USERS skips pairing (development only). A paired device answers the agent's command approvals for its own chat (allow once or deny), within Hermes's approval timeout. The first approved device becomes the platform's home channel by default. Session hooks feed a dashboard on paired devices with each agent session's platform, a short id and its state (idle, busy, waiting for approval); a device that can switch profiles also sees the offered profiles' sessions. Optional profile switching (off unless profiles is set in the default profile's gadget config) lets a device paired on the default profile talk to the listed profiles; each profile approves the device through its own pairing flow (the device shows the hermes -p <profile> pairing approve command), the plugin writes nothing into other profiles, and revoking the device in the default profile sends it back there. A paired gadget that draws faces gets the answering profile's face: its gadget-face.bin, or its Hermes avatar (assets/avatar.*) converted with Pillow when installed; the plugin only reads these files, and profile_faces: false turns this off. platforms.gadget.extra.stt_language sets the transcription language of gadget recordings through the pre_transcription hook; other platforms' audio is untouched. Spoken replies that are not WAV are converted with the local ffmpeg; Opus reply audio uses the host's libopus when installed (loaded with ctypes, not bundled). hermes gadget update --latest downloads firmware from this repository's GitHub releases, checks size and SHA-256 against the release manifest (files carry build provenance attestations) and sends it to the device. A device that advertises camera.capture returns stills that are saved as PNGs under ~/.hermes/gadgetpix/ and kept until removed by hand. A Hermes Desktop page (desktop/plugin.js, plugin SDK only) runs a gadget in the window that connects to the local gateway as a device of its own: its device key, and the gateway access token when one is required, are kept in the page's plugin storage, it pairs like any device, and it uses the microphone only while its talk button or Space is held. The plugin's dashboard routes, behind the dashboard's login, can approve the pairing code a device is showing and send a card or run an advertised action on a connected, paired device; the requests pass through files under plugin-data/gadget/desk/. Otherwise writes only under plugin-data/gadget/. Uses Hermes's own STT, TTS and image cache; no telemetry. Independent community project, not affiliated with Nous Research.Communityplatform545Adolaniumhermes-resetwatchTrack subscription quotas and reset times in Hermes Desktop. Disclosure — probe.py re-executes itself under the Hermes Python interpreter located via HERMES_PYTHON / VIRTUAL_ENV / the parent process or the Hermes installer's managed venv (HERMES_HOME/installs). Every credential read is read-only and nothing is refreshed or stored: it reads provider API keys from the process environment, the Hermes .env (through Hermes's get_secret helper, else read directly), the Vaultwarden plugin's local secret cache (cache/vaultwarden_cache.json, only when Vaultwarden is the sole enabled secret source, keyed by a hash of BW_SESSION, which is never sent) and Docker s6 container env files; Hermes's saved OAuth logins (the credential pool through Hermes's read_credential_pool helper, else auth.json directly, and HERMES_HOME/.anthropic_oauth.json); and other coding-assistant CLIs' local logins: Claude Code (credentials file, macOS keychain or Windows Credential Manager), Codex, Cursor (macOS keychain and the IDE's state.vscdb, opened read-only), Kimi, Grok, ZCode and Command Code. For GitHub Copilot (on by default) it tries COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN (through Hermes get_secret, else the process environment), then the Copilot editor's apps.json / hosts.json, then runs gh auth token (prompts disabled, 3-second limit), trying each token in turn until GitHub accepts one. For Codex, a 401 or 403 is retried once with another saved login for the same account. It sends each key only to its own vendor's usage endpoint, presenting the vendor client's identity headers where a private endpoint expects them (Claude Code and Codex CLI user agents, the Grok CLI client headers, and for Copilot the VS Code / Copilot Chat editor headers on api.github.com/copilot_internal/user, which GitHub does not document); environment variables such as GROK_CLI_CHAT_PROXY_BASE_URL (honored only for https grok.com / x.ai hosts), CLAUDE_CONFIG_DIR, CODEX_HOME and GROK_HOME change which host or file it uses. Usage results are cached under HERMES_HOME/cache/resetwatch, never tokens. It exposes nothing to the model: it is a Desktop page only.CommunityDesktop app84AdolaniumwhiteboardAn agentic whiteboard. Say what you're planning and Hermes lays it out as a route, columns or a map, with hand-drawn stickers. Add rough notes and Hermes proposes groups, owners and action items that you accept one by one and can take back. Hand an action item to Hermes and an agent does it on the board and delivers the result next to the note with its sources, or run the whole route and get a brief at the end. Select anything and ask about it. Once you allow it, any chat can read your boards and propose changes. Link a board to the chat its work is in: the board shows what that chat is doing, and the chat hears what you change on the board. Send notes to Hermes Kanban or lay a Kanban board out as a whiteboard. Disclosure — laying out a board, grouping notes, unpacking a result and the brief each start a hidden Hermes session told to use no tools; Hand to Hermes, Run the route and Ask start hidden sessions that use your Hermes tools and read third-party web pages, at most three at once, each stopped after 4 minutes or 24 tool calls; approval prompts inside these sessions are denied; export writes the one Markdown or CSV file you name in the system dialog, through the plugin's own backend; boards live in Desktop plugin storage, with a copy under plugin-data/whiteboard/ only after you turn on chat access, which starts off, and each Hermes profile that has the plugin keeps its own copy; a Planning model and an Agent model in Settings name a model you are signed in to in Hermes when a session is created, and a refused model stops the run; with the Sheets or Data plugin installed, a click on that page pins notes to the open board through a window event, with no file, backend or model involved; Send to Kanban and New board from Kanban make the plugin's backend run the hermes kanban command, with no shell and with note text passed after -- and on standard input, to list boards, create cards and read a board; cards are created in Blocked with no assignee, and in Triage, which Hermes works through on its own, only when you tick a box; while the page is open on a board that has Kanban cards it reads those Kanban boards about every 25 seconds, and it never changes a card after making it; a board can remember the id of the chat it is linked to, the page places a request in that chat's message box for you to send and never sends it, and after that it listens to that one chat for up to 30 minutes and reads its answer from the transcript; the plugin registers four hooks (pre_llm_call, post_llm_call, on_session_end, post_compaction) that run on every chat turn and return at once unless the chat is linked to a board; for a linked chat they keep the state of its latest turn and the first line of its answer under plugin-data/whiteboard/, and, only while chat access is on, add to the message you send in that chat a short notice that the board exists and the notes you added, edited or removed on it since the chat's last turn; the plugin never sends a message to a chat; the linked chat can put a doing, done or blocked mark on its own board's notes with no review, which changes nothing else and clears with a click; which chat each board is linked to is kept under plugin-data/whiteboard/ as ids only, whether or not chat access is on; no telemetry, no credentials, no background processes of its own, and no command other than hermes kanban. Independent community project, not affiliated with Nous Research.CommunityDesktop app84Adolaniumhermes-rssRead RSS and Atom feeds and discuss articles in Hermes Desktop. Disclosure — feeds and full articles are fetched with curl through the gateway's shell.exec on the connected Hermes host (public-IPv4 SSRF guard); opt-in AI grading sends article excerpts to your configured model and creates HERMES_HOME/skills/rss-importance-grading/SKILL.md if missing; opt-in image loading fetches publisher images directly from Desktop.CommunityDesktop app65

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section