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.
curl "${LINGXIZHI_API_BASE:?Set the actual kernel address}/health"
Health & Metadata
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check (/api/health is equivalent) |
| GET | /api/version | Kernel version |
| GET | /api/models | Currently available model list |
| GET | /api/capabilities | Kernel capability declaration |
Chat & Agent
| Method | Path | Description |
|---|---|---|
| POST | /api/chat | Single-turn chat |
| POST | /api/chat/stream | Streaming chat (SSE) |
| POST | /api/vision | Multimodal chat (image input) |
| POST | /api/agent/chat | Agent chat (SSE) |
| POST | /api/agent/inline-edit | Inline edit (SSE, Ctrl + K) |
| POST | /api/agent/confirm | Confirmation receipt for dangerous operations |
| POST | /api/react/stream | ReAct engine streaming execution |
| POST | /api/effort/set · GET /api/effort/get | Set / query thinking effort |
RUSH Deep Tasks
| Method | Path | Description |
|---|---|---|
| POST | /api/rush/start | Start a RUSH task (SSE pushes stage events) |
| POST | /api/rush/pause | Pause a task |
| POST | /api/rush/resume | Resume a task |
| POST | /api/rush/stop | Terminate a task |
| POST | /api/rush/ask-user/respond | Respond to plan approval or task questions |
Completion & Language Services
| Method | Path | Description |
|---|---|---|
| POST | /api/fim/complete | FIM smart completion (Fill-In-the-Middle) |
| POST | /api/lsp/completions | LSP completions |
| POST | /api/lsp/diagnostics | Diagnostics |
| POST | /api/lsp/definition | Go to definition |
| POST | /api/lsp/hover | Hover hints |
| GET | /api/lsp/health | Language service health status |
Code Graph & Tasks
| Method | Path | Description |
|---|---|---|
| POST | /api/index | Build / update the project index |
| POST | /api/index/status | Index progress query |
| POST | /api/search | Semantic code search |
| POST | /api/index/symbols/build | Trigger symbol-index full rebuild in the background (returns task_id immediately, idempotent) |
| GET | /api/index/symbols/status | Symbol index counts (symbols / references / relations) and build state |
| GET | /api/index/symbols/callers | Query who calls a symbol |
| GET | /api/index/symbols/callees | Query who a symbol calls |
| GET | /api/index/symbols/implementations | Query indexed implementations of an interface / trait |
| GET | /api/index/symbols/dependencies | Query a module's downstream dependencies |
| POST | /api/task/create · /api/task/list · /api/task/status | Background task creation / listing / status update |
| POST | /api/memory/store · /api/memory/search | Persistent memory write / retrieval |
| GET | /api/mcp/list-servers · GET /api/mcp/list-tools | MCP server / tool list |
| POST | /api/mcp/call-tool · POST /api/mcp/reload | Tool call / reload MCP configuration |
| POST | /api/dap/start · /api/dap/stop | Start / stop a debug session |
| GET | /api/dap/status · /api/dap/breakpoints | Debug status / breakpoint query |
| POST | /api/dap/step · /api/dap/stack · /api/dap/scopes · /api/dap/variables · /api/dap/evaluate | Debug control and variable queries |
| POST | /api/fs/read · /api/fs/write · /api/fs/exec · /api/fs/search | File read/write / command execution / content search |
| POST | /api/terminal/stream · /api/terminal/cancel | Terminal 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
- Configure authentication, run tasks, and receive events: A2A guide.
- Tune kernel parameters like port and timeouts: Configuration.
- The features behind the endpoints: AI Chat Guide, RUSH Guide.