Hermes Agent integration
Hermes Agent is an open-source autonomous AI agent from Nous Research. The Apify plugin for Hermes Agent gives your agent access to thousands of pre-built AI tools, called Actors. The plugin comes with three tools: apify_discover, apify_start, and apify_collect, which your agent can use autonomously.
For more details about Hermes Agent, refer to the official documentation.
This integration uses a third-party service. If you find outdated content, please submit an issue on GitHub.
Prerequisites
Before integrating Apify with Hermes Agent, you'll need:
- An Apify account - If you don't have one, sign up here.
- Apify API token - Get your token from the API & Integrations section in Apify Console.
- Hermes Agent - Version 0.18.1 or later. Install the CLI from the official documentation.
- Python 3.11 to 3.13 - Required to install the plugin.
Set up the Apify plugin
Install the plugin
Install the plugin from PyPI, then enable it:
pip install apify-hermes-agent-plugin
hermes plugins enable apify
Configure your API token
Run the setup command to save your Apify API token:
hermes apify-setup
This prompts for your APIFY_API_TOKEN, saves it to ~/.hermes/.env, and enables the apify toolset for the CLI. You can find your token in the API & Integrations section of Apify Console.
To skip the interactive prompt, pass the token directly:
hermes apify-setup --token apify_api_...
If the toolset isn't enabled automatically, run hermes tools and enable apify manually.
Apify tool overview
The plugin registers three tools under the apify toolset:
| Tool | Purpose |
|---|---|
apify_discover | Search Apify Store by keyword, or fetch an Actor's input schema and README by actor_id |
apify_start | Start up to 10 Actor runs in a single call and get run references back immediately |
apify_collect | Poll run statuses using the references from apify_start and retrieve completed dataset results |
Fire-and-forget batch pattern
The tools follow an asynchronous workflow built around batching. Your agent starts up to 10 Actor runs in one apify_start call and gets run references immediately, then polls apify_collect with those references until every run finishes. Re-call apify_collect with the same references until the response's all_done field is true.
apify_discover (search) -> apify_discover (schema) -> apify_start (batch) -> apify_collect (poll)
Actor ID format
Actor IDs accept either the unique ID or the username~actor-name format (for example, apify~google-search-scraper). apify_discover returns Actor IDs in this format when it fetches an Actor's schema or searches the Store.
What you can do
Once the plugin is set up, your Hermes Agent can:
- Search for Actors - Ask the agent to find an Actor to add to its AI tools. Actors can be scrapers, lead generation tools, or any other kind of tool - for example, try asking it to
find me an Actor to scrape Instagramand it discovers the right one from Apify Store. - Inspect input requirements - Fetch an Actor's input schema and README with
apify_discoverbefore starting a run, so the agent knows exactly what input to provide. - Extract data from any website - Scrapers are just one category of Actor. The agent can extract data from Google Search, Instagram, TikTok, YouTube, Google Maps, e-commerce sites, and more.
- Batch multiple targets - Start up to 10 Actor runs in a single
apify_startcall and collect all results together withapify_collect.
Actor execution time varies depending on the task complexity. apify_collect reports runs as pending until they reach a terminal status. Check Actor run status in Apify Console if a run takes longer than expected.
apify_collect wraps returned dataset items between <<<EXTERNAL_UNTRUSTED_CONTENT>>> and <<<END_EXTERNAL_UNTRUSTED_CONTENT>>> markers, since scraped data comes from external websites and Actors, not from you or Hermes Agent. Results are also capped at 50,000 characters per run, which a higher limit can't lift. If may_have_more is true in the response, re-call apify_collect with a higher limit to fetch more items.
Configuration
| Setting | Description |
|---|---|
APIFY_API_TOKEN | Your Apify API token, saved to ~/.hermes/.env by hermes apify-setup. Required for every apify tool call. |
Troubleshooting
Authentication errors
- Check your API token - Verify
APIFY_API_TOKENis set in~/.hermes/.env. Re-runhermes apify-setupto update it. - Get a new token - Find or generate one in the API & Integrations section of Apify Console.
Plugin or tool not available
-
Check plugin enablement - Re-run
hermes plugins enable apify. If it fails withPlugin 'apify' is not installed or bundled., your Hermes Agent predates version 0.18.1, when entry-point plugin discovery was fixed upstream - update withpip install --upgrade hermes-agent. If you can't upgrade, addapifyunderplugins.enabledin~/.hermes/config.yamlmanually instead:plugins:enabled:- apify -
Check toolset enablement - Run
hermes toolsand confirmapifyis enabled for the CLI.hermes apify-setupenables it automatically in most cases.
Actor run failures
- Check run logs - If an Actor run fails, check the logs in Apify Console for details.
- Verify input schema - Use
apify_discoverwithactor_idto check what input parameters the Actor expects before callingapify_start. - Check batch size -
apify_startaccepts a maximum of 10 runs per call.
Report an issue
If you encounter a bug or have a feature request, open an issue on the plugin's GitHub repository.
Resources
- Hermes Agent documentation - Official Hermes Agent docs
- Apify Actors documentation - Learn about Apify Actors
- Apify Store - Browse pre-built Actors
- Apify API reference - Full API documentation
- Apify Hermes Agent plugin on GitHub - Source code and issue tracker