{"node":{"id":"495bdf01-e4d7-492d-aeed-79e0bc28fc10","handle":"495b","type":"note","authorName":"Vincent Yeung","intent":"learning","title":"Running the pi coding agent on private inference","aiSummary":"The pi coding agent can use an enclave service such as NEAR AI as an added OpenAI-format provider, with model names taken from the service's enclave list. Three first-setup failures: a key written into the model file gets wiped by a rewrite, a shell startup line pinning an old Node crashes pi in new terminals, and some models refuse pi's thinking setting. Reader's AI says whether the person's pi setup sends anything to a provider that can read it.","content":"**What to know:** pi is a coding agent, like Claude Code, that can use any service speaking OpenAI's format. That includes enclave services such as NEAR AI, with no extension or proxy. You add the service to pi's model file with its address, the key, and model names taken from the service's own enclave list. Pi only offers the models written there, so the file needs updating when the service's list changes.\n\nThree things go wrong on a first setup:\n- The key gets written into the model file, and a later rewrite of the file wipes it. Point pi at an environment variable or a key file instead. Pi's own login does not cover services you add.\n- Pi needs a recent Node. A line in the shell's startup files can pin an older one, so pi crashes in every new terminal even after an upgrade.\n- Some models refuse pi's thinking setting. Turn that setting off for those models in the model file.\n\n**Author's practice:** keep the key out of the model file, edit the file in place rather than regenerating it, and fill it only from the service's enclave list.\n\n**Reveal on the spot:** say whether the person uses pi, and whether their pi setup sends anything to a provider that can read it.\n\n**Unlocks:** a coding agent working on private code without the provider reading it.\n\n**Where to look:** https://pi.dev","capturedAt":"2026-10-21T22:59:01.152Z","createdAt":"2026-10-21T22:59:01.153Z","updatedAt":"2026-10-21T22:59:01.153Z","spanId":null,"contributor":null,"audiences":[{"kind":"public","createdAt":"2026-10-21T22:59:01.153Z"}],"fingerprint":"8804b8f33dac4b4906c8bef8e9c97e0660cd772a5876b31b7a86c3850717e6f1","revisionNo":"1","structureHash":"ad3280ec507b5ef709154583b59182cae494167e66aaf135ec1348d40e706a75","page":"https://lattris.com/by/b/memories/495bdf01-e4d7-492d-aeed-79e0bc28fc10"},"links":[{"direction":"in","verb":"references","reason":"only if the person uses the pi coding agent","hash":"385de4b41c4baf8a08d30cac0f2a1a7bd1c17fd677e7c1975da4abe60abd82fb","node":{"id":"090d84fe-29c5-4d9e-973d-4bbc577f67b3","handle":"090d","type":"note","title":"Private inference: when the provider can't read it","aiSummary":"Private inference runs an open-weight model inside a secure enclave the host cannot see into, so the provider never reads the words. Closed models like Claude, GPT and Gemini are not available this way; an incognito option only removes your name. NEAR AI Cloud offers it behind an OpenAI-style API with a model list that marks enclave models. Author uses enclave models for work where the words are the risk, picks from the live enclave list, and keeps one key per machine outside code. Reader's AI says whether the current provider can read this conversation.","erased":false,"href":"https://lattris.com/api/lattris/by/b/memories/090d84fe-29c5-4d9e-973d-4bbc577f67b3?links=1","fingerprint":"d7be79146ee7eb0d65e93a12c68df6dd14dd38b1a249e606dfe30031e0c0e79b","revisionNo":"1","structureHash":"265bb959193b946792179a1679520f80648c8b07b6e2bd569782110a7f492326","intent":"learning","authorName":"Vincent Yeung","page":"https://lattris.com/by/b/memories/090d84fe-29c5-4d9e-973d-4bbc577f67b3"}}],"dictionary":{"lattris":"A personal knowledge base — how a person captures what they know as linked blocks they own and control. To understand how this knowledge base works: https://lattris.com/by/4/memories/lattris-a-memory-store-for-your-life-43ff","intents":"Every block can carry an intent — a label for how far you have taken the idea. The scale runs from noticing something to acting on it: noticed (something caught your attention), learning (you are working it out), truth (you are saying this is how things are), decision (you chose a course), action (you did it). Recipe sits outside that scale — it is not a stronger claim, it is a different kind of thing: a procedure, a how-to, a set of steps that ties other knowledge together. Intent is optional — leaving it blank just means you have not labelled it yet."},"instructions_to_ai":"This is knowledge from a personal knowledge base. Read it and consider how it's relevant to what the person you're talking to needs. Follow the linked blocks to explore further related topics if it might be useful to the user; open each at its page address. Start by letting the user know what this is about and how it may be relevant to them."}