IntermediateEmacs Lisp

agent-shellNative LLM Agent Chat in Emacs

agent-shell is an open-source Emacs package that brings large language model (LLM) agents directly into native Emacs buffers via the ACP protocol. It offers an immersive, editor-centric experience for tasks like code Q&A and text generation, all without ever leaving your Emacs environment. Written in Emacs Lisp, the project has garnered significant attention on GitHub for its innovative approach to integrating AI.

1.7K Stars
210 forks
24 issues
101 browse
Emacs Lisp
GPL-3.0
Indexed

Project Overview

agent-shell is an open-source Emacs package that brings large language model (LLM) agents directly into native Emacs buffers via the ACP protocol. It offers an immersive, editor-centric experience for tasks like code Q&A and text generation, all without ever leaving your Emacs environment. Written in Emacs Lisp, the project has garnered significant attention on GitHub for its innovative approach to integrating AI.

Integrating AI assistants into Emacs has historically been a bit of a patchwork affair. You'd often find yourself juggling external scripts, hopping between terminal windows, or relying on half-baked plugins that felt more like workarounds than true integrations. agent-shell takes a different tack: it invites the LLM agent directly into a native Emacs buffer, letting you converse with the model using your familiar editing paradigms, rather than forcing you into a browser or external application.

What's Under the Hood?

The project's creator, xenodium, developed an Emacs package centered around the Agent Client Protocol (ACP) for LLM agent communication. ACP is an emerging open protocol, much like LSP (Language Server Protocol) for code completion, that defines a standard interface between clients and backend agents. This means you can initiate requests from an Emacs buffer, receive streaming output, and even manage multiple agent sessions, all within your editor.

This isn't just about binding a few prompt templates to keyboard shortcuts. agent-shell provides a true interactive buffer where model output streams in as text. You can then continue to query, refine, and modify the context directly within that same space, maintaining an unbroken workflow inside Emacs.

Practical Use Cases for Emacs Devs

For developers who live and breathe Emacs, this solves a very real pain point. Imagine needing a quick LLM explanation for a snippet of Lisp, a refactor suggestion for a function, or even generating code directly into a scratch buffer. Previously, this meant an Alt-Tab dance to another application. Now, it's just a buffer switch away. What's even more compelling is the unified protocol, which theoretically allows for hot-swapping different agent backends without needing to learn a new set of bindings for each.

  • Engage in LLM conversations directly within Emacs, eliminating context switching.
  • Leverages the open ACP protocol, supporting any compliant agent backend.
  • Sessions are saved as standard Emacs buffers, integrating seamlessly with Emacs' native file management, search, and editing capabilities.

Getting Started and Project Status

Installation isn't overly complex: clone the GitHub repository, set up your load path, and configure the ACP agent executable. However, this does assume a basic familiarity with Emacs Lisp—at least knowing how to use use-package or straight.el. If you primarily rely on pre-configured distributions like Spacemacs or Doom Emacs, this initial setup might present a slight learning curve.

The project currently boasts nearly 1700 stars on GitHub, making it a fairly active player in the Emacs AI ecosystem. The author actively maintains documentation and discussions, fostering a focused community. Still, it remains a tool for those who enjoy a bit of 'tinkering,' rather than users seeking an out-of-the-box, zero-config experience.

The Bottom Line

The primary advantage of this approach is its deep integration; the downside is its strong ecosystem dependency. If you're not an Emacs user, this project likely won't be relevant to you. However, if you are, and you're willing to invest half an hour in configuration, it can become an incredibly fluid entry point for LLM interactions. Unlike many plugins that shoehorn AI features into an editor, agent-shell respects Emacs' native interaction model—you still think in buffers, but now one of them can talk back.

It's worth noting that the ACP protocol is still in its nascent stages, and the agent ecosystem isn't nearly as mature as, say, LSP. Jumping in now offers a taste of the future, but don't expect the seamlessness of something like GitHub Copilot just yet. For the dedicated Emacs enthusiast who enjoys exploring and customizing, this early stage is precisely where the fun lies.

Emacs integrationLLM Agent clientACP protocolopen sourceprogramming assistantAI interactionEmacs Lispeditor AI plugindeveloper tools

Project Rating

0.0 (0 Evaluation)

Share

Frequently Asked Questions

What is agent-shell: Native LLM Agent Chat in Emacs?

agent-shell is an open-source Emacs package that brings large language model (LLM) agents directly into native Emacs buffers via the ACP protocol. It offers an immersive, editor-centric experience for tasks like code Q&A and text generation, all without ever leaving your Emacs environment. Written in Emacs Lisp, the project has garnered significant attention on GitHub for its innovative approach to integrating AI.

What language is agent-shell: Native LLM Agent Chat in Emacs written in?

agent-shell: Native LLM Agent Chat in Emacs is primarily written in Emacs Lisp.

What license is agent-shell: Native LLM Agent Chat in Emacs under?

agent-shell: Native LLM Agent Chat in Emacs is released under the GPL-3.0 license.

Related Projects

No results yet

Explore More

Similar Tools

Cursor

Cursor

A smart code editor based on secondary development of VS Code, with "native built-in AI" as its core selling point. It does not rely on plugins but deeply integrates AI into the underlying architecture of the editor, enabling it to understand the context of the entire project's codebase. It also supports seamless migration of all VS Code configurations and plugins.

Google Antigravity

Google Antigravity

Antigravity supports multiple models, including Gemini 3 Pro, Claude Sonnet 4.5, and GPT-OSS, allowing developers to select the most suitable model for their tasks within the same environment.

Codex

Codex

OpenAI Codex is an AI programming model and assistant developed by OpenAI, capable of translating natural language instructions into corresponding source code. It provides developers with intelligent code completion and code generation functionalities. Initially launched in 2021 as the code model for the OpenAI API, it once served as the core engine for GitHub Copilot. With the evolution of OpenAI's technology, Codex returned in 2025 in a new form as an "AI programming agent," capable of understanding complex requirements and automatically writing and debugging code, significantly enhancing development efficiency and software delivery speed.

Kiro

Kiro

Kiro is an AI-powered programming IDE launched by AWS, which adopts a specification-driven development model. It transforms natural language requirements into clear specification documents and tasks, then uses built-in AI agents to generate code, debug, and optimize, providing comprehensive assistance throughout the development process of large-scale projects.

Trae

Trae

Trae (official website: trae.ai) is an AI-native integrated development environment (IDE) launched by ByteDance. It is not merely a programming assistant but rather a "collaborative partner" that deeply integrates large language models (LLMs) to help developers achieve more intelligent and automated software development—from requirements analysis and code construction to debugging and deployment.

Claude

Claude

Claude is an intelligent language interaction platform developed by the American AI company Anthropic. It integrates capabilities such as deep text understanding, information organization, code assistance, and task analysis, enabling it to handle more complex tasks beyond simple chat conversations. These include long-text summarization, image analysis, logical reasoning, and programming assistance, among others. Compared to some single-purpose Q&A bots, Claude functions more like an intelligent tool equipped with reasoning logic and scalable features.

Comments

Comments

0
0/500 Characters

No comments yet

Be the first to comment

Open Source Project

Explore, learn and contribute to open source AI projects to advance the development of artificial intelligence technology

View All