Skip to content
Use Fungi

Use Fungi in your editor (ACP)

Connect Zed, Neovim, or another ACP client to Fungi, choose a model, and resume local conversations.

Use Fungi from your editor’s Agent panel. The Agent Client Protocol (ACP) connects the editor to Fungi running on your machine. Your project files and saved conversations use the same local service as the Fungi terminal.

You need Node 22.13 or newer, the Fungi CLI, a local project folder, and Zed with custom ACP agent support. Fungi models require a signed-in account and a funded Team.

Install the CLI’s npm release, then check that your terminal finds it:

TERMINAL
npm i -g @fungi.computer/cli
fungi --version
fungi acp --help

From your project folder, sign in:

TERMINAL
fungi login --provider fungi
fungi status

Complete browser sign-in, approve Fungi’s access, and choose the Team that pays for models. With one current Team, selection is automatic. fungi status shows the saved login and selected Team. See Sign-in and your account for account help. Keep credentials out of editor settings.

Open Zed’s user settings and add this entry, merging it with any existing agent_servers entries:

JSON
{
"agent_servers": {
"fungi": {
"type": "custom",
"command": "fungi",
"args": ["acp"],
"env": {}
}
}
}

Open your project folder in Zed. Open the Agent panel, then select fungi from the new-thread menu. Zed supplies the project directory to Fungi. The Zed external-agent guide also covers custom agents and importing threads.

A new Session uses the Local Agent’s default model. To choose a specific model for your editor conversation, leave the thread idle and open a terminal in the same project folder:

TERMINAL
fungi sessions list

Find that conversation in the list, then run fungi sessions resume <session-id>, replacing <session-id> with its ID. In the Fungi terminal, enter /model, choose Fungi, then Luna (@fungi/luna) or another available model. Confirm the model shown in the terminal, then use /exit to close the terminal client. Continue the same thread in Zed.

The choice belongs to that Session. Signing in does not change an existing choice, and a new thread does not inherit another thread’s override. Use agent model clears the override. Choose models in the Fungi terminal; the ACP connection does not expose a model picker. For another provider, configure its login in Fungi and select its model in the same Session.

In the Zed thread, send:

TEXT
Do not use tools. Reply exactly ACP_LUNA_OK.

The reply streams into the Agent panel. Wait for the turn to finish before sending another task.

Use Zed’s Stop control while Fungi is working. Wait for the turn to stop; closing a panel or editor only disconnects that client and can leave accepted work running. Cancellation does not undo file changes already made. Partial text from an interrupted reply may disappear when you reopen the conversation; history restores saved messages.

Reopen the Fungi thread from Zed’s history to load its saved messages. To bring in a Session started in the terminal, open Thread History, choose Import Threads, and select Fungi. Use the same project folder. Importing or reopening history does not send another model prompt. Reload Agent in the thread menu reconnects the agent and restores the conversation.

You can also run fungi resume in that project to choose a saved Session in the terminal. fungi stop stops the shared local service for all its clients; saved Sessions remain on disk.

Agentic.nvim connects Neovim to Fungi through ACP. You need Neovim 0.11 or newer, Git, and the Fungi CLI’s supported Linux environment. The steps below use the Agentic.nvim revision verified with Neovim 0.12.5 on Linux.

Install the Fungi CLI, then check both executables:

TERMINAL
nvim --version
fungi --version
fungi acp --help

For a standard Neovim configuration, install Agentic.nvim as a native package:

TERMINAL
data_home="${XDG_DATA_HOME:-$HOME/.local/share}"
plugin_dir="$data_home/nvim/site/pack/plugins/start/agentic.nvim"
git clone https://github.com/carlos-algms/agentic.nvim "$plugin_dir"
git -C "$plugin_dir" checkout e280deec82cfe642bba2c0d0157d320b706c094a

This pins the plugin to the verified revision. If you already manage it with a plugin manager, keep that installation and use the same revision there; do not install a second copy.

In a terminal opened in your project folder, run:

TERMINAL
fungi login --provider fungi
fungi status

Complete browser sign-in, approve access, and choose your funded Team. Check that fungi status shows the Team you want. Start Neovim from the same OS account and home directory so it can use that saved login. No credentials belong in the Lua configuration.

Add this to your init.lua, or your plugin manager’s configuration callback:

