A24 Agent 24 Docs
Autonomous · Android · Local-first

Agent 24

An autonomous AI coding & technical assistant for Android — a terminal-based agent that reads, writes, edits and runs code, browses the web, and completes multi-step tasks on its own.

31Built-in tools
13Providers
25+Commands
6Agents

Quick start

  1. Connect a provider — /connect
  2. Pick a model — /model
  3. Start a task: just type what you want built.

Getting Started

Three minutes from install to your first completed task.

1. Install & open

Install Agent 24, open it, and grant the accessibility permission when prompted (required for screen understanding and UI dumping).

2. Connect a provider

Run /connect and pick from 13 pre-configured providers — OpenCode Zen, Pollinations (free), OpenAI, Anthropic, Google, Groq, DeepSeek, Mistral, xAI, Together, OpenRouter, HuggingFace, GitHub Models. Free options work with zero setup.

3. Choose a model

/model lists every model of the connected provider with capability flags: supportsTools, supportsImages, supportsReasoning, supportsStreaming.

4. Start working

Just type the task in natural language:

> build a calculator app with history
> find every TODO in src/ and summarize
> refactor utils.js and run the tests

Keyboard

KeyAction
/Focus search / command palette
Ctrl/Cmd + KCommand palette
EscClose overlay / cancel

Agents

Primary/sub agents you select, plus system agents that trigger automatically.

AgentModePermissionsDescription
buildprimary*: allowDefault agent, full access
planprimaryedit: ask, bash: askRead-only analysis
generalsubagent*: allowGeneral multi-step tasks
exploresubagentread-only setFast codebase exploration
scoutsubagentread/web onlyExternal docs & research

System agents

AgentTriggerPurpose
compactionTokens > 80%Context summarization
titleFirst messageSession title (3–5 words)
summarySession switchConversation summary

Permission matrix

Toolbuildplangeneralexplorescout
readallowallowallowallowallow
edit / writeallowaskallowdenydeny
bashallowaskallowallowallow
grep / glob / listallowallowallowallowallow
webfetch / websearchallowallowallowallowallow
todowriteallowallowdenydenydeny
task / questionallowallowallowdenydeny

allow = run silently · ask = confirm popup · deny = blocked

Tools

31 built-in tools. Every tool takes a JSON parameter map.

#ToolClassDescription
1bashBashToolExecute shell commands
2shellShellToolPersistent shell sessions
3readReadToolRead file contents
4writeWriteToolCreate / overwrite files
5editEditToolFind & replace edits
6grepGrepToolRegex content search
7globGlobToolFind files by pattern
8listListToolList directory contents
9diffDiffToolUnified diff preview
10apply_patchApplyPatchToolApply unified patches
11webfetchWebfetchToolFetch URL content
12websearchWebsearchToolSearch the web
13taskTaskToolDelegate to subagents
14skillSkillToolLoad specialized skills
15questionQuestionToolInteractive user prompts
16todowriteTodoWriteToolTask list management
17todoreadTodoReadToolRead todo state
18gitGitToolGit status/diff/commit/…
19archiveArchiveToolZip / tar create & extract
20cv_makerCvMakerToolGenerate a CV as PDF
21docx_makerDocxMakerToolGenerate Word documents
22image_analyzeImageAnalyzeToolOCR & structure analysis
23image_describeImageDescribeToolDescribe images for the model
24memoryMemoryToolLong-term memory across sessions
25pdfPdfToolRead / extract PDF text
26pdf_editPdfEditToolEdit existing PDFs
27pdf_makerPdfMakerToolGenerate PDF documents
28scheduleScheduleToolTimed commands via alarms
29screenshotScreenshotToolCapture device screenshots
30ui_dumpUiDumpToolDump the UI hierarchy
31sensorSensorToolRead sensors & control hardware (torch, vibrate, brightness, wifi…), root when needed

Execution flow

user action → check permission rules
  → deny  → blocked immediately
  → ask   → confirmation popup → wait for user
  → allow → action runs

Example calls

bash    { "command": "ls -la" }
read    { "path": "/path/to/file" }
edit    { "path": "...", "oldString": "find", "newString": "replace" }
grep    { "pattern": "regex", "path": "/dir", "include": "*.md" }
task    { "description": "...", "prompt": "...", "subagent_type": "explore" }

Commands

25+ slash commands for session and workflow control.

CommandDescription
/newStart new session
/clearClear chat messages
/sessionsShow session list
/modelChange AI model
/connectConnect a provider
/build /planSwitch agent mode
/initInitialize project
/diffShow real git diff
/undo /redoUndo / redo last tracked file change
/forkDuplicate session into a copy
/reviewCode review
/componentCreate component
/compactSummarize context (chat history stays)
/shareShare via Android share sheet
/skillsList skills
/agentsList agents
/themeChange theme (picker dialog)
/export /importExport / import session
/helpShow help

Permissions

Every tool call passes through the permission layer before executing.

Permission keys

KeyGates
readread
editwrite, edit, apply_patch
bashbash, shell
glob / grep / listrespective tools
tasktask
external_directoryany tool outside workspace
todowritetodowrite, todoread
webfetch / websearchweb tools
skill / questionskill, question
doom_loopstuck-agent recovery

Values

ValueBehavior
allowExecute without asking
askShow popup, wait for user decision
denyBlock execution entirely

Evaluation order

  1. Check agent-specific permission for the tool name
  2. Check wildcard (*) permission
  3. Default: allow (build) / ask (plan)

Providers

13 pre-configured providers with capability flags and auto-fallback.

