Borrowing it
Nothing to install: this file belongs to hermes-webui/hermes-android. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/hermes-webui/hermes-android/main/AGENTS.mdgit clone --depth 1 https://github.com/hermes-webui/hermes-androidWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/hermes-webui/hermes-android/agents-md)<a href="https://agentmods.dev/instructions/hermes-webui/hermes-android/agents-md"><img src="https://agentmods.dev/badge/instructions/hermes-webui/hermes-android/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/hermes-webui/hermes-android/agents-md"><img src="https://agentmods.dev/badge/instructions/hermes-webui/hermes-android/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.09893 | $0.09893 |
| Opus 5.5 | $0.03957 | $0.03957 |
| Sonnet 5.5 | $0.01979 | $0.01979 |
| Haiku 4.5 | $0.00989 | $0.00989 |
Grade A, and why
hermes-android AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 378 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent instructions for Hermes-Android
This file is the shared entry point for AI assistants working in this repository. Keep it project-specific and safe to publish. Do not put private machine setup, credentials, tokens, local network secrets, or personal workflow notes here.
Read first
Before making changes, read:
README.mdROADMAP.mdARCHITECTURE.mdAGENTS.md
For implementation work, also inspect the relevant source files under
app/src/main/java/com/hermeswebui/android/.
Useful entry points:
MainActivity.kt- Android platform boundary, WebView, intents, downloads, dashboard Custom Tab launchcore/security/UrlPolicy.kt- URL and navigation decisions; also contains the top-levelUrlOriginsobject with origin/URL normalization utilities (hostFrom,hasSameOrigin,documentStartOriginRule,normalizeOriginUrl,normalizedPath) — use these helpers rather than ad-hoc URI parsingcore/security/WebTrustPolicy.kt- context-specific WebView trust decisions for configured WebUI/dashboard routes, notification bridge sources/targets, and permission origins; keep parsing and trust rules here rather than duplicating them inMainActivitydata/SettingsRepository.kt- encrypted settings persistence; implementsSettingsStoreinterface. Uses a versionedrunMigration()pattern (KEY_LAST_MIGRATION_VERSION): when adding new data schema changes, incrementcurrentMigrationVersionand add a corresponding migration block. Non-interface methods (hasRequestedNotificationPermission,markNotificationPermissionRequested,getLastLoadedUrl) are called directly byMainActivity.domain/ServerUrlValidator.kt- server URL validation rulesdomain/ShareIntentParser.kt- Android share-sheet parsingdomain/SharedFileHandoff.kt- staged share-sheet files;onShowFileChooserauto-delivers them only when the main WebView's top-level URL is the configured WebUI route. Other pages (proxy sign-in, OAuth providers) get the normal picker and must not consume or receive the staged files (Issue #136); never equate navigation consent with attachment trustui/MainViewModel.kt- app state orchestration (paired withui/MainViewModelFactory.kt)ui/web/WebShell.kt- Compose WebView host and refresh/error UXui/settings/SettingsScreen.kt+ui/settings/SettingsSections.kt- native settings surface and task-based section components (opened viahermes://app/settingsand the injected WebUI sidebar entry)ui/settings/ServerSetupHelp.kt- copy-only guided Hermes-chat setup prompts. Keepres/raw/setup_*_prompt.txtin sync with README fenced copy blocks; never execute them, add credentials, or imply clipboard tests verify host installation or phone connectivity.ui/DebugLogFloatingButton.kt- draggable overlay shown while debug logging is activeOAuthPopupFlow.kt- parses authorization requests and verifies OAuth/OIDC callbacks before allowing in-app provider navigationnotification/HermesNotificationBridgeCoordinator.kt- scoped WebUI Notification API bridge and Android permission reply handlingnotification/HermesNotificationPresenter.kt- renders Android-backed WebUI notifications and routes tapped notification intents back into the trusted WebViewbackground/HermesReconnectService.kt+background/ReconnectBackgroundPolicy.kt- foreground service (manifestforegroundServiceType="dataSync") that keeps the bounded reconnect probe and/api/session/streamsubscription alive while the activity is backgrounded; policy helpers gate when the service should run/keep-alive/cancelbackground/HermesForegroundServiceCoordinator.kt- owns MainActivity-facing reconnect/debug foreground-service lifecycle sync and promotion/teardown rulesbackground/ApprovalClient.kt+background/ApprovalActionSupport.kt+background/ReconnectSessionStreamSupport.kt- authenticated/api/approval/pending//api/approval/respondclient and SSE event support used by the notification approval actions- Background session IDs come from trusted WebUI URLs ending in
/session/{id}, including mount prefixes. UseUrlOrigins.pathSegmentsto split before decoding once; do not restore the dashboard-only/{id}assumption or parse untrusted provider URLs to enable monitoring. - Session-monitor requests must refresh when reconnect/session/cookie/privacy state changes. Fence canceled streams and stale approval completions so they cannot stop or overwrite replacement monitoring.
HermesSessionMonitorInstrumentationTestexercises the actual Android service, notification PendingIntents, and loopback HTTP/SSE on the emulator, not upstream WebUI behavior. background/HermesDebugLoggingService.kt+background/DebugLogBootstrap.kt- opt-in foreground logcat capture intofiles/debug-logs/with a persistent Stop notificationserver/HermesServerProfileCoordinator.kt- startup preflight plus server-profile add/edit/delete/switch validation and confirmation flowslauncher/LauncherIconManager.kt- PackageManager-authoritative launcher artwork selection. Keep the stableWebUiLauncher/AgentLauncheraliases and always-enabledMainActivity; toggle only aliases, preserving share/deep links and channel labels. ProfileserverTypeis a cosmetic manual override (UNSPECIFIED means Automatic);detectedServerTyperemembers explicit runtime-marker detection from the configured main-frame route. Fence asynchronous probes across navigation/server changes, clear detection on URL edits, preserve manual overrides, and never use either label as a trust signal or change launcher artwork automatically.webview/HermesWebViewConfigurator.kt- shared main/popup WebView hardening and settings setupwebview/HermesWebViewDownloadListener.kt- allowlisted DownloadManager handoff with session cookies, user agent, and AndroidX RFC-compatible filename parsing; preservefilename*, original extensions, and explicit downloads from inline image headers rather than using legacyandroid.webkit.URLUtil; on Android 10+ save to the sharedDownloadfolder (no storage permission needed) so files appear in Files > Downloads, keeping the app-specific folder only on Android 8/9 or when shared storage is unavailable (Issue #130)webui/VoiceCaptureLifecycleGate.kt- new-request WebView microphone gate and proposedhermes-app-foregroundhost signal; a pending trusted permission result can be granted while started before resumewebui/HermesWebUiScripts.kt- document-start WebUI compatibility shims (hybrid viewport polyfill with generic collapse detection, microphone fallback, Enter-key newline behavior, sidebar settings injector, notification bridge script payloads); keep these scoped to the configured Hermes WebUI originupdate/HermesAppUpdateCoordinator.kt- app-update checks, update notifications, Play update launch, and GitHub APK download intentsupdate/GitHubReleaseUpdateChecker.kt+update/AppVersionComparator.kt+update/AppUpdateCheckResult.kt- GitHub-channel update check (Play channel uses Play Core throughupdate/PlayUpdateClient.kt, implemented inapp/src/play/javawith a no-op FOSS twin inapp/src/foss/java)update/AppUpdateDownloadPolicy.kt- strict GitHub APK download host allowlist used by update download intents (github.comand*.githubusercontent.comonly)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · +21 lines · +1,028 tokens per session cf284cdcb844
- 5d ago Changed · +27 lines · +482 tokens per session 7ac00eb9e93e
- 9d ago Changed · +1 lines · +207 tokens per session 0aaf1e4bcfd7
- 12d ago Changed · +3 lines · +285 tokens per session 49cc64f15d4d
- 13d ago Changed · +2 lines · +128 tokens per session 649415f6353c
- 27d ago Changed · +5 lines · +505 tokens per session 67f67689e102
- 29d ago Changed · +2 lines · +122 tokens per session 8d21412c1324
- 1mo ago Changed · +1 lines · +60 tokens per session b7283f5c4171
- 2mo ago First seen · 316 lines · 7,076 tokens per session scan A e848ca883694
hermes-android AGENTS.md is an instructions file published in the GitHub repository hermes-webui/hermes-android (163 stars, last pushed yesterday), licensed MIT. It adds 9,893 tokens to every session, about $0.0396 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
hermes-android AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| hermes-android AGENTS.mdhermes-webui/hermes-android | Instructions file | 163 | yesterday | MIT | A | 9,893 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |