Skip to content

Repository files navigation

AgentIME

AgentIME is an instruction input method for AI agents. Instead of typing a long prompt, a user chooses small directive atoms from stage-based candidates. A deterministic compiler then orders, deduplicates, checks, and renders those atoms as a ready-to-insert instruction.

This repository contains the data foundation and a runnable macOS prototype. The Mac app is a menu-bar accessory with an Option-Tab floating composer. It stays local, compiles the checked-in directive pack deterministically, and always places the result on the clipboard before optionally pasting into the previous editable field.

Interface

English composition Simplified Chinese composition
AgentIME English composer with selected directives AgentIME Chinese composer with selected directives
Directive editor Recipe editor
Editing every bilingual directive field and strength Reassembling a built-in recipe

Current scope

  • six task stages used for navigation;
  • 42 general-purpose directive atoms;
  • three explicit strengths per atom: light, standard, and strong;
  • a local recommendation graph with four ordinal editor-priority tiers;
  • 11 deterministic recipes, including Goal Loop, Pólya problem solving, and Cartesian decomposition, plus conflict metadata;
  • complete English and Simplified Chinese source locales with generated runtime packs;
  • schema validation and a reference prompt compiler;
  • a native Swift DirectiveCore package with parity and adversarial tests;
  • a compact SwiftUI tree menu with stage browsing, persistent checkmarks, recipes, favorites, conflict resolution, on-demand preview, and safe clipboard output;
  • a full Settings library editor for all built-in and user-created directives: bilingual labels and text, stage, compile slot, and all three strength variants;
  • a recipe editor that can reassemble every built-in recipe, add custom recipes, reorder items, and set per-item strength and target values;
  • per-item restore controls for built-in directives and recipes, plus one confirmed action that restores the whole library to its bundled defaults;
  • a local personal library with favorite directives and crash-safe draft restoration across launches;
  • inclusive stage and guardrail lists where selected directives stay visible and can be unchecked in place;
  • inline strength and target controls, with Space to finish;
  • persistent English/Simplified Chinese switching from Settings or the composer;
  • optional Accessibility-enabled automatic paste with clipboard-only fallback.

The stored model is flat. The menu projects it as category -> directive -> optional strength or target. Check state is keyed by stable directive ID, so the same atom can appear in several useful categories without being duplicated or losing synchronization.

Customization is not a separate category in the composer. Settings treats the bundled directive packs as immutable defaults, stores edits as local overrides, and rebuilds the effective English and Simplified Chinese packs after each save. A user-created directive appears under its assigned task stage alongside built-in directives; a user-created recipe appears with the other recipes.

This editor covers all user-facing directive text and recipe assembly. The curated recommendation graph, conflict semantics, stage labels, and candidate ordering remain source-controlled system rules in this release.

OpenAI Build Week

AgentIME was created during OpenAI Build Week (July 13-21, 2026) with Codex using GPT-5.6. The primary development session ID is 019f7ebc-e8f1-7e40-9613-9d3a9081753c.

The human author made the product decisions: an IME-like cross-application composer, a deterministic rather than generative compiler, a local-first privacy boundary, bilingual semantic packs, atomic directives, explicit conflict resolution, and full user-facing library customization. Codex and GPT-5.6 helped turn those decisions into the normalized data model, validation and generation tools, Swift compiler, native macOS application, automated tests, adversarial checks, and signed release packaging. The author repeatedly tested the running app and redirected the interaction design, including the Option-Tab shortcut, checkable tree menu, language switching, advanced methodology recipes, and Settings-based editing model.

The runtime itself deliberately makes no OpenAI API call. Build Week does not require an API integration: Codex and GPT-5.6 were the development tools, while the application runtime remains local-only, offline, and deterministic.

The paste-ready Devpost copy, three-minute demo script, and final submission checklist are in docs/build-week-submission-draft.md. The 2:44 Build Week demo shows the bilingual composer, deterministic compilation, conflict handling, and library editing.

Repository layout

data/core/                 Editable, language-neutral catalog and relations
data/core/locales/         Complete locale text keyed by stable IDs
data/generated/            Deterministic runtime snapshots
data/research/             Source register and corpus observations
docs/                      Taxonomy and curation decisions
schemas/                   JSON Schema contracts
tools/                     Validation, build, research, and compiler tools
tests/                     Data invariant and compiler tests
Packages/DirectiveCore/    Native runtime loader, repository, and deterministic compiler
Apps/AgentIMEMac/          Menu-bar lifecycle, nonactivating panel, state, and SwiftUI views
Apps/AgentIMEMacTests/     macOS interaction-state and shortcut tests
project.yml                XcodeGen source of truth for the Mac project

