Reference & FAQ / Kernel API

Kernel API

LingXizhi's AI capabilities use a local Rust kernel. It defaults to loopback binding, with optional LAN access; ports are dynamic, so read the actual connection information. The Bash examples below require LINGXIZHI_API_BASE to contain the actual kernel address including its scheme. Supply the access token where required. Never share tokens or expose the kernel publicly.

Health checkCheck version
curl "${LINGXIZHI_API_BASE:?Set the actual kernel address}/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
POST/api/rush/ask-user/respondRespond to plan approval or task questions

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/index/symbols/buildTrigger symbol-index full rebuild in the background (returns task_id immediately, idempotent)
GET/api/index/symbols/statusSymbol index counts (symbols / references / relations) and build state
GET/api/index/symbols/callersQuery who calls a symbol
GET/api/index/symbols/calleesQuery who a symbol calls
GET/api/index/symbols/implementationsQuery indexed implementations of an interface / trait
GET/api/index/symbols/dependenciesQuery a module's downstream dependencies
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 · GET /api/mcp/list-toolsMCP server / tool list
POST/api/mcp/call-tool · POST /api/mcp/reloadTool call / reload MCP configuration
POST/api/dap/start · /api/dap/stopStart / stop a debug session
GET/api/dap/status · /api/dap/breakpointsDebug status / breakpoint query
POST/api/dap/step · /api/dap/stack · /api/dap/scopes · /api/dap/variables · /api/dap/evaluateDebug control and variable queries
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

DAP debugging uses /api/dap/*; /api/debug/* belongs to AI debug mode and is not an alias for DAP endpoints. Install debugging runtimes and adapters yourself.

Symbol-graph results cover indexed relationships only. Query endpoints carry project_root in the query string (relation queries also take symbol); each row of the returned relations array contains source/target symbol, relation type (calls / implements / depends_on, etc.), and the source file line. See Semantic Code Graph.

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.

!

Access control: default loopback binding reduces network exposure. For LAN mode, check binding, authentication, allowed origins and firewall rules; do not forward it to the public internet. Stopping the kernel interrupts related features; check process and connection state when recovering.

✦

First troubleshooting step: call /health at the actual connection address, then inspect the kernel process, port, credentials and logs. Restarting does not guarantee a fix for dependencies or configuration errors. See the FAQ.

Next Steps

Hook automation

v1.0.0 · web-2026