Agent

AgentiLoop活跃维护

Mac 上的 AI 智能体,通过辅助功能驱动任意应用,能在 Xcode 里写代码构建、跑 AppleScript 和 Swift 脚本,支持 23 家模型和本地 Apple Intelligence。

Agent! now supports macOS 14.6 or later, Apple Silicon and Intel, latest release. The Best AI agent for Mac: drives any app via Accessibility, codes/builds in Xcode, automates AppleScript, JXA, Swift and SMAppService shell (user/root). 23 LLM providers, local/cloud, plus on-device Apple Intelligence and Jev guard. Auto-Pilot, MCP, Avatar.

v1.1.98.298发布于 2026-11-10 00:30 UTC652star +1 / 7 天72fork同步于 2026-11-10 11:57 UTC

怎么上手

由 README 提炼,执行前请确认
brew update && brew install --cask agentiloop-agent
硬件要求按 README 说明

需 macOS 14.6 或更高版本,支持 Apple Silicon 与 Intel;本地运行仅 GLM-4.7-Turbo(32B)可跑在 64–128GB 内存的 Apple Silicon 上,其余模型走云端或 Apple Intelligence。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

原生 macOS AI 智能体,用自然语言驱动任意 App、写代码、跑命令

Mac 上的 AI 智能体,通过辅助功能驱动任意应用,能在 Xcode 里写代码构建、跑 AppleScript 和 Swift 脚本,支持 23 家模型和本地 Apple Intelligence。

核心能力

  • 通过 Accessibility API 以元素级操作驱动任意 Mac 应用
  • 自验证任务循环,需 goal_state 证据才算完成并可回滚
  • 原生构建 Xcode 项目并支持字符串替换式代码编辑
  • 支持 23 家 LLM 提供商与本地 Ollama、vLLM、LM Studio
  • MCP 服务器接入,工具以 mcp_<server>_<tool> 形式暴露

容易踩的坑