Validate and build

uv sync
uv run python tools/build_runtime_pack.py
uv run python tools/validate_directive_data.py
uv run python -m unittest discover -s tests

The build and validation commands process every locale declared in data/core/catalog.json. Pass --locale en or --locale zh-Hans to target one locale while iterating.

Compile a checked-in recipe or an ad hoc selection:

uv run python tools/compile_prompt.py --recipe recipe.deep-review
uv run python tools/compile_prompt.py \
  verify.hidden-assumptions@strong \
  verify.construct-counterexamples@standard \
  verify.confirm-with-evidence@strong \
  --target current-approach

For example, this input:

uv run python tools/compile_prompt.py \
  understand.clarify-objective@standard \
  verify.confirm-with-evidence@standard \
  --target current-result

always produces this output:

Clarify the real objective, the intended outcome, and what would make the work useful.

Confirm the current result using tests, source checks, measurements, or other observable evidence rather than assertion alone.

Install the evaluation build

The Build Week release contains two universal builds for macOS 14 or later. Neither requires Python, Xcode, or XcodeGen:

  • AgentIME-0.5.0-signed-unnotarized.zip is the complete submitted feature set. It has a valid Developer ID signature, but its notarization ticket is pending. Control-click the app, choose Open, then confirm Open on first launch.
  • AgentIME-0.4.1-notarized.zip is the immediately Gatekeeper-approved fallback. It contains the complete composer, bilingual packs, recipes, and compiler, but predates the 0.5.0 full-library Settings editor.
  1. Download and expand either archive above.
  2. Move AgentIME.app to Applications and open it.
  3. Put the cursor in a paste-capable text field and press Option-Tab.
  4. Select directives or a recipe, then press Space to finish.
  5. AgentIME always copies the result. Paste manually with Command-V, or choose Enable Auto-Paste… from the menu-bar item and grant Accessibility access.

The menu-bar item remains available if another utility owns Option-Tab. The 0.5.0 asset will replace the signed-only archive after Apple notarization.

Build the Mac prototype

Requirements:

  • macOS 14 or later;
  • Swift 6 and an Xcode release that provides it;
  • XcodeGen;
  • uv for data generation and Python tests.

The project currently builds and tests with Xcode 26.4 and the macOS 26.4 SDK, with a deployment target of macOS 14. The prepared evaluation build is a universal application for Apple Silicon and Intel. The source build below is for development and verification.

The Xcode project is generated from project.yml with XcodeGen and is intentionally not committed:

xcodegen generate
xcodebuild \
  -project AgentIME.xcodeproj \
  -scheme AgentIME \
  -configuration Debug \
  -destination 'platform=macOS,arch=arm64' \
  -derivedDataPath .build/DerivedData \
  CODE_SIGNING_ALLOWED=NO \
  build

Run the native core and app tests:

swift test --package-path Packages/DirectiveCore
xcodebuild test \
  -project AgentIME.xcodeproj \
  -scheme AgentIME \
  -configuration Debug \
  -destination 'platform=macOS,arch=arm64' \
  -derivedDataPath .build/TestDerivedData \
  CODE_SIGNING_ALLOWED=NO

Launch the debug build, then press Option-Tab. The activation shortcut does not need Accessibility permission. Choose Enable Auto-Paste… from the menu-bar item only if you want AgentIME to paste automatically:

open .build/DerivedData/Build/Products/Debug/AgentIME.app

Option-Tab is registered exclusively. If another utility already owns that combination, AgentIME reports it as unavailable and the menu-bar entry remains usable.

Completion always writes the final instruction to the clipboard first. With Accessibility permission, AgentIME detects whether the previous application has an editable focused element and sends Command-V only in that case. Without permission or an editable target it simply returns with the clipboard ready. No network access is used.

Design boundary

The core pack is local and deterministic. It does not call a model, inspect a conversation, or require network access at runtime. Language preference, favorites, the current draft, built-in overrides, and user-created directives and recipes stay in Application Support on this Mac. Personal frequency, recency, and the iOS keyboard remain later milestones layered on top of the editor-provided priority tier.

See CONTRIBUTING.md for directive atomicity, evidence, provenance, and localization rules.

AgentIME is available under the Apache License 2.0.

About

A local, deterministic instruction compiler for paste-capable AI text fields.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages