AgentiLoop/Agent

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.

Swift

646

1,561 commits

updated Oct 16, 2026

See the code

See what people are saying

README

Sidrune AI, Silver Sponsor: One API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits.

image

🦾 AgentiLoop Agent!

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

Latest Release GitHub Stars GitHub Forks macOS 14.6+ Swift 6.4 Sponsor AgentiLoop

AgentiLoop Agent! on LaunchNest

⭐ 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:

AgentiLoop CLI: two versions, Rust and Go, with the exact same capabilities. macOS, Windows, Linux.

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!

Rust CLI on GitHub Go CLI on GitHub

README Translations

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

Chess within Agent

Screenshot 2026-08-23 at 7 34 10 PM

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, Sidrune AI, 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

Sidrune AI, Silver Sponsor: One API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits.

LogoSponsor   Level   
Sidrune AI logoSidrune AISilverOne API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits (Promo code SDRAGENTLOOP).

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
Sidrune AISidrune AI logoPaid (API credits)One API for GPT, Claude and other leading AI models; $3 credit with promo SDRAGENTLOOP
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

, /auto ….

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.

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

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.

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

Star History Chart

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.


Sidrune AI, Silver Sponsor: One API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits.

accessibility
agentic-coding
agentic-workflow
agentiloop-agent
agent-scripts
apple-intelligence
applescript
automation
autonomous-agents
auto-pilot
avatar
computer-use
control-xcode
imessage
javascript
llm
macos
mcp
safari-web-ui-automation
top-mac-agentic-coding-tool

AgentiLoop/Agent

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.

Swift

646

1,561 commits

updated Oct 16, 2026

See the code

See what people are saying

README

Sidrune AI, Silver Sponsor: One API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits.

image

🦾 AgentiLoop Agent!

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

Latest Release GitHub Stars GitHub Forks macOS 14.6+ Swift 6.4 Sponsor AgentiLoop

AgentiLoop Agent! on LaunchNest

⭐ 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:

AgentiLoop CLI: two versions, Rust and Go, with the exact same capabilities. macOS, Windows, Linux.

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!

Rust CLI on GitHub Go CLI on GitHub

README Translations

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

Chess within Agent

Screenshot 2026-08-23 at 7 34 10 PM

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, Sidrune AI, 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

Sidrune AI, Silver Sponsor: One API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits.

LogoSponsor   Level   
Sidrune AI logoSidrune AISilverOne API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits (Promo code SDRAGENTLOOP).

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
Sidrune AISidrune AI logoPaid (API credits)One API for GPT, Claude and other leading AI models; $3 credit with promo SDRAGENTLOOP
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

, /auto ….

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.

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

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.

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

Star History Chart

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.


Sidrune AI, Silver Sponsor: One API for GPT, Claude and other leading AI models. Sign up and get $3 in API credits.

accessibility
agentic-coding
agentic-workflow
agentiloop-agent
agent-scripts
apple-intelligence
applescript
automation
autonomous-agents
auto-pilot
avatar
computer-use
control-xcode
imessage
javascript
llm
macos
mcp
safari-web-ui-automation
top-mac-agentic-coding-tool

Significant stargazers

azu

2,859 followers · starred May 2026

Omar Aziz

418 followers · starred Sep 2026

Albert Strasheim

122 followers · starred Apr 2026

Anand Chowdhary

1,338 followers · starred Apr 2026