For ML Engineers
Give the model you're building its own address. Your agent can use it, others can try it, and you restart it as often as you like.
Use a model at its own address
lnk model add http://localhost:5000 --name mymodel # remember your server; list shows its models
lnk model forget mymodel # the address or the name; the server keeps runningA model served on a port of its own is then a model like Ollama's.
lnk agent start --model <model> uses it, and lnk tunnel open <model>
shares it. Your server needs to answer OpenAI's /v1/models and
/v1/chat/completions, as vLLM and llama.cpp do. Link adds only an
address on this machine, which is localhost, 127.0.0.1 or [::1].
While nothing answers there, list shows it as not answering.
Demo a model you're building
The URL stays the same while you restart your server, and requests fail only while it's down.
lnk tunnel open llm --upstream http://localhost:5000 --name mymodel --auth demo:secret # its OpenAI-style /v1 API
lnk tunnel open 5000 --name mymodel --auth demo:secret # any other API, every route as isThe first command needs a server that answers /v1/models and
/v1/chat/completions, as above. The second forwards whatever your
server answers, such as a Gradio app or your own routes.
For your agent to use it too, add it with lnk model add
(above).