源码 ad-hoc 签名构建时 Launch Agent/Daemon 助手无法注册,需用签名发布版;iMessage 远程控制需给 chat.db 授予完全磁盘访问权限;MCP 示例 DemoHttp 需先启动监听 8085 端口的服务。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.1.98.298
  1. v1.1.98.298Agent! 1.1.98.298最新正式版2026-11-10 · 2026-11-10 00:30 UTC

    Agent! 1.1.98 (build 298)

    Built from main, tagged v1.1.98.298. It builds on v1.1.97.297.

    🐛 Fixed

    • A refused turn no longer breaks the tab. When the provider refused a turn (stop reason refusal), the refused turn stayed in the carried-over transcript, was re-sent with every later task and was refused again, so nothing worked until the conversation was cleared by hand. The task now ends at once with "The model refused this request. The conversation was reset — rephrase or start a new task." and the transcript is dropped, in both the main task loop and tab tasks (35bc34bb)

    🔧 Changed

    • Claude OAuth tokens (sk-ant-oat01-): the client version sent in the User-Agent and billing header is now 2.1.999 (bedf129d)

    🧪 Tests

    • Two RouteStopReasonTests cases cover the refusal halt, including after the retry budget is spent (cd9d782b)

    📝 Docs

    🔢 Version

    📦 Install

    • Download the signed, notarized .dmg or .zip attached to this release. The Release workflow builds and staples them after publishing.

    Full changelog: https://github.com/AgentiLoop/Agent/compare/v1.1.97.297...v1.1.98.298

  2. v1.1.97.297Agent! 1.1.97.2972026-11-03 · 2026-11-03 23:44 UTC
    查看更新说明

    Agent! 1.1.97 (build 297) — Hotfix

    This is a hotfix from main, tagged v1.1.97.297. It builds on v1.1.96.296.

    🐛 Fixed

    • Window could not be moved on macOS 27.2. The SwiftUI toolbar's hosting views swallow the titlebar drag events, so the main window was stuck in place. The main window now sets isMovableByWindowBackground, so dragging the window background — including the empty titlebar area — moves the window again (11a2f5ad)
    • Toolbar layout: status items stay on the leading edge, action buttons on the trailing edge, with a native flexible spacer between them (16c31623)

    📦 Install

    • Download the signed, notarized .dmg or .zip attached to this pre-release. The Release workflow builds and staples them after publishing.

    Full changelog: https://github.com/AgentiLoop/Agent/compare/v1.1.96.296...v1.1.97.297

  3. v1.1.96.296Agent! 1.1.96.296pre-release2026-11-03 · 2026-11-03 04:23 UTC
    查看更新说明

    Agent! 1.1.96 (build 296) — Pre-release

    This is a pre-release from main, tagged v1.1.96.296. It builds on v1.1.95.295 with UI polish and repo cleanup.

    🎨 UI

    • The activity log and LLM output re-render when you switch between light and dark mode. The task banner uses a darker green in light mode (c190d94e)
    • Error History shows the full error message instead of cutting it off at 100 characters (de12e052)

    💼 Sponsors

    • Sidrune AI sponsor placements are commented out (f3f51308)

    📖 Docs & Repo

    • README and 1.1.95 release notes: added Reverse Engineering with Agent! (CrazyTaxi, MarioKart64JS, F1, GoKart, BvS) and the 1.1.95 screenshot (1e1b9503)
    • READMEs proofread, and all 7 translations synced with the English README (4a3c4859)
    • Tidied the repo root: CLA.md moved to .github/, NOTICE and RELEASE_NOTES_1.1.95.md moved to docs/, and the CLA links updated (ae4019b0, ddbe08a7)

    📦 Install

    • Download the signed, notarized .dmg or .zip attached to this pre-release. The Release workflow builds and staples them after publishing.

    Full changelog: https://github.com/AgentiLoop/Agent/compare/v1.1.95.295...v1.1.96.296

  4. v1.1.95.295Agent! 1.1.95.2952026-11-01 · 2026-11-01 04:06 UTC
    查看更新说明

    Agent! 1.1.95.295 — Release

    Agent! 1.1.95

    Follows the latest pre-release, Agent! 1.1.94.294. Covers all changes since the last public release, Agent! 1.1.87.287. Pre-releases 1.1.88.288 – 1.1.94.294 are rolled into this release.

    🕹️ Reverse Engineering with Agent!

    Agent! reads disc images and ROMs, writes the extraction tools, studies decompiled code and rebuilds games in the browser. Four racing games and a fighter were built this way:

    • CrazyTaxi: Sega Dreamcast Crazy Taxi rebuilt in Three.js from your own disc, with collision code ported from the decomp
    • MarioKart64JS: Mario Kart 64 rebuilt in Three.js (not emulated) from the original N64 ROM. Play at mk64js.gokart.games
    • F1: 18 real circuits rebuilt from OpenF1 car positions and telemetry. Play at f1.gokart.games
    • GoKart: an original Godot 4 kart racer that recreates Mario Kart 64's rules, with everything generated from code. Play at gokart.games
    • BvS: Batman v Superman, a Three.js fighting game where every pixel is drawn from code. Play at bvs.agentiloop.ai

    No game assets are in these repos. All are fan-made for personal and educational use.

    🔌 MCP

    • One-step install with the mcp tool (for example, "add sentry mcp server"). Secrets are stored only in the Keychain (146c9a3a)
    • API keys pasted into chat stay out of the LLM. SecretRedactor moves them to the Keychain and the MCP prompt fills them in for you (c0217be5)
    • Built-in Sign in with Browser (OAuth 2.1 + PKCE, discovery, dynamic client registration) for Sentry, Linear and Notion. It doesn't need npx or mcp-remote, and tokens stay in the Keychain and refresh automatically (efc3724c)
    • Browser sign-in is detected automatically for any remote server that supports OAuth, with no preset needed (ac24351b)
    • Fixed: servers with names like 127.0.0.1 or my_server couldn't be reached (fb110a37)
    • New presets: Cohesivity, Keenable Search and deed.page (a6d0ac15, 9b562699, 32541370)

    🔌 New LLM Provider

    • TheRouter.ai, an OpenAI-compatible gateway, with tests (0ebb3ad1, 5fece081)
    • When an Ollama model isn't found, Agent! lists the installed models and suggests ollama pull, then tries the fallback chain. Previously it showed the raw error JSON (c24f8a1c)

    🗣️ Avatar Tabs

    • New talking-face avatar pane. The New Tab sheet has Avatar and Default to Auto-Pilot toggles (bef43d3b, 5035a31e)
    • Replies are spoken sentence by sentence as they stream. Each sentence gets its own expression, chosen by Jev with a keyword fallback (26aeffc0, 847c028c)
    • Shows a thinking face while the AI works and greets you aloud when the tab opens (e6097c84, [`6
  5. v1.1.94.294Agent! 1.1.94.294pre-release2026-10-26 · 2026-10-26 01:20 UTC
    查看更新说明

    Agent! 1.1.94 (build 294) — Pre-release

    Agent! 1.1.94

    This is a pre-release from main, tagged v1.1.94.294. It builds on v1.1.93.293 with MCP sign-in, Keychain-only secrets, and a new LLM provider.

    🔌 MCP

    • One-step install through the mcp tool (e.g. "add sentry mcp server"). Secrets go only to the Keychain (146c9a3a)
    • Built-in Sign in with Browser (OAuth 2.1 + PKCE, discovery, dynamic client registration, 127.0.0.1 loopback) for Sentry, Linear and Notion. It doesn't need npx/mcp-remote, and tokens stay in the Keychain with auto-refresh (efc3724c)
    • Browser sign-in is detected automatically for any remote server that returns 401 with OAuth metadata (ac24351b)
    • Fixed: tools are now dispatched by their sanitized wire name, so servers named like 127.0.0.1 or my_server can be reached again (fb110a37)
    • New presets: deed.page (#70), Keenable Search (#69) and Cohesivity (#68). Thanks to the contributors!

    🔐 Privacy

    • Pasted API keys never reach the LLM. SecretRedactor moves the tokens into the Keychain, and the MCP prompt fills them in for you (c0217be5)

    🧠 LLM Providers

    • New TheRouter.ai provider, an OpenAI-compatible gateway (e3b41695), with 10 Swift Testing cases (56d7e654)

    ✈️ Auto-Pilot & Stability

    • Auto-Pilot now carries attached images into every cycle (bbbb76c9)
    • Fixed stalls (beach ball) in script execution and DaemonCore (48c884aa)

    🧹 Repo

    • Tidied the repo root: CONTRIBUTING/CODE_OF_CONDUCT moved to .github, and the dev notes moved to docs/DEV_NOTES.md (453c8488). The README gained a star call-to-action.

    📦 Install

    • Download the signed, notarized .dmg or .zip attached to this pre-release. The Release workflow builds and staples them after publishing.

    Full changelog: https://github.com/AgentiLoop/Agent/compare/v1.1.93.293...v1.1.94.294

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    🦾 AgentiLoop Agent!

    🌐 Official website: agentiloop.ai — downloads, docs, reviews and news.

    Latest Release GitHub Stars GitHub Forks macOS 14.6+ Swift 6.4

    ⭐ If Agent! saves you time, please star the repo. Stars help other Mac users find a free, native, open-source AI agent — and keep the project going.

    🆕 New Kid on the Block: AgentiLoop CLI ⚡️

    The agentic loop, unleashed in your terminal. Mac. Windows. Linux. Your call.

    Meet the Agent! family's newest members: two cross-platform CLIs with the exact same capabilities. Pick your flavor:

    Built by AgentiLoop Agent! for Mac. Yes, the agent wrote its own little siblings. 🤖✨ v0.0.5 is out: a bigger toolbox — glob/grep search, web_fetch, todos, AGENTS.md, /undo, custom slash commands and --json. Download it today!

    README Translations

    English · Español · Français · Deutsch · 中文 (简体) · Русский · 한국어 · 日本語

    Chess within Agent

    What is Agent!?

    One app. Any AI. Total command over your Mac.

    Agent! is a 100% native Swift 6.4 / SwiftUI app that wires 23 LLM providers — Claude, Codex, OpenAI, Gemini, Grok, Mistral, Mistral Vibe, DeepSeek, Hugging Face, Z.ai, BigModel, Alibaba DashScope, Qwen, Qwen Code, Meta Muse, MiniMax, OpenRouter, Requesty, A2Agent, OrcaRouter, Ollama (cloud and local), vLLM, and LM Studio — plus on-device Apple Intelligence — into an autonomous task loop that actually does things: reads your codebase, fixes the bug, builds the Xcode project, commits the diff, drives any Mac app through the Accessibility API, runs shell commands as you or as root, texts you results over iMessage, and answers to a spoken "Agent!".

    No NPM, no Electron, no subscription, no telemetry. Bring your own API key, run fully local, or run free on Apple Intelligence. Every Swift package it depends on was written by the same author. See Backstory below.

    Quick Start (Download)

    1. Download Agent! and drag to Applications — or with Homebrew:
      brew update && brew install --cask agentiloop-agent
      
    2. Open Agent! — it sets up everything automatically
    3. Pick your AI — Settings → choose a provider → enter API key

    ✅ You never need to compile from source. Every release and every pre-release ships a pre-compiled Mac binary (.dmg + .zip), built by CI and signed, notarized, and stapled by Apple with the AgentiLoop Team ID. Because the official binaries carry a real Developer ID, the Launch Agent and Launch Daemon always register and never get "lost" — that only happens with ad-hoc source builds (see Option B below). If your helpers disappeared, just install the latest release binary.

    Quick Start (Build from Source)

    Only needed if you want to hack on Agent! itself. Everyone else: use the signed binary above.

    git clone https://github.com/AgentiLoop/agent.git
    cd agent
    

    Option A — Xcode (Apple Developer account): open Agent.xcodeproj, set your Development Team, Build & Run the Agent! scheme, approve the helper when prompted.

    Option B — no developer account (Xcode Command Line Tools only):

    ./build.sh              # Debug
    ./build.sh Release      # Release
    open "build/DerivedData/Build/Products/Debug/Agent!.app"
    

    ⚠️ Option B builds are ad-hoc signed. The Launch Agent/Daemon helpers won't register (SMAppService needs a Team ID), but the LLM loop, all tools, Accessibility, AppleScript, shell, and MCP still work. Want the helpers without a developer account? Use the signed, notarized release binary — no compiling required.

    💡 Cheap setup: GLM-5.3 via Z.ai (fastest signup, default model) costs pennies per million tokens. Running locally? Only GLM-4.7-Turbo (32B) fits consumer hardware (64–128GB Apple Silicon via Ollama).

    Troubleshooting (Build from Source)

    • xcode-select points at Command Line Tools → sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
    • Odd BUILD FAILED after pulling → stale DerivedData: ./build.sh clean && ./build.sh
    • Helpers never register → expected on Option B; use Option A, or simply install the signed release binary — every release and pre-release ships one
    • Deployment target / SDK errors → Agent! runs on macOS 14.6+ and is built with Swift 6.4 (Xcode 27, the same toolchain CI uses); update Xcode
    • Config argument is case-sensitive → ./build.sh (Debug) or ./build.sh Release

    What Can It Do?

    "Build the Xcode project and fix any errors" · "Play my Workout playlist in Music" · "Take a photo with Photo Booth" · "Send an iMessage to Mom saying I'll be home at 6" · "Open Safari and search for flights to Tokyo" · "Refactor this class into smaller files" · "What calendar events do I have today?"

    Just type what you want. Agent! figures out how and makes it happen.


    Key Features

    • 🧠 Self-verifying task loop — reasons, executes, observes results, self-corrects. A task can't declare itself done until goal_state criteria are marked with evidence; an opt-in critic reviews the diff first.

    • 🛠 Agentic coding — reads codebases, edits with string-replace diffs, builds Xcode projects natively (clickable errors), manages git, indexes repos into a portable JSONL repo-map. Every edit is snapshotted — one-click rollback or whole-task rewind_task.

    • 🖥 Desktop automation — drives any Mac app through the Accessibility API (AXorcist), element-based with fuzzy auto-retry. Plus NSAppleScript, JXA and 51 ScriptingBridge app bridges, all in-process with TCC.

    • 📜 AgentScript — Swift dylibs compiled at runtime and dlopen'd in-process with full TCC. Deleted scripts go to .Trash and are restorable.

    • 🛡 Privileged execution — shell as you via a Launch Agent, or as root via a Launch Daemon you approve exactly once (SMAppService + XPC). See docs/SECURITY.md for why SMAppService already enforces signing identity.

    • 🎙 Voice — say "Agent!" followed by your task; on-device SFSpeechRecognizer, auto-runs after ~2.5s of silence, loops.

    • 📱 iMessage remote control — text Agent! next song from your iPhone; approved senders only. Needs Full Disk Access for chat.db.

    • 🌐 Web — built-in Safari automation (JavaScript + AppleScript); optional Selenium and Playwright MCP for cross-browser.

    • 🤝 Sub-agents — up to 3 concurrent (6 read-only) isolated agents with mailbox messaging and per-agent model override.

    • 🧩 MCP — add any MCP server in Settings → MCP Servers (paste JSON or fill in the form); tools appear as mcp_<server>_<tool>. Examples (stdio and HTTP):

      {
        "mcpServers": {
          "xcode": {
            "transport": "stdio",
            "command": "xcrun",
            "args": ["mcpbridge"],
            "env": {}
          },
          "HelloWorld": {
            "transport": "stdio",
            "command": "/Users/you/bin/mcp-server-hello",
            "args": [],
            "env": {}
          },
          "DemoHttp": {
            "transport": "http",
            "url": "http://localhost:8085/mcp",
            "headers": {}
          }
        }
      }
      

      HelloWorld and DemoHttp are the demo servers from AgentMCP; start mcp-server-demo-http first so DemoHttp has something listening on port 8085.

    • 🗂 Tabs, history, memory, plans, skills — each tab has its own project folder and log; persistent user memory; multi-plan checklists surfaced in every prompt.

    • 🔄 Fallback chain — auto-switch to the next configured provider on 429/timeout/network failure.

    Sponsors

    Sponsoring

    Companies and LLM providers who want to support the project: see docs/SPONSORSHIP.md (levels, placements) and docs/PROVIDER_PROGRAM.md (LLM provider integration), or sponsor directly via GitHub Sponsors. All billing via GitHub Sponsors.

    🤖 23 LLM Providers

    Provider   Sponsor   CostBest for
    A2AgentCheapDeepSeek, GLM, Kimi, MiniMax and Qwen via one OpenAI-compatible key at a fraction of official pricing
    Apple IntelligenceFree, on-deviceTriage, summaries, token compression (brain icon, not available on the provider picker)
    ClaudePer-token (API key) or subscription (OAuth)Long autonomous tasks, extended thinking, prompt caching
    CodexChatGPT subscriptionOpenAI models via ChatGPT OAuth — no API key, no per-token charges
    DeepSeekCheapBudget coding, cache-hit reporting
    Google GeminiPaid (free tier)Long context, vision
    Grok (xAI)PaidReal-time info
    Hugging FaceVariesOpen models, serverless or dedicated endpoints
    Local Ollama / vLLM / LM StudioFree + hardwareFully offline; real per-model context window detected
    Meta MusePaidMuse Spark via the Meta Model API (api.meta.ai), OpenAI-compatible LLM_… key
    MiniMaxCheap1M-token context
    Mistral / Mistral VibePaidOpen-weight cloud, code, agent product
    Ollama (cloud)Free tierHosted open models
    OpenAIPaidGeneral purpose, tool calling, vision, reasoning_effort
    OpenRouterPaid200+ models, one key; Claude routed via Anthropic protocol
    OrcaRouterPaid190+ models via one OpenAI-compatible key at provider cost; auto/fusion/fallback routing
    Alibaba DashScopeCheapQwen 3.8 via DashScope; Model Studio sk- and QwenCloud sk-ws- keys
    Qwen (qwen.ai Token Plan)SubscriptionQwenCloud Token Plan (sk-sp- key, token-plan.*.maas.aliyuncs.com): qwen3.8-max, qwen3.7-plus, GLM-5.2, DeepSeek V4
    Qwen CodeSubscriptionAlibaba Coding Plan (sk-sp- key): qwen3-coder-plus, qwen3.7-plus, GLM-5, Kimi K2.5, MiniMax-M2.5
    RequestyPaid300+ models via one OpenAI-compatible key; per-model pricing and capability metadata
    Z.ai / BigModelCheapGLM-5.3 — recommended starting point

    💡 Self-hosted providers are free only in the API-fee sense — a usable 30B+ model needs an M2/M3/M4 Ultra Mac Studio (64–128GB). Without that hardware, the cheap cloud paths above are dramatically cheaper.

    Tools

    Canonical names come from AgentTools.Name.* (source of truth: the AgentTools package). Per-provider toggles can hide individual tools.

    GroupTools
    Coredone · list_tools · search · web_search · fetch · chat · memory · plan · goal_state · restore_tool_result · directory · skill · ask_user · index
    Code / buildfile (read/write/edit/diff_apply/undo/list/search/mkdir/…) · git · xcode (build/run/analyze/snippet/code_review/add_file/bump_version/…) · agent_script
    Shelluser_shell (Launch Agent) · root_shell (Launch Daemon) · shell (in-process fallback) · batch · multi
    macOS automationaccessibility (25 element-based actions) · applescript (with lookup_sdef) · javascript (JXA)
    Websafari · selenium · mcp_playwright_browser_* (optional)
    Sub-agentsspawn_agent · tell_agent

    Full per-action reference: docs/TECHNICAL.md.

    AgentScript — Swift scripts with full TCC

    AgentScripts are plain Swift files in ~/Documents/AgentScript/agents/Sources/Scripts/. Agent! compiles each one to a .dylib with SwiftPM (Package.swift lists every script plus the 51 ScriptingBridge app bridges), then dlopens it with Agent!'s own TCC grants — Accessibility, Automation, Calendar, Contacts, Mail, Photos, etc. The LLM manages them with agent_script (create / edit / run / delete / restore / pull); ~35 examples ship in the folder (Hello, TodayEvents, NowPlaying, CheckMail, CreateDmg, ArchiveXcode, …).

    Entry point — no top-level code, no exit(); stdout is returned to the LLM, the return value is the exit status:

    import Foundation
    import CalendarBridge   // any `import XBridge` auto-wires — no Package.swift edits needed
    
    @_cdecl("script_main")
    public func scriptMain() -> Int32 {
        print("Hello from AgentScript! 👋")
        return 0
    }
    

    Environment variables — how they are SET. The LLM never touches the environment itself. It calls the tool, and Agent!'s ScriptService exports the variables into the script's process (env["AGENT_PROJECT_FOLDER"] = cwd, env["AGENT_SCRIPT_ARGS"] = arguments in ScriptService+Execution.swift; setenv(...) for the in-process variant). The same two variables are exported to every user_shell / root_shell / shell command.

    LLM tool call                                          What Agent! exports to the script
    ─────────────────────────────────────────────────────  ─────────────────────────────────────────────
    agent_script(action:"run", name:"TodayEvents")         AGENT_PROJECT_FOLDER=/Users/you/Documents/GitHub/Agent
                                                           (AGENT_SCRIPT_ARGS is NOT set)
    
    agent_script(action:"run", name:"TodayEvents",         AGENT_PROJECT_FOLDER=/Users/you/Documents/GitHub/Agent
                 arguments:"days=3,location=false,json=true")   AGENT_SCRIPT_ARGS="days=3,location=false,json=true"
    
    VariableWhen setMeaning
    AGENT_PROJECT_FOLDERAlwaysThe active tab's project folder (or $HOME if none). The runner's cwd is set to it as well.
    AGENT_SCRIPT_ARGSOnly when the LLM passes arguments:"…"Whatever string the LLM passed, verbatim. The bundled examples use the key=value,key=value convention.

    Environment variables — how they are READ IN. Inside the script, both come from ProcessInfo.processInfo.environment. This is the exact parsing pattern used by Hello.swift / TodayEvents.swift:

    import Foundation
    
    @_cdecl("script_main")
    public func scriptMain() -> Int32 {
        let env = ProcessInfo.processInfo.environment
    
        // 1. Project folder — always present; fall back to cwd just in case
        let folder = env["AGENT_PROJECT_FOLDER"] ?? FileManager.default.currentDirectoryPath
    
        // 2. Arguments — absent unless the LLM passed `arguments:"…"`
        let argsString = env["AGENT_SCRIPT_ARGS"] ?? ""
    
        // 3. Defaults, then parse "key=value,key=value"
        var daysAhead    = 0
        var showLocation = true
        var outputJSON   = false
    
        for pair in argsString.split(separator: ",") {
            let parts = pair.split(separator: "=", maxSplits: 1).map { $0.trimmingCharacters(in: .whitespaces) }
            guard parts.count == 2 else { continue }
            switch parts[0] {
            case "days":     daysAhead    = Int(parts[1]) ?? 0
            case "location": showLocation = parts[1].lowercased() == "true"
            case "json":     outputJSON   = parts[1].lowercased() == "true"
            default: break
            }
        }
    
        print("Project folder: \(folder)")
        print("days=\(daysAhead) location=\(showLocation) json=\(outputJSON)")
        return 0
    }
    

    The two variables are independent — never parse the project folder out of AGENT_SCRIPT_ARGS. Bash equivalent inside user_shell: ls "$AGENT_PROJECT_FOLDER/Sources" (cwd is already there, no cd needed).

    Real AGENT_SCRIPT_ARGS conventions from the shipped scripts (~/Documents/AgentScript/agents/Sources/Scripts/):

    Scriptarguments: the LLM passesStyle
    TodayEventsdays=3,location=false,json=truekey=value,…
    CheckMailunreadOnly=true,inboxCount=true,json=truekey=value,…
    ListReminderscompleted=false,limit=5key=value,…
    QuitAppsexcluded=Xcode,Agent,Terminalkey=value with a list
    NowPlayingjson=true,artwork=truekey=value,…
    ArchiveXcode/path/to/Project.xcodeproj MyScheme 469UCUB275positional, space-separated (scheme/teamID auto-detected if omitted)
    CreateDmg--app /path/to/App.app --output /path/out.dmg --name "My App" --compressflag-style, space-separated, quotes respected

    JSON input / output — a SEPARATE mechanism from the env vars. Env vars are exported by Agent! into the process; JSON files are plain files on disk that the script itself reads and writes with FileManager / JSONSerialization. Agent! does not create, pass, or parse them. Two real patterns from the shipped scripts:

    1. JSON-only input (SendMessage) — no env args at all; the script requires SendMessage_input.json and returns 1 if it's missing:

    // ~/Documents/AgentScript/json/SendMessage_input.json   (written by the LLM via file(action:"write") before the run)
    { "recipient": "Mom", "message": "Home at 6", "imagePath": "~/Pictures/Photos Library.photoslibrary/originals/A/IMG_0001.jpeg" }
    
    // ~/Documents/AgentScript/json/SendMessage_output.json  (written by the script)
    { "success": true, "timestamp": "2026-09-03T21:14:02Z", "recipient": "Mom", "message": "Home at 6" }
    // on failure: { "success": false, "timestamp": "…", "error": "Missing required field: recipient" }
    
    // SendMessage.swift — how the script reads it
    let inputPath  = "\(NSHomeDirectory())/Documents/AgentScript/json/SendMessage_input.json"
    guard let inputData = FileManager.default.contents(atPath: inputPath) else {
        writeOutput(outputPath, success: false, error: "Input file not found: \(inputPath)"); return 1
    }
    guard let json = try? JSONSerialization.jsonObject(with: inputData) as? [String: Any],
          let recipientHandle = json["recipient"] as? String else { /* … */ return 1 }
    let message   = json["message"]   as? String
    let imagePath = json["imagePath"] as? String
    

    2. Env args for options, JSON for structured output (TodayEvents, NowPlaying, CheckMail, ListReminders) — options come from AGENT_SCRIPT_ARGS (or the optional <Name>_input.json); when json=true the script writes <Name>_output.json in addition to the human-readable stdout that goes back to the LLM:

    // agent_script(action:"run", name:"TodayEvents", arguments:"days=3,json=true")
    // → ~/Documents/AgentScript/json/TodayEvents_output.json
    { "success": true, "timestamp": "…", "count": 2,
      "events": [ { "summary": "Standup", "calendar": "Work", "startTime": "…", "endTime": "…", "allDay": false, "location": "…" }, … ] }
    
    // agent_script(action:"run", name:"NowPlaying", arguments:"json=true,artwork=true")
    // → ~/Documents/AgentScript/json/NowPlaying_output.json
    { "success": true, "playerState": "playing",
      "track": { "name": "…", "artist": "…", "album": "…", "duration": 240 },
      "artwork": { "saved": true, "path": "~/Documents/AgentScript/images/….png", "width": 500, "height": 500 } }
    
    // TodayEvents.swift — how the script writes it
    func writeTodayEventsOutput(_ path: String, success: Bool, error: String? = nil,
                                events: [[String: Any]]? = nil, count: Int? = nil, outputJSON: Bool) {
        guard outputJSON else { return }
        var result: [String: Any] = ["success": success, "timestamp": ISO8601DateFormatter().string(from: Date())]
        if !success, let error { result["error"] = error }
        if success { if let events { result["events"] = events }; if let count { result["count"] = count } }
        try? FileManager.default.createDirectory(atPath: (path as NSString).deletingLastPathComponent, withIntermediateDirectories: true)
        if let out = try? JSONSerialization.data(withJSONObject: result, options: .prettyPrinted) {
            try? out.write(to: URL(fileURLWithPath: path))
        }
    }
    

    Deleted scripts go to ~/Documents/AgentScript/agents/.Trash/ (agent_script(action:"restore")); action:"pull" fetches the upstream version from the AgentScripts repo.

    🔒 Jev — a second opinion before shell commands

    Jev (TypeSafe System One) is an optional decision layer that reviews shell commands before Agent! runs them. It supplements your selected LLM provider — it never replaces it.

    • What it does. Every command that already passed the hard-coded ShellSafetyService rules is sent to Jev, which rates how likely it is to irreversibly destroy data. Above your threshold the command is refused with the rating and the command text; below it, the command runs.
    • Where it applies. All shell paths: the in-process shell, the user Launch Agent (user_shell), and the privileged Launch Daemon (root_shell).
    • Tunable cut-off. Settings → LLM Common Settings → Reject at … % destructive, 0–100% in 10% steps. Default 70%.
    • Fail-open by design. No API key, the Consult Jev before tools toggle off, or a TypeSafe outage means "no opinion" — the command proceeds and the failure is logged, never silently treated as a safe verdict. Cancelling a task during a Jev check stops the command.
    • Visible. Every check logs the destructive-risk percentage, the allowed/refused verdict, the answering model, and input/output token counts.
    • Configuration. API key (stored in the Keychain), model picker with catalog refresh, and the advisory toggle all live in LLM Common Settings. The client lives in the bundled TypeSafeKit / TypeSafeMiddleware Swift package.

    Privacy & Safety

    Your files, screen contents and personal data never leave your Mac — cloud providers only see prompt text; local providers keep everything offline. Every action is logged.

    LayerWhat it does
    Shell Safety ServiceHard-blocks rm -rf /, rm -rf ~, bare-glob rm -rf, --no-preserve-root — enforced client-side and daemon-side. Cannot be bypassed by the LLM.
    XPC client trustBoth listeners require same-team code signing derived from the app's own signature; release builds reject un-teamed clients.
    Read-before-edit gateEdits to unread or externally-modified files are refused (SHA-256), with auto-read on refusal.
    File backups + rewindEvery edit snapshotted (1-week TTL); Rollback UI, file(action:"undo"), or task-scoped rewind_task.
    TCC in-process routingAppleScript/JXA/screencapture/accessibility commands run in-process where Agent! holds TCC grants, never through the daemons.
    Tool execution gatingThe LLM cannot fabricate results — every call flows through dispatchTool() and returns real output. Tool-less "I clicked/searched…" claims get a correction injected.
    Typed errors + guardsEvery failing tool result carries a recovery hint; broken-record and stuck guards nudge, then stop; completion gates cap refusals at 3 per task.
    Console audit trailEvery tool call and every helper command is logged.

    Keyboard Shortcuts & Slash Commands

    ShortcutAction
    ReturnRun task · ⌘ . / Esc cancel
    ⌘ T / ⌘ W / ⌘ 1–9 / ⌘ ⇧ ←→New / close / switch / prev-next tab
    ⌘ B / ⌘ DToggle LLM Output overlay / chevrons
    ⌘ F / ⌘ L / ⌘ VSearch log / clear log / paste image
    ↑ / ↓Prompt history
    ⌘ ⇧ M / ⌘ ⇧ PMessages Monitor / Settings
    ⌘ ⇧ K L H J UClear all / LLM panel / prompt history / task history / token counters

    Slash commands run locally: /clear [log|all|llm|history|tasks|tokens], /memory [show|clear|edit|<text>], /auto … (see below).

    Auto-pilot (/auto)

    Runs the task loop in unattended cycles — on the main tab or any LLM tab — until a goal is reached, a time budget runs out, or you press Stop. There is no cycle limit and no per-cycle iteration cap: when a cycle's task ends (after it has fully finished) and the goal isn't reached, the next cycle starts automatically.

    CommandWhat it does
    /auto <goal>Work toward the goal until the LLM reports it reached
    /auto 4h <goal>Same, but stop after 4 hours (30m, 1.5h also work)
    /autoReview the project first, then ask you for the goal via ask_user
    /auto historyList previous auto-pilot goals
    /auto last / /auto #NRestart the most recent / Nth goal from history
    /auto add <folder>Add a parity folder — every change to the project is mirrored there
    /auto remove <folder>Remove a parity folder
    /auto status / /auto stopShow the session / end it after the current cycle (immediately if between cycles)

    Each cycle is a normal task; its summary is appended to .agent/autopilot/progress.md and fed into the next cycle's prompt. The LLM ends the session by starting its final summary with AUTOPILOT: GOAL REACHED. Cycles that end with no summary (errors, cancellations) never end the session — the next cycle just waits longer (15s, 30s, 60s… up to 5 min). /auto commands are recorded in prompt history (arrow-up) and goals are saved to the /auto history list. Active sessions survive app restarts: quitting (or a crash) pauses them, and on the next launch each one resumes on its tab with the next cycle.

    FAQ

    Do I need to know how to code? No — plain English (or your native language). How much does it cost? The app is free for noncommercial and personal use (PolyForm Noncommercial 1.0.0). You pay your provider; GLM-5.3 via Z.ai/BigModel or DeepSeek are the cheapest for serious work. Local models are free if you own the hardware. What Mac do I need? Apple Silicon or Intel, macOS 14.6+. Any modern Mac for cloud providers; 64GB+ for 30B local models. How is this different from Siri? Siri answers. Agent! acts — apps, files, code, system.

    More: docs/FAQ.md · Technical Architecture · Comparisons (vs Claude Code, Cursor, Cline, OpenClaw) · Security Model

    Backstory

    Agent! is the result of three years of building agentic AI apps — ANIE, Game Changer, BattleScript, XCF MCP Server and Client, D1F, and about eight original Swift packages. The missing piece was an intelligent autonomous loop; once achieved, the best of those projects came together into Agent!. It has written video games (Boss-Man), created apps, written poetry into Pages via AppleScript, generated disk images and attached them to GitHub releases. Where Claude Code relies on ~65 third-party NPM packages, Agent! is 100% native, uses very little RAM, and ships Xcode automation, Swift Syntax 6.2 analysis, Accessibility, AppleScript, AgentScript/ScriptingBridge, Safari automation and MCP support out of the box.

    Reverse Engineering with Agent!

    Agent! 1.1.95

    Agent! is also a reverse-engineering workbench. It reads disc images and ROMs, writes the extraction tools, studies the decompiled code, and rebuilds the game in the browser while checking its work against the original data. Four racing games and one fighting game were built this way:

    GameWhat Agent! didPlay
    🚕 CrazyTaxiThree.js rebuild of the Sega Dreamcast Crazy Taxi (USA). Python tools pull the courses, vehicles, characters, motions and audio from your own disc. Collision code is ported from the decomp and checked against the extracted course dataBring your own disc
    🍄 MarioKart64JSMario Kart 64 rebuilt in Three.js, not emulated. Courses, karts, music and voices come from the original N64 ROM, with all 16 courses, battle arenas, 15 items, HD textures and online playmk64js.gokart.games
    🏎️ F1Open-wheel racer with an AI field on 18 real circuits. Layouts, elevation and banking are rebuilt from real car positions and telemetry from the OpenF1 APIf1.gokart.games
    🏁 GoKartOriginal Godot 4 kart racer that recreates Mario Kart 64's rules (slipstream, engine classes, Grand Prix scoring, menus, music cues) with everything generated from code, plus online multiplayergokart.games
    🦇 BvSBatman v Superman, a Three.js 3D fighting game where every pixel is drawn from code: no model files, textures or audio samplesbvs.agentiloop.ai

    No game assets are in any of these repos. CrazyTaxi and MarioKart64JS need your own copy of the game. All are fan-made for personal and educational use.

    The Agent! family

    Agent! is built from a set of companion repos under the AgentiLoop org. News, downloads and the press kit are at 🌐 agentiloop.ai (site source).

    RepoWhat it is
    AgentiLoopCLI · AgentiLoopGoThe agent loop as cross-platform CLIs for macOS, Windows and Linux (Rust · Go)
    AgentScriptsThe Swift scripts Agent! compiles and runs in-process
    AgentToolsTool schemas, system prompts and provider management
    AgentLLMLLM provider protocols, types and registry
    AgentMCPMCP client (stdio + HTTP)
    AgentAccessAccessibility automation
    AgentEventBridgesScriptingBridge protocols for 50+ Mac apps
    AgentD1FMulti-line diff engine
    AgentSwiftSwiftSyntax code analysis
    AgentColorSyntax · AgentTerminalNeoSyntax highlighting · retro terminal markdown
    AgentAuditos.log audit logging

    Star History

    Contributing

    See CONTRIBUTING.md — build from source in ~5 minutes with ./build.sh, no developer account needed. Pull requests run the CI Build & Test workflow and require a one-time CLA signature. Check the good first issues.

    License

    PolyForm Noncommercial 1.0.0. You may use, modify, and share this software for noncommercial and personal purposes. Commercial use — including building or distributing commercial versions — is reserved exclusively to AgentiLoop.ai, a Logos InkPen LLC company. Contact AgentiLoop for a commercial license.


    ⚠️ Legal Notice & Attribution

    Trademark Notice

    "AgentiLoop Agent! for Mac" is an independent software project and is not affiliated with, endorsed by, sponsored by, or otherwise associated with Apple Inc. "Apple," "Mac," "Mac mini," "MacBook," "macOS," and related marks are trademarks of Apple Inc., registered in the U.S. and other countries. All other trademarks, service marks, and trade names referenced herein are the property of their respective owners and are used for identification purposes only.

    "AgentiLoop Agent!" and the AgentiLoop Agent! logo are trademarks of AgentiLoop.ai, a Logos InkPen LLC company. Use of these marks requires prior written permission. The PolyForm Noncommercial license below grants rights to the source code only — it does not grant any trademark rights.

    Source Code License (PolyForm Noncommercial 1.0.0)

    The source code of "AgentiLoop Agent! for Mac" is source-available and licensed under the PolyForm Noncommercial License 1.0.0. You are free to use, copy, modify, and distribute the source code for any noncommercial purpose, subject to the conditions in the LICENSE file (retain the Required Notice and a copy of, or link to, the license terms). Commercial use and commercial versions of the software are reserved exclusively to AgentiLoop.ai, a Logos InkPen LLC company.

    Compiled Binaries & Releases

    Compiled binaries, installers, code-signed builds, and release artifacts distributed through this project's GitHub Releases, AgentiLoop.ai, or any other official channel are the copyrighted work of AgentiLoop.ai, a Logos InkPen LLC company and are not covered by the PolyForm Noncommercial license that governs the source code. All rights to the official binaries — including the "AgentiLoop Agent!" name, logo, code-signing identity, and Developer ID — are reserved.

    Copyright © 2026 AgentiLoop.ai, a Logos InkPen LLC company. All rights reserved.

    You are welcome to build your own binaries from source for noncommercial use under the PolyForm Noncommercial license, provided you do not use the "AgentiLoop Agent!" name, logo, or branding to identify your product.

    Warranty Disclaimer

    This software is provided "AS IS," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holder be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.


    Thank you for your interest in AgentiLoop Agent! — an application crafted for Mac mini, MacBook, and Mac studio computers running macOS 14.6 or later on genuine Mac hardware and software.