Agent Shell

The Emacs Agent Shell is a native, multi-session AI agent interface built on agent-shell.el and the Augment Code Protocol (ACP). It turns Emacs into a first-class AI development environment where sessions are persistent, context-aware, and deeply integrated with your workflow.

Why Not Just a Chat Buffer?

Most AI integrations treat conversations as disposable text. Agent Shell treats them as first-class objects:

  • Sessions persist — resume any conversation from days ago with full context
  • Sessions have metadata — tags, pinned issues, CI status, review threads
  • Sessions are searchable — find any past session by keyword or tag
  • Sessions are composable — structured prompts via templates and slash commands
  • Sessions are work-aware — auto-detect issues, PRs, and Jira tickets from conversation text

Package Ecosystem

Agent Shell is assembled from 6 packages using tiered sourcing:

PackageSourcePurpose
shell-makernixpkgs unstableComint-like shell buffer management
acpnixpkgs unstableAugment Code Protocol client
agent-shellnixpkgs unstableCore agent interface
agent-shell-managerCustom derivationTabulated session dashboard
agent-shell-workspaceCustom derivationDedicated tab-bar workspace
agent-shell-attentionCustom derivationMode-line attention tracker

Plus ~1,800 lines of custom Elisp in agent-shell.nix providing sessions, tags, compose, commands, templates, and context awareness.

Layers

The implementation is organised into 5 layers, each building on the previous:

LayerNameWhat It ProvidesPage
1FoundationCore shell, ACP protocol, package sourcingFoundation →
2Multi-SessionSession picker, resume, history, quitMulti-Session →
3ProductivityCompose buffer, templates, commands, tagsProductivity →
4IntegrationMCP servers, declarative tool configIntegration →
5ContextIssues, PRs, CI status, review threadsContext →

Quick Reference

C-c A a    Start / switch to agent
C-c A s    Session picker (live + saved + new)
C-c A e    Compose multi-line prompt
C-c A ?    Full keybinding help
C-c A I    Context panel (issues, PRs, CI)

Inside an agent-shell buffer, drop the A prefix: C-c s, C-c e, C-c ?, etc.

Full keybinding reference