ProviderBase URLModels
OpenCode Zenhttps://opencodezen.aimimo-v2.5-free, gpt-5, claude-sonnet-4
Pollinationshttps://text.pollinations.ai/openaiopenai-fast, gpt-oss-20b
OpenAIhttps://api.openai.com/v1gpt-4o, gpt-4o-mini, o1
Anthropichttps://api.anthropic.com/v1claude-sonnet-4, claude-haiku
Googlehttps://generativelanguage.googleapis.com/v1betagemini-2.0-flash, gemini-1.5-pro
Groqhttps://api.groq.com/openai/v1llama-3.3-70b, mixtral-8x7b
DeepSeekhttps://api.deepseek.com/v1deepseek-chat, deepseek-coder
Mistralhttps://api.mistral.ai/v1mistral-large, codestral
xAIhttps://api.x.ai/v1grok-2, grok-2-mini
Togetherhttps://api.together.xyz/v1llama-3.3-70b, codellama
OpenRouterhttps://openrouter.ai/api/v1multi-provider
HuggingFacehttps://api-inference.huggingface.co/v1various
GitHub Modelshttps://models.inference.ai.azure.comgpt-4o, codestral

Model capabilities

FlagDescription
supportsToolsTool calling
supportsImagesImage processing
supportsReasoningThinking / reasoning display
supportsStreamingSSE streaming

Error handling

HTTPTypeUser message
401AuthenticationInvalid API key. Check Settings > Models.
402PaymentQuota exhausted. Add credits or switch provider.
403Access deniedNo permission for this model.
404Not foundModel not available. Try another.
429Rate limitToo many requests. Wait and retry.
5xxServer errorProvider unavailable. Retrying…

Retry: max 3 attempts, exponential backoff 2s → 4s → 8s (429: 5s → 10s → 15s), auto-fallback to Pollinations on 4xx/5xx.

Settings

Runtime configuration lives in ~/.config/agent24/.

PathPurpose
agent24.jsonMain config file
AGENTS.mdBase system prompt
agents/Agent prompt files
skills/Skill definitions
commands/Custom slash commands
prompts/Custom prompts

Useful toggles

  • show_reasoning — thinking card visibility
  • auto_summarize — auto-summary on session switch
  • compaction_threshold — token % that triggers compaction (default 80)
  • Theme — change with /theme (picker dialog)

See also: Skills, MCP, Hooks.

Skills

Markdown instruction files loaded into the system prompt on demand.

Location

~/.config/agent24/skills/<name>.md

Usage

Load with the skill tool or ask the agent directly — it pulls the file into context:

{ "tool": "skill", "params": { "name": "settings-customization" } }

Structure

  • One markdown file per skill
  • Loaded skills are listed at the bottom of the system prompt
  • Related assets can sit next to the file
  • List everything with /skills

Example

# settings-customization
How to modify agent24.json safely: keys, defaults,
restart behavior and rollback steps.

MCP

Model Context Protocol — connect external tool servers.

Registering a server

{
  "server": "my-server",
  "instructions": "shown to the model in the system prompt",
  "tools": [ { "name": "create_issue", "inputSchema": { ... } } ]
}

Calling any of these tools routes the result back to the model.

Naming

MCP tools are prefixed with mcp_{serverName}_{toolName} so they never collide with built-ins.

mcp_github_create_issue
mcp_slack_send_message

Flow

  1. Server registers tools & instructions
  2. Instructions join the system prompt
  3. Tool definitions join the API tool list
  4. Model calls mcp_* → routed to the server

Hooks

Deterministic actions that run on lifecycle events — no model involved.

HookWhen
session.createdNew session starts
session.loadedExisting session opened
session.deletedSession removed
session.renamedTitle changed
message.before_sendUser message leaves the input
message.after_responseAgent response completed
tool.before_executeBefore a tool runs (can block)
tool.after_executeAfter a tool returns
permission.requestedPermission popup shown

Event system

session.created(sessionId)
session.loaded(sessionId)
session.deleted(sessionId)
session.renamed(sessionId, newTitle)

Typical uses: telemetry, auto-backup before edits, audit logging, custom notifications.

Sessions

Every conversation is an isolated session with its own database.

Lifecycle

startNewSession()  → id "session_" + timestamp → metadata → session database → event
loadSession(id)    → set current → load messages → update timestamp → event
deleteSession(id)  → drop database + folders + metadata → clear memory → event

Storage

DatabasePath
Session DB~/.local/share/agent24/sessions/{id}/session.db
Global DB~/.local/share/agent24/databases/agent24_global.db

Message senders

ValueNameDescription
0USERUser message
1AGENTAI response
2SYSTEMSystem message
3COMMANDCommand output
4ERRORError message
5PERMISSIONPermission request
6THINKINGReasoning / thinking
7TODOTodo update

Auto features

FeatureTrigger
Auto-titleFirst user message → 3–5 word title
Auto-summarySession switch → conversation summary
Auto-compactionTokens > 80% → summarize & compact
Auto-queueSession busy → queue, then drain

Queue

If the session is busy, messages go into a ConcurrentLinkedQueue and show Queued (N pending) — they run right after the current task completes.

Troubleshooting

SymptomFix
401 errorsRe-enter API key: Settings > Models, or /connect
429 rate limitWait — auto backoff 5s/10s/15s; or switch provider
Model not respondingTry another model with /model; free fallback is Pollinations
Agent stuck in a loopPermission key doom_loop triggers recovery
Context too longRun /compact — chat history stays
UI dump failsEnable accessibility service, then retry ui_dump
Command not found/help lists commands; custom ones live in ~/.config/agent24/commands/
Session feels slowCheck the queue; switch to a faster model (e.g. openai-fast)

Still stuck?

Open a session and ask — the agent can read its own logs via bash and the global database at ~/.local/share/agent24/databases/.