Magent Frontend Boundary
Magent supports one user frontend: agent-shell, connected to the Magent
runtime through the in-process ACP adapter. User documentation and examples
must use the commands exported by magent-agent-shell.el or agent-shell itself.
Support Status
The code in magent-ui.el and magent-ui-legacy.el is currently unsupported
for user interaction. Do not use commands, keybindings, customization options,
or extension points from those files as a public interface. They are retained
only as internal compatibility and unfinished legacy code, and may change or be
removed without compatibility guarantees.
The current source tree names the legacy implementation
magent-ui-legacy.el. The same unsupported status applies to legacy UI files
named magent-legacy-ui.el or matching magent-legacy-*.el if such files are
present in another checkout or introduced during cleanup.
Supported Modules
magent-agent-shell.elregisters the Magent agent-shell configuration and provides the supported interactive entry points.magent-acp.elimplements the in-process ACP request, notification, response, permission, andsession/updateadapter.magent-runtime-api.elis the frontend-neutral runtime and session API.magent-runtime-queue.elowns the global single-execution queue and session-scoped cancellation.
Supported Flow
- Start or reuse Magent with
M-x magent-agent-shell-dwim, or register Magent withmagent-agent-shell-ensure-configand select it fromM-x agent-shell. - agent-shell calls the in-process ACP client from
magent-acp.el. - ACP normalizes text and resource blocks separately, persists structured
blocks in turn metadata, and submits the prompt to
magent-runtime-api.el. Localfile://resources also populate scoped request paths; resource bodies remain user-role context when history is reconstructed. - The runtime queue starts exactly one active turn at a time, builds a
magent-request-contextwith:ui-visibility 'none, and callsmagent-agent-run-turn. - The agent loop emits Magent-native observer events;
magent-acp.elconverts them to ACPsession/updatemessages for agent-shell. - ACP prompt requests remain pending until the corresponding Magent turn completes, fails, or is cancelled.
Configuration
magent-agent-shell-session-strategyselects the supported frontend’s new, latest, or prompt-based session flow.
Development Boundary
Core runtime behavior must not depend on an unsupported legacy UI workflow.
Keep frontend-neutral behavior in magent-runtime-api.el, ACP conversion in
magent-acp.el, and supported frontend behavior in
magent-agent-shell.el. Do not add new user-facing behavior to
magent-ui.el, magent-ui-legacy.el, magent-legacy-ui.el, or
magent-legacy-*.el.
Current Limitations
agent-shellandacpare hard dependencies of the supported frontend.- Runtime execution uses a global single-execution queue.
- Cancellation is session-scoped: cancelling one ACP session cancels that session’s active and queued submissions without removing other sessions’ queued work.
- Per-request instruction skill overrides and skill commands are supported. Per-request agent overrides are not currently exposed by the supported frontend.
- ACP session config exposes
Automatic capabilities. Disabling it suppresses contextual capability auto-resolution for future turns in that session while retaining explicitly selected instruction skills.