LUA
require("agentic").setup({
provider = "fungi",
acp_providers = {
fungi = {
name = "Fungi",
command = "fungi",
args = { "acp" },
},
},
})

If Neovim cannot find Fungi, replace "fungi" in command with the executable’s absolute path. In Neovim, :echo executable('fungi') returns 1 when it is on Neovim’s PATH. Node must also be available there.

Start Neovim in your project folder and open the chat:

VIM
:lua require("agentic").open()

Before sending a prompt, use the model selection steps above to select Fungi → Luna (@fungi/luna) for this Session in the Fungi terminal. Confirm the model shown, then use /exit to return to Neovim. Agentic’s ACP connection does not offer Fungi’s model picker.

Write this in Agentic’s input pane and press Ctrl+S to submit:

TEXT
Do not use tools. Reply exactly ACP_NEOVIM_OK.

The reply streams into the chat pane. Wait for completion before sending another prompt.

To cancel a running turn:

VIM
:lua require("agentic").stop_generation()

Wait for Generation stopped by the user request. Closing Neovim only disconnects the client; it can leave accepted work running. Cancellation does not undo changes already made.

To reopen a conversation, including after restarting Neovim in the same project, open the history picker:

VIM
:lua require("agentic").restore_session()

Select the saved Session. Its saved user prompts and completed assistant replies return without another model call. Interrupted partial assistant text may not be saved: the live text visible before cancellation can disappear on restore. Use the same project directory, OS account, and home directory to find the same history. If a history request omits the project directory, set the provider’s arguments explicitly:

LUA
args = { "acp", "-C", "/absolute/path/to/project" },

The real-client proof uses Neovim 0.12.5 and Agentic.nvim revision e280deec82cf, with Luna streaming, cancellation, and saved history restored after restarting Neovim.

Configure a custom agent with executable fungi, arguments ["acp"], and stdio transport. Run fungi login --provider fungi in a terminal first. A client with terminal-auth support can invoke fungi acp login for sign-in.

Use the same OS account and home directory as your terminal so the editor finds your saved login. The client supplies an absolute project directory when it creates or loads a Session. If its history browser omits the directory, configure arguments ["acp", "-C", "/absolute/path/to/project"], replacing the path with your project folder.

Streaming, cancellation, and Session listing/loading use ACP; the client’s UI determines where those controls appear. Fungi’s Local ACP connection accepts one project root. Leave client-supplied MCP servers and additional directories empty. Run fungi acp through the client: it waits for protocol input rather than opening a terminal conversation.

Run fungi --version and fungi acp --help in a terminal. If those work but Zed cannot launch it, set command to the absolute path of your installed fungi executable. GUI editors can have a different PATH from your shell. Check that the editor can also find Node, then reload the agent.

Run fungi status and fungi doctor from the project folder. Check the selected Team, its credit, and the Session’s model. Sign in again if Fungi requests it. An unavailable model or login error does not silently switch providers. A Zed model-provider key does not configure Fungi’s login.

runtime:rejected or “Tool runtime failed”

Section titled “runtime:rejected or “Tool runtime failed””

This can mean local tool setup failed before inference. Older Fungi builds can hit this when a project discovers a large skills catalog. Fungi bounds those discovery summaries while retaining the skills prompt.

Update the CLI with the install command above. After active work finishes, run fungi stop, then reload the agent in Zed to start the updated service. Keep your skills and Session history. If the error persists, run fungi doctor and inspect the affected Session with fungi sessions show <session-id> --errors.

Check that the editor opens the same project folder under the same OS account. Import the Fungi threads or use Reload Agent. Reconnecting does not cancel active work. Use fungi sessions status <session-id> to inspect its current state before retrying a task that changes files.

For protocol diagnostics, run dev: open acp logs from Zed’s Command Palette. When reporting a problem, include CLI/editor versions and the error message; remove credentials and private conversation content from any logs you share.

An ACP or CLI client connecting directly to a Team-hosted Agent with a Team key needs agent.read, agent.send and agent.manage for the selected Agents. agent.send sends messages into existing Sessions; starting, stopping or configuring Sessions and running Session extension commands requires agent.manage. A key restricted to selected Agents keeps that restriction for extensions. The local fungi acp setup above uses your local service and signed-in model access.