oculos AGENTS.md

oculos AGENTS.md is an instructions file for Codex, OpenCode from huseyinstif/oculos. It costs 1,678 tokens per session, scanned A, original, MIT.

A guide for controlling desktop applications through OculOS, a local interface that exposes their buttons, fields and other user-interface elements. It explains how to find windows and elements before interacting with them.

In plain words
What is it for?
Use it to list open windows, find buttons or input fields, inspect an application's interface tree, and trigger supported actions through OculOS.
Why use it?
It provides a repeatable way for an agent to discover the right application control instead of guessing. It also warns that element identifiers can change after a new search.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/huseyinstif/oculos/agents-md
Clone the repo
git clone --depth 1 https://github.com/huseyinstif/oculos

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 oculos AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/huseyinstif/oculos/agents-md.svg)](https://agentmods.dev/instructions/huseyinstif/oculos/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/huseyinstif/oculos/agents-md"><img src="https://agentmods.dev/badge/instructions/huseyinstif/oculos/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,678 This file is loaded in full into every session.
When invoked 1,678 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01678 $0.01678
Opus 5 $0.00839 $0.00839
Sonnet 5 $0.00336 $0.00336
Haiku 4.5 $0.00168 $0.00168

Measured 4d ago against content hash da1b91f3aec3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

oculos 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 4d ago.

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 · 214 lines

How it starts

The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OculOS — AI Agent Instructions

You have access to OculOS, a local REST API that lets you read and control any desktop application through its UI Automation tree.

Base URL: http://127.0.0.1:7878


Core Workflow

1. list_windows          → find the target application (get pid / hwnd)
2. find_elements / tree  → locate the elements you need (get oculos_id)
3. interact              → act on those elements

Important: oculos_id values are session-scoped. They're valid after the tree is built but may change if you call tree/find again. Always fetch the element immediately before interacting with it.


Discovery

List all windows

GET /windows

Returns: [{ pid, hwnd, title, exe_name, rect, visible }]

Search for elements (preferred — fast)

GET /windows/{pid}/find?q=Submit&type=Button&interactive=true
GET /hwnd/{hwnd}/find?q=Search&interactive=true

Parameters:

  • q — case-insensitive substring match on label or automation_id
  • type — element type filter (Button, Edit, CheckBox, ListItem, ComboBox…)
  • interactive=true — return only elements that have at least one action

Full UI tree (for exploration)

GET /windows/{pid}/tree
GET /hwnd/{hwnd}/tree

Use the HWND variant when a process has multiple windows (e.g. Teams).


Interactions

All interaction endpoints accept a JSON body where noted.

Endpoint Body When to use
POST /interact/{id}/click Buttons, links, menu items
POST /interact/{id}/set-text {"text":"…"} Input fields (replaces all text)
POST /interact/{id}/send-keys {"keys":"…"} Keyboard simulation (see below)
POST /interact/{id}/focus Move keyboard focus
POST /interact/{id}/toggle CheckBox, ToggleButton
POST /interact/{id}/expand ComboBox, TreeItem, MenuItem
POST /interact/{id}/collapse ComboBox, TreeItem, MenuItem
POST /interact/{id}/select ListItem, RadioButton, TabItem
POST /interact/{id}/set-range {"value":75} Slider, Spinner
POST /interact/{id}/scroll {"direction":"down"} Scroll containers
POST /interact/{id}/scroll-into-view Bring element into viewport

Read the full file on GitHub · 214 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. 4d ago First seen · 214 lines · 1,678 tokens per session scan A da1b91f3aec3

Subscribe to this mod's changes

oculos AGENTS.md is an instructions file published in the GitHub repository huseyinstif/oculos (130 stars, last pushed 6mo ago), licensed MIT. It adds 1,678 tokens to every session, about $0.0084 per session on Opus 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

Other instructions, from other repositories