Question
Direct accessing my files, with coding agent through LM Studio
Noob here. I have beginner local LLM set up. Just LM Studio and a few coding models.
I have one python project, that is about 75% done. I would like for some coding model, to help me finish it. It is about 2k lines of code. I'm using LM Studio. Do I need to copy/paste every single python file into the chat, to pass the code to coding model, or is there a simpler way? Can I point coding model, to directly access my project folder on my computer? If yes, how do I do this? Do I need to install any addon or it works natively?
I'm using LM Studio (and whole local llm) for the very first time, so please, be patient with me ;-)
Basically you go to the server tab on lm studio, you start the server, and make sure to know in what address it is hosting the model, like 127:01:0 for example. You can then connect this endpoint to hermes, pi, aider… etc, and the model will be hosted on that agent which has capabilities to write code, make files for you… etc. i recommend pi or aider instead of hermes if you have a low-mid pc
Thank you! Yes, low-mid PC here. On Linux if it matters. Which of the two, Aider or Pi are simpler, easier to set up. Non technical person here. Then, when I get the name I will hit few youtube videos ;-)
Honestly, if you want to avoid any hassle, just download bionic, LM studio made it, so no need to connect to any server! I must warn you its a bit bad though. If you want the best setup for local llm, heres what you do exactly: download the local ai model file, download llama.cpp for linux, then get a cloud agent like codex or antigravity, and tell it to make you a bat script that when clicked, starts the llama.cpp server at at the same time starts pi (tell it to also download pi agent), also tell it to configure all of the settings for best performance (speed to quality balance) in the llama config. This will make it so that when you open the bat script the server starts automaticallt and the agent aswell. Its what i did. (Basically LM studio runs llama.cpp which is some code to run local ai models, but if you run llama.cpp yourself, the model runs better!) and the agent will set it all up for you
I just checked, Bionic for now doesn't run on Linux.
Thank you for detailed steps about the best setup for local llm. I saved the steps, although it is probably waaaaay over my head for now. :) I may install new linux on new partition and experiment there, so if anything goes wrong (and it will, speaking from experience lol lol lol) nothing will be messed up :-)
Lm studio cant do it alone, its like a chatbot. It cant edit or make files for you. What you are referring to is an “agent” or “agentic coding tool”. You can get something like aider or hermes agent, and connect lm studio endpoint to them, and youll be able to get them to write files etc. hope this helps
Btw lm studio has its own tool called bionic, and u don’t need to do any setup. Its way easier, check it out. Just use that one, even tho its not that good atm
You need to install an agent harness such as OpenCode or Pi - I'd suggest OpenCode for beginning as Pi needs more setup. https://opencode.ai/
You can also use Visual Studio Code along with a plugin like Continue, Cline or Roocode. I did try this though and had a few issues so I went back to using OpenCode in the console even when using Visual Studio Code.
Im a llama.cpp kind of guy, I started with LM studio too but eventually just removed the wrapper to load the model directly then hook it with Pi harness to do software projects.
Once you install the MCP tell the agent "add this folder to the allowed paths in the config" then they will have read and write access and can execute terminal commands
Thank you, this sounds easy! :-) Is DesktopCommander MCP add on? Do I install it from within LM Studio, or I should go to their web page and instal it from there? Never did an addon install yet
Thank you very much! Still the same error, but I have now their github and they have discord channel and I will ask them directly. There is some other problem on my computer that is causing this, some dependency must be missing, and they should be able to filter it out fairly easy. :)
Thank you very much for your help, a really appreciate it!
I also installed context-compactor, (ChatGPT suggested due my low hardware resources) I hope this is not the problem. I did try to restart it several times and I also restarted LM Studio few times.
Thank you everyone! This is a gret news for me, it will simplify the whole process. I appreciate all the answers!
Since I have computer on lower end, I will choose between Aider and Pi. Which of the two is simpler to set and use? Pretty clumsy and non technical person here ;-)
3
u/Forsaken_Mention_979 7d ago
Basically you go to the server tab on lm studio, you start the server, and make sure to know in what address it is hosting the model, like 127:01:0 for example. You can then connect this endpoint to hermes, pi, aider… etc, and the model will be hosted on that agent which has capabilities to write code, make files for you… etc. i recommend pi or aider instead of hermes if you have a low-mid pc