hermes-android: Instructions file for Codex

AGENTS.md

hermes-android AGENTS.md is an instructions file for Codex, OpenCode from hermes-webui/hermes-android. It costs 9,893 tokens per session, scanned A, original, MIT.

Project instructions for hermes-android, covering how an AI coding agent should work on the Android project. They include guidance for pull-request text and GitHub issue and pull-request workflows.

In plain words
What is it for?
Use them when changing hermes-android, preparing pull requests, or handling GitHub issues and pull requests.
Why use it?
They help an agent follow the project's contribution and review process consistently.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is hermes-webui/hermes-android's own configuration. It tells Codex and OpenCode how to work on hermes-android itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hermes-android configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/hermes-webui/hermes-android/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/hermes-webui/hermes-android

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for hermes-android AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hermes-webui/hermes-android/agents-md/github.svg)](https://agentmods.dev/instructions/hermes-webui/hermes-android/agents-md)
Your own site
<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.

agentmods 80×15 button for hermes-android AGENTS.md

Your own site · 80×15
<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>
Per session 9,893 This file is loaded in full into every session.
When invoked 9,893 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured today against content hash cf284cdcb844, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 378 lines

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:

  1. README.md
  2. ROADMAP.md
  3. ARCHITECTURE.md
  4. AGENTS.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 launch
  • core/security/UrlPolicy.kt - URL and navigation decisions; also contains the top-level UrlOrigins object with origin/URL normalization utilities (hostFrom, hasSameOrigin, documentStartOriginRule, normalizeOriginUrl, normalizedPath) — use these helpers rather than ad-hoc URI parsing
  • core/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 in MainActivity
  • data/SettingsRepository.kt - encrypted settings persistence; implements SettingsStore interface. Uses a versioned runMigration() pattern (KEY_LAST_MIGRATION_VERSION): when adding new data schema changes, increment currentMigrationVersion and add a corresponding migration block. Non-interface methods (hasRequestedNotificationPermission, markNotificationPermissionRequested, getLastLoadedUrl) are called directly by MainActivity.
  • domain/ServerUrlValidator.kt - server URL validation rules
  • domain/ShareIntentParser.kt - Android share-sheet parsing
  • domain/SharedFileHandoff.kt - staged share-sheet files; onShowFileChooser auto-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 trust
  • ui/MainViewModel.kt - app state orchestration (paired with ui/MainViewModelFactory.kt)
  • ui/web/WebShell.kt - Compose WebView host and refresh/error UX
  • ui/settings/SettingsScreen.kt + ui/settings/SettingsSections.kt - native settings surface and task-based section components (opened via hermes://app/settings and the injected WebUI sidebar entry)
  • ui/settings/ServerSetupHelp.kt - copy-only guided Hermes-chat setup prompts. Keep res/raw/setup_*_prompt.txt in 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 active
  • OAuthPopupFlow.kt - parses authorization requests and verifies OAuth/OIDC callbacks before allowing in-app provider navigation
  • notification/HermesNotificationBridgeCoordinator.kt - scoped WebUI Notification API bridge and Android permission reply handling
  • notification/HermesNotificationPresenter.kt - renders Android-backed WebUI notifications and routes tapped notification intents back into the trusted WebView
  • background/HermesReconnectService.kt + background/ReconnectBackgroundPolicy.kt - foreground service (manifest foregroundServiceType="dataSync") that keeps the bounded reconnect probe and /api/session/stream subscription alive while the activity is backgrounded; policy helpers gate when the service should run/keep-alive/cancel
  • background/HermesForegroundServiceCoordinator.kt - owns MainActivity-facing reconnect/debug foreground-service lifecycle sync and promotion/teardown rules
  • background/ApprovalClient.kt + background/ApprovalActionSupport.kt + background/ReconnectSessionStreamSupport.kt - authenticated /api/approval/pending//api/approval/respond client 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. Use UrlOrigins.pathSegments to 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. HermesSessionMonitorInstrumentationTest exercises 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 into files/debug-logs/ with a persistent Stop notification
  • server/HermesServerProfileCoordinator.kt - startup preflight plus server-profile add/edit/delete/switch validation and confirmation flows
  • launcher/LauncherIconManager.kt - PackageManager-authoritative launcher artwork selection. Keep the stable WebUiLauncher/AgentLauncher aliases and always-enabled MainActivity; toggle only aliases, preserving share/deep links and channel labels. Profile serverType is a cosmetic manual override (UNSPECIFIED means Automatic); detectedServerType remembers 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 setup
  • webview/HermesWebViewDownloadListener.kt - allowlisted DownloadManager handoff with session cookies, user agent, and AndroidX RFC-compatible filename parsing; preserve filename*, original extensions, and explicit downloads from inline image headers rather than using legacy android.webkit.URLUtil; on Android 10+ save to the shared Download folder (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 proposed hermes-app-foreground host signal; a pending trusted permission result can be granted while started before resume
  • webui/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 origin
  • update/HermesAppUpdateCoordinator.kt - app-update checks, update notifications, Play update launch, and GitHub APK download intents
  • update/GitHubReleaseUpdateChecker.kt + update/AppVersionComparator.kt + update/AppUpdateCheckResult.kt - GitHub-channel update check (Play channel uses Play Core through update/PlayUpdateClient.kt, implemented in app/src/play/java with a no-op FOSS twin in app/src/foss/java)
  • update/AppUpdateDownloadPolicy.kt - strict GitHub APK download host allowlist used by update download intents (github.com and *.githubusercontent.com only)

Read the full file on GitHub · 378 lines

Changes

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.

  1. today Changed · +21 lines · +1,028 tokens per session cf284cdcb844
  2. 5d ago Changed · +27 lines · +482 tokens per session 7ac00eb9e93e
  3. 9d ago Changed · +1 lines · +207 tokens per session 0aaf1e4bcfd7
  4. 12d ago Changed · +3 lines · +285 tokens per session 49cc64f15d4d
  5. 13d ago Changed · +2 lines · +128 tokens per session 649415f6353c
  6. 27d ago Changed · +5 lines · +505 tokens per session 67f67689e102
  7. 29d ago Changed · +2 lines · +122 tokens per session 8d21412c1324
  8. 1mo ago Changed · +1 lines · +60 tokens per session b7283f5c4171
  9. 2mo ago First seen · 316 lines · 7,076 tokens per session scan A e848ca883694

Subscribe to this mod's changes

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.

Related

hermes-android AGENTS.md compared with instructions from other repositories

hermes-android AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hermes-android AGENTS.mdhermes-webui/hermes-androidInstructions file163yesterdayMITA9,893Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot