Repository navigation
AI agents
XeFM opens an AI coding agent beside the file manager with Tools ▸ AI Agent
Here (agent, > in every keymap preset), the Screens… switcher's
"New … in" row, and Ask AI Agent… (ask_agent, with a request you type
or one saved in AGENT_PROMPTS); see
AI agent sessions.
Since XeFM 1.17.0, four agents are set up out of the box. Install one, sign in to it once on its own, and it shows up in the menu; one that is not installed is not offered. Nothing else to configure.
| Agent | Command | Install |
|---|---|---|
| Claude Code | claude |
Claude Code |
| Codex | codex |
Codex CLI |
| GitHub Copilot CLI | copilot |
winget install GitHub.Copilot, or GitHub Copilot CLI
|
| Antigravity CLI | agy |
winget install Google.AntigravityCLI, or Antigravity CLI
|
Antigravity CLI replaced Gemini CLI in June 2026; Gemini CLI has no preset.
Each preset hands its agent what it needs in its own way: the xefm skill
of the running XeFM, the rules for working in XeFM (plus your
AGENT_RULES), and, where the agent takes them, rules that deny the shell
commands that delete or move files (rm, mv, Remove-Item, …), so those
go through xefmctl, where XeFM asks you first.
| Skill | Rules | Denied shell commands | |
|---|---|---|---|
| Claude Code | yes | yes | yes |
| Codex | yes | yes | no: Codex's own sandbox and approvals apply |
| Copilot | yes | yes | yes |
| Antigravity | yes | yes | yes |
Copilot and Antigravity ask whether you trust a folder the first time they start there; answer in the session.
To turn agents off, set AGENTS = [] in config.py: the menu items go too.
To change an entry (a model, extra options), copy the AGENTS block from
the config template into your config.py and edit it:
AGENTS = [
{'name': 'Claude Code', 'command': ['claude', '--model', 'opus'], 'preset': 'claude-code'},
{'name': 'Codex', 'command': ['codex'], 'preset': 'codex'},
]This part of the page is for agents without a preset: entries for AGENTS
in config.py, written and kept up by the people who use them. Add yours
below.
What every agent gets, preset or not:
-
xefmctlin its shell, with a key that marks the session as an agent's. XeFM confirms every copy, move and trash it asks for, refusesdelete, and asks before its first read off the local disk. - The
XEFM_*variables every program XeFM starts gets,XEFM_SESSIONamong them, which is how thexefmskill knows it is inside XeFM.
What a preset adds, and an agent without one has to get some other way: the skill, the rules, and its own permission settings.
XeFM fills these in, in command and prompt_args, when it starts the
session:
| Placeholder | Becomes |
|---|---|
{skills_dir} |
a skills folder holding the xefm skill of the running XeFM |
{skill_dir} |
the xefm skill's own folder |
{plugin_dir} |
the same skill as a Claude Code plugin folder |
{rules} / {rules_file}
|
XeFM's rules plus AGENT_RULES, as text / in a Markdown file |
{settings_file} |
a JSON file of the entry's settings
|
{prompt} |
the request, for ask_agent
|
prompt_args is what ask_agent appends for the request; it defaults to
['{prompt}'] (the request as the last argument).
If the agent takes none of these, install the skill where it reads skills instead, and run the command again after you update XeFM:
xefm skill --install ~/.agents/skillsAn agent installed with npm starts from a .cmd file (gemini.cmd), which
runs through cmd.exe, and cmd.exe ends an argument at its first line break.
ask_agent's request is several lines (the request, then the folder and the
selection), so such an agent gets only the first line. Prefer a native
.exe build of the agent where there is one.