Reference & FAQ / Kernel API

Kernel API

LingXizhi's AI capabilities are provided by a local Rust kernel. The kernel listens on 127.0.0.1:3721 by default — bound to the local loopback address only, never exposed externally; if the port is occupied it auto-increments (up to 10 attempts) and writes the result back to configuration. At startup the kernel prints the actual port and the access token, and the IDE calls the following HTTP endpoints with that token.

Health checkCheck version
curl http://127.0.0.1:3721/health

Health & Metadata

MethodPathDescription
GET/healthHealth check (/api/health is equivalent)
GET/api/versionKernel version
GET/api/modelsCurrently available model list
GET/api/capabilitiesKernel capability declaration

Chat & Agent

MethodPathDescription
POST/api/chatSingle-turn chat
POST/api/chat/streamStreaming chat (SSE)
POST/api/visionMultimodal chat (image input)
POST/api/agent/chatAgent chat (SSE)
POST/api/agent/inline-editInline edit (SSE, Ctrl + K)
POST/api/agent/confirmConfirmation receipt for dangerous operations
POST/api/react/streamReAct engine streaming execution
POST/api/effort/set · GET /api/effort/getSet / query thinking effort

RUSH Deep Tasks

MethodPathDescription
POST/api/rush/startStart a RUSH task (SSE pushes stage events)
POST/api/rush/pausePause a task
POST/api/rush/resumeResume a task
POST/api/rush/stopTerminate a task

Completion & Language Services

MethodPathDescription
POST/api/fim/completeFIM smart completion (Fill-In-the-Middle)
POST/api/lsp/completionsLSP completions
POST/api/lsp/diagnosticsDiagnostics
POST/api/lsp/definitionGo to definition
POST/api/lsp/hoverHover hints
GET/api/lsp/healthLanguage service health status

Code Graph & Tasks

MethodPathDescription
POST/api/indexBuild / update the project index
POST/api/index/statusIndex progress query
POST/api/searchSemantic code search
POST/api/task/create · /api/task/list · /api/task/statusBackground task creation / listing / status update
POST/api/memory/store · /api/memory/searchPersistent memory write / retrieval
GET/api/mcp/list-servers · POST /api/mcp/call-toolMCP server list / tool call
POST/api/fs/read · /api/fs/write · /api/fs/exec · /api/fs/searchFile read/write / command execution / content search
POST/api/terminal/stream · /api/terminal/cancelTerminal output stream / cancel command
GET/ws · /ws/{session_id}WebSocket event channel

Local Proxy /local/*

Login-state-related cloud APIs are proxied uniformly by the kernel: /local/auth/* (login, register, send verification code, reset password), /local/plans, /local/llm-models and /local/llm-vendors are public endpoints; /local/subscription, /local/usage, /local/keys, /local/user-llm-config, /local/rush/* and others are protected by the License gate.

!

Local calls only: the kernel listens on 127.0.0.1 only — do not expose it to the LAN via firewall rules or port forwarding, and do not kill the kernel process manually; AI chat, completion and quota queries would all break. Restart the IDE to recover.

First troubleshooting step: when AI features stop responding, run curl http://127.0.0.1:3721/health to check whether the kernel is ready; connection failures are usually fixed by restarting the IDE. See the FAQ for more issues.

Next Steps