[{"data":1,"prerenderedAt":814},["ShallowReactive",2],{"doc-\u002Fen\u002Fdocs\u002Freference\u002Fkernel-api":3,"doc-surround-\u002Fen\u002Fdocs\u002Freference\u002Fkernel-api":717,"doc-nav-en":722},{"id":4,"title":5,"body":6,"description":707,"extension":708,"meta":709,"navigation":710,"order":711,"path":712,"section":713,"seo":714,"stem":715,"__hash__":716},"docs_en\u002Fen\u002Fdocs\u002F04.reference\u002F17.kernel-api.md","Kernel API",{"type":7,"value":8,"toc":696},"minimark",[9,13,31,70,75,151,155,279,283,345,349,435,439,590,597,632,646,665,669,692],[10,11,5],"h1",{"id":12},"kernel-api",[14,15,16,17,21,22,26,27,30],"p",{},"LingXizhi's AI capabilities are provided by a local ",[18,19,20],"strong",{},"Rust kernel",". The kernel listens on ",[23,24,25],"code",{},"127.0.0.1:3721"," by default — ",[18,28,29],{},"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.",[32,33,34,57],"code-group",{},[35,36,42],"pre",{"className":37,"code":38,"filename":39,"language":40,"meta":41,"style":41},"language-bash shiki shiki-themes tokyo-night","curl http:\u002F\u002F127.0.0.1:3721\u002Fhealth\n","Health check","bash","",[23,43,44],{"__ignoreMap":41},[45,46,49,53],"span",{"class":47,"line":48},"line",1,[45,50,52],{"class":51},"sE3pS","curl",[45,54,56],{"class":55},"sPY7s"," http:\u002F\u002F127.0.0.1:3721\u002Fhealth\n",[35,58,61],{"className":37,"code":59,"filename":60,"language":40,"meta":41,"style":41},"curl http:\u002F\u002F127.0.0.1:3721\u002Fapi\u002Fversion\n","Check version",[23,62,63],{"__ignoreMap":41},[45,64,65,67],{"class":47,"line":48},[45,66,52],{"class":51},[45,68,69],{"class":55}," http:\u002F\u002F127.0.0.1:3721\u002Fapi\u002Fversion\n",[71,72,74],"h2",{"id":73},"health-metadata","Health & Metadata",[76,77,78,94],"table",{},[79,80,81],"thead",{},[82,83,84,88,91],"tr",{},[85,86,87],"th",{},"Method",[85,89,90],{},"Path",[85,92,93],{},"Description",[95,96,97,115,127,139],"tbody",{},[82,98,99,103,108],{},[100,101,102],"td",{},"GET",[100,104,105],{},[23,106,107],{},"\u002Fhealth",[100,109,110,111,114],{},"Health check (",[23,112,113],{},"\u002Fapi\u002Fhealth"," is equivalent)",[82,116,117,119,124],{},[100,118,102],{},[100,120,121],{},[23,122,123],{},"\u002Fapi\u002Fversion",[100,125,126],{},"Kernel version",[82,128,129,131,136],{},[100,130,102],{},[100,132,133],{},[23,134,135],{},"\u002Fapi\u002Fmodels",[100,137,138],{},"Currently available model list",[82,140,141,143,148],{},[100,142,102],{},[100,144,145],{},[23,146,147],{},"\u002Fapi\u002Fcapabilities",[100,149,150],{},"Kernel capability declaration",[71,152,154],{"id":153},"chat-agent","Chat & Agent",[76,156,157,167],{},[79,158,159],{},[82,160,161,163,165],{},[85,162,87],{},[85,164,90],{},[85,166,93],{},[95,168,169,182,194,206,218,239,251,263],{},[82,170,171,174,179],{},[100,172,173],{},"POST",[100,175,176],{},[23,177,178],{},"\u002Fapi\u002Fchat",[100,180,181],{},"Single-turn chat",[82,183,184,186,191],{},[100,185,173],{},[100,187,188],{},[23,189,190],{},"\u002Fapi\u002Fchat\u002Fstream",[100,192,193],{},"Streaming chat (SSE)",[82,195,196,198,203],{},[100,197,173],{},[100,199,200],{},[23,201,202],{},"\u002Fapi\u002Fvision",[100,204,205],{},"Multimodal chat (image input)",[82,207,208,210,215],{},[100,209,173],{},[100,211,212],{},[23,213,214],{},"\u002Fapi\u002Fagent\u002Fchat",[100,216,217],{},"Agent chat (SSE)",[82,219,220,222,227],{},[100,221,173],{},[100,223,224],{},[23,225,226],{},"\u002Fapi\u002Fagent\u002Finline-edit",[100,228,229,230,234,235,238],{},"Inline edit (SSE, ",[231,232,233],"kbd",{},"Ctrl"," + ",[231,236,237],{},"K",")",[82,240,241,243,248],{},[100,242,173],{},[100,244,245],{},[23,246,247],{},"\u002Fapi\u002Fagent\u002Fconfirm",[100,249,250],{},"Confirmation receipt for dangerous operations",[82,252,253,255,260],{},[100,254,173],{},[100,256,257],{},[23,258,259],{},"\u002Fapi\u002Freact\u002Fstream",[100,261,262],{},"ReAct engine streaming execution",[82,264,265,267,276],{},[100,266,173],{},[100,268,269,272,273],{},[23,270,271],{},"\u002Fapi\u002Feffort\u002Fset"," · GET ",[23,274,275],{},"\u002Fapi\u002Feffort\u002Fget",[100,277,278],{},"Set \u002F query thinking effort",[71,280,282],{"id":281},"rush-deep-tasks","RUSH Deep Tasks",[76,284,285,295],{},[79,286,287],{},[82,288,289,291,293],{},[85,290,87],{},[85,292,90],{},[85,294,93],{},[95,296,297,309,321,333],{},[82,298,299,301,306],{},[100,300,173],{},[100,302,303],{},[23,304,305],{},"\u002Fapi\u002Frush\u002Fstart",[100,307,308],{},"Start a RUSH task (SSE pushes stage events)",[82,310,311,313,318],{},[100,312,173],{},[100,314,315],{},[23,316,317],{},"\u002Fapi\u002Frush\u002Fpause",[100,319,320],{},"Pause a task",[82,322,323,325,330],{},[100,324,173],{},[100,326,327],{},[23,328,329],{},"\u002Fapi\u002Frush\u002Fresume",[100,331,332],{},"Resume a task",[82,334,335,337,342],{},[100,336,173],{},[100,338,339],{},[23,340,341],{},"\u002Fapi\u002Frush\u002Fstop",[100,343,344],{},"Terminate a task",[71,346,348],{"id":347},"completion-language-services","Completion & Language Services",[76,350,351,361],{},[79,352,353],{},[82,354,355,357,359],{},[85,356,87],{},[85,358,90],{},[85,360,93],{},[95,362,363,375,387,399,411,423],{},[82,364,365,367,372],{},[100,366,173],{},[100,368,369],{},[23,370,371],{},"\u002Fapi\u002Ffim\u002Fcomplete",[100,373,374],{},"FIM smart completion (Fill-In-the-Middle)",[82,376,377,379,384],{},[100,378,173],{},[100,380,381],{},[23,382,383],{},"\u002Fapi\u002Flsp\u002Fcompletions",[100,385,386],{},"LSP completions",[82,388,389,391,396],{},[100,390,173],{},[100,392,393],{},[23,394,395],{},"\u002Fapi\u002Flsp\u002Fdiagnostics",[100,397,398],{},"Diagnostics",[82,400,401,403,408],{},[100,402,173],{},[100,404,405],{},[23,406,407],{},"\u002Fapi\u002Flsp\u002Fdefinition",[100,409,410],{},"Go to definition",[82,412,413,415,420],{},[100,414,173],{},[100,416,417],{},[23,418,419],{},"\u002Fapi\u002Flsp\u002Fhover",[100,421,422],{},"Hover hints",[82,424,425,427,432],{},[100,426,102],{},[100,428,429],{},[23,430,431],{},"\u002Fapi\u002Flsp\u002Fhealth",[100,433,434],{},"Language service health status",[71,436,438],{"id":437},"code-graph-tasks","Code Graph & Tasks",[76,440,441,451],{},[79,442,443],{},[82,444,445,447,449],{},[85,446,87],{},[85,448,90],{},[85,450,93],{},[95,452,453,465,477,489,508,523,539,560,575],{},[82,454,455,457,462],{},[100,456,173],{},[100,458,459],{},[23,460,461],{},"\u002Fapi\u002Findex",[100,463,464],{},"Build \u002F update the project index",[82,466,467,469,474],{},[100,468,173],{},[100,470,471],{},[23,472,473],{},"\u002Fapi\u002Findex\u002Fstatus",[100,475,476],{},"Index progress query",[82,478,479,481,486],{},[100,480,173],{},[100,482,483],{},[23,484,485],{},"\u002Fapi\u002Fsearch",[100,487,488],{},"Semantic code search",[82,490,491,493,505],{},[100,492,173],{},[100,494,495,498,499,498,502],{},[23,496,497],{},"\u002Fapi\u002Ftask\u002Fcreate"," · ",[23,500,501],{},"\u002Fapi\u002Ftask\u002Flist",[23,503,504],{},"\u002Fapi\u002Ftask\u002Fstatus",[100,506,507],{},"Background task creation \u002F listing \u002F status update",[82,509,510,512,520],{},[100,511,173],{},[100,513,514,498,517],{},[23,515,516],{},"\u002Fapi\u002Fmemory\u002Fstore",[23,518,519],{},"\u002Fapi\u002Fmemory\u002Fsearch",[100,521,522],{},"Persistent memory write \u002F retrieval",[82,524,525,527,536],{},[100,526,102],{},[100,528,529,532,533],{},[23,530,531],{},"\u002Fapi\u002Fmcp\u002Flist-servers"," · POST ",[23,534,535],{},"\u002Fapi\u002Fmcp\u002Fcall-tool",[100,537,538],{},"MCP server list \u002F tool call",[82,540,541,543,557],{},[100,542,173],{},[100,544,545,498,548,498,551,498,554],{},[23,546,547],{},"\u002Fapi\u002Ffs\u002Fread",[23,549,550],{},"\u002Fapi\u002Ffs\u002Fwrite",[23,552,553],{},"\u002Fapi\u002Ffs\u002Fexec",[23,555,556],{},"\u002Fapi\u002Ffs\u002Fsearch",[100,558,559],{},"File read\u002Fwrite \u002F command execution \u002F content search",[82,561,562,564,572],{},[100,563,173],{},[100,565,566,498,569],{},[23,567,568],{},"\u002Fapi\u002Fterminal\u002Fstream",[23,570,571],{},"\u002Fapi\u002Fterminal\u002Fcancel",[100,573,574],{},"Terminal output stream \u002F cancel command",[82,576,577,579,587],{},[100,578,102],{},[100,580,581,498,584],{},[23,582,583],{},"\u002Fws",[23,585,586],{},"\u002Fws\u002F{session_id}",[100,588,589],{},"WebSocket event channel",[71,591,593,594],{"id":592},"local-proxy-local","Local Proxy ",[23,595,596],{},"\u002Flocal\u002F*",[14,598,599,600,603,604,607,608,611,612,615,616,607,619,607,622,607,625,607,628,631],{},"Login-state-related cloud APIs are proxied uniformly by the kernel: ",[23,601,602],{},"\u002Flocal\u002Fauth\u002F*"," (login, register, send verification code, reset password), ",[23,605,606],{},"\u002Flocal\u002Fplans",", ",[23,609,610],{},"\u002Flocal\u002Fllm-models"," and ",[23,613,614],{},"\u002Flocal\u002Fllm-vendors"," are public endpoints; ",[23,617,618],{},"\u002Flocal\u002Fsubscription",[23,620,621],{},"\u002Flocal\u002Fusage",[23,623,624],{},"\u002Flocal\u002Fkeys",[23,626,627],{},"\u002Flocal\u002Fuser-llm-config",[23,629,630],{},"\u002Flocal\u002Frush\u002F*"," and others are protected by the License gate.",[633,634,636],"callout",{"type":635},"warn",[14,637,638,641,642,645],{},[18,639,640],{},"Local calls only",": the kernel listens on ",[23,643,644],{},"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.",[633,647,649],{"type":648},"tip",[14,650,651,654,655,658,659,664],{},[18,652,653],{},"First troubleshooting step",": when AI features stop responding, run ",[23,656,657],{},"curl http:\u002F\u002F127.0.0.1:3721\u002Fhealth"," to check whether the kernel is ready; connection failures are usually fixed by restarting the IDE. See the ",[660,661,663],"a",{"href":662},"\u002Fen\u002Fdocs\u002Freference\u002Ffaq","FAQ"," for more issues.",[71,666,668],{"id":667},"next-steps","Next Steps",[670,671,672,681],"ul",{},[673,674,675,676,680],"li",{},"Tune kernel parameters like port and timeouts: ",[660,677,679],{"href":678},"\u002Fen\u002Fdocs\u002Freference\u002Fconfiguration","Configuration",".",[673,682,683,684,607,688,680],{},"The features behind the endpoints: ",[660,685,687],{"href":686},"\u002Fen\u002Fdocs\u002Fguides\u002Fai-chat","AI Chat Guide",[660,689,691],{"href":690},"\u002Fen\u002Fdocs\u002Fguides\u002Frush","RUSH Guide",[693,694,695],"style",{},"html pre.shiki code .sE3pS, html code.shiki .sE3pS{--shiki-default:#C0CAF5}html pre.shiki code .sPY7s, html code.shiki .sPY7s{--shiki-default:#9ECE6A}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":41,"searchDepth":697,"depth":697,"links":698},2,[699,700,701,702,703,704,706],{"id":73,"depth":697,"text":74},{"id":153,"depth":697,"text":154},{"id":281,"depth":697,"text":282},{"id":347,"depth":697,"text":348},{"id":437,"depth":697,"text":438},{"id":592,"depth":697,"text":705},"Local Proxy \u002Flocal\u002F*",{"id":667,"depth":697,"text":668},"Summary of the main HTTP endpoints of the LingXizhi local kernel on port 3721 — health check, chat, Agent, RUSH, FIM completion and code graph","md",{},true,17,"\u002Fen\u002Fdocs\u002Freference\u002Fkernel-api","Reference & FAQ",{"title":5,"description":707},"en\u002Fdocs\u002F04.reference\u002F17.kernel-api","laaDzOZSOPfGRXf2A-mL6isMIhb2Z3pyZ5LGvZ-pk6M",[718,720],{"title":679,"path":678,"stem":719,"children":-1},"en\u002Fdocs\u002F04.reference\u002F16.configuration",{"title":663,"path":662,"stem":721,"children":-1},"en\u002Fdocs\u002F04.reference\u002F18.faq",[723],{"title":724,"path":725,"stem":726,"children":727,"page":754},"En","\u002Fen","en",[728],{"title":729,"path":730,"stem":731,"children":732,"page":754},"Docs","\u002Fen\u002Fdocs","en\u002Fdocs",[733,755,786,803],{"title":734,"path":735,"stem":736,"children":737,"page":754},"Getting Started","\u002Fen\u002Fdocs\u002Fgetting-started","en\u002Fdocs\u002F01.getting-started",[738,742,746,750],{"title":739,"path":740,"stem":741},"Installation & Download","\u002Fen\u002Fdocs\u002Fgetting-started\u002Finstallation","en\u002Fdocs\u002F01.getting-started\u002F01.installation",{"title":743,"path":744,"stem":745},"Register & Sign In","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fregister-login","en\u002Fdocs\u002F01.getting-started\u002F02.register-login",{"title":747,"path":748,"stem":749},"First-Time Setup","\u002Fen\u002Fdocs\u002Fgetting-started\u002Ffirst-setup","en\u002Fdocs\u002F01.getting-started\u002F03.first-setup",{"title":751,"path":752,"stem":753},"Migrate from VS Code","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fmigrate-from-vscode","en\u002Fdocs\u002F01.getting-started\u002F04.migrate-from-vscode",false,{"title":756,"path":757,"stem":758,"children":759,"page":754},"Feature Guides","\u002Fen\u002Fdocs\u002Fguides","en\u002Fdocs\u002F02.guides",[760,763,766,770,774,778,782],{"title":761,"path":686,"stem":762},"AI Chat & Inline Edit","en\u002Fdocs\u002F02.guides\u002F05.ai-chat",{"title":764,"path":690,"stem":765},"RUSH Deep Task","en\u002Fdocs\u002F02.guides\u002F06.rush",{"title":767,"path":768,"stem":769},"FIM Code Completion","\u002Fen\u002Fdocs\u002Fguides\u002Ffim-completion","en\u002Fdocs\u002F02.guides\u002F07.fim-completion",{"title":771,"path":772,"stem":773},"Semantic Code Graph","\u002Fen\u002Fdocs\u002Fguides\u002Fcode-graph","en\u002Fdocs\u002F02.guides\u002F08.code-graph",{"title":775,"path":776,"stem":777},"MCP Tools & Marketplace","\u002Fen\u002Fdocs\u002Fguides\u002Fmcp","en\u002Fdocs\u002F02.guides\u002F09.mcp",{"title":779,"path":780,"stem":781},"Debugging & DAP","\u002Fen\u002Fdocs\u002Fguides\u002Fdebugging","en\u002Fdocs\u002F02.guides\u002F10.debugging",{"title":783,"path":784,"stem":785},"Integrated Terminal","\u002Fen\u002Fdocs\u002Fguides\u002Fterminal","en\u002Fdocs\u002F02.guides\u002F11.terminal",{"title":787,"path":788,"stem":789,"children":790,"page":754},"Models & Billing","\u002Fen\u002Fdocs\u002Fmodels-billing","en\u002Fdocs\u002F03.models-billing",[791,795,799],{"title":792,"path":793,"stem":794},"Supported Models","\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fmodels","en\u002Fdocs\u002F03.models-billing\u002F12.models",{"title":796,"path":797,"stem":798},"Plans & Quota","\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fplans-quota","en\u002Fdocs\u002F03.models-billing\u002F13.plans-quota",{"title":800,"path":801,"stem":802},"BYOK (Bring Your Own Key)","\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fbyok","en\u002Fdocs\u002F03.models-billing\u002F14.byok",{"title":713,"path":804,"stem":805,"children":806,"page":754},"\u002Fen\u002Fdocs\u002Freference","en\u002Fdocs\u002F04.reference",[807,811,812,813],{"title":808,"path":809,"stem":810},"Keyboard Shortcuts","\u002Fen\u002Fdocs\u002Freference\u002Fshortcuts","en\u002Fdocs\u002F04.reference\u002F15.shortcuts",{"title":679,"path":678,"stem":719},{"title":5,"path":712,"stem":715},{"title":663,"path":662,"stem":721},1786077825728]