Connecting AutoGen to a Local Model With LM Studio

Matthew Berman demonstrates an early local-model setup and explains where agent behavior still needs work.

MBMatthew BermanSpeaker · Forward Future
Channel
Matthew Berman
Published
Oct 17, 2023
Video
4:42
Read
1 min
Slides
3
Original
English
Open on YouTube
Scroll to read and the video shrinks to the bottom-right corner. Captions follow your reading language.
Reading languageAvailable in 2 languages
You're reading the original English.
SUMMARY

In 30 seconds

In this 2023 tutorial, Matthew Berman downloads Mistral 7B Instruct with LM Studio, starts its local server and points an existing AutoGen example at it. He observes the agent exchange but says prompt templates and termination still need tuning. Interfaces and APIs may have changed since the recording.

  1. 1Download a modelBerman selects Mistral 7B Instruct v0.1 and a quantized file in LM Studio.
  2. 2Start a local serverHe loads the model and starts LM Studio’s local server.
  3. 3Point AutoGen to localhostHis existing example uses an OpenAI-compatible configuration with http://localhost:1234/v1 and a placeholder key.
  4. 4Tune agent behaviorThe agents exchange messages, but he says they sometimes fail to terminate as expected.

Takeaways

  1. LM Studio can serve a downloaded model through a local OpenAI-compatible API.
  2. Berman connects an existing AutoGen configuration to localhost port 1234.
  3. Agent quality depends on model selection, prompt formatting and termination behavior.
  4. The demonstration uses historical versions; current setup details may differ.
FULL TEXT

Read the edited text by chapter

Transcript only
01

Select and download a model

Berman introduces LM Studio and chooses a quantized Mistral model for local inference.

I want to use an open-weight model with AutoGen on my own computer. The connection is straightforward, but finding a model and prompt template that make the agents behave well takes more experimentation.

I use LM Studio to search for and download a model, chat with it locally and run a server. In this demonstration I select Mistral 7B Instruct v0.1 and a quantized version; I normally use Q5 on my M2 Max MacBook Pro. The suitable model and quantization depend on your hardware and task.

Choosing Mistral in LM Studio
SLIDE 1 / 3Choosing Mistral in LM StudioThe model browser shows the Mistral 7B Instruct model used in the demonstration.
02

Connect the local server

He starts a server and changes an existing AutoGen configuration to use its local endpoint.

In LM Studio I select the downloaded model and start the local server. Then I open an AutoGen example I already configured in an earlier video. LM Studio provides an OpenAI-compatible interface, so I point the example’s API base to http://localhost:1234/v1 and use a placeholder key for this local setup.

The local AutoGen configuration
SLIDE 2 / 3The local AutoGen configurationThe example points its API base at the local LM Studio server and uses a placeholder key.
03

Run and evaluate the agents

He tests a simple Python task and discusses remaining prompt and termination issues.

My assistant is instructed to specialize in Python, and the user proxy asks it to output the numbers from one to 100. I run the example and observe inference and logs in LM Studio, along with messages exchanged between the assistant and user proxy.

Local server logs
SLIDE 3 / 3Local server logsLM Studio displays the running local endpoint and generated response logs.

The connection works, but the agents do not always behave as I want: for example, they sometimes do not terminate when expected. I suspect prompt formatting matters and plan to keep experimenting. This is a historical demonstration; consult current LM Studio and AutoGen documentation for version-specific settings.

More from this channel

6 slides25:50EN
MBMatthew Berman· Oct 24, 2026Kimi K3.1 Pro Tested: Strong 3D Demos, Uneven Results and Competitive PricingMatthew Berman · Forward FutureMatthew Berman tests the open-weight model on coding, 3D rendering and visual explanations, then compares benchmark results and prices.Open-weight modelsBenchmarksAI cost & performance+1
2 slides32:20EN
MBMatthew Berman· Oct 23, 2026Who Is Local AI For? The Costs, Trade-offs and a Hybrid FutureMatthew Berman · Forward FutureMatthew Berman weighs data control and independence against hardware cost, setup complexity and inference speed.Local inferenceOpen-weight modelsAI cost & performance+1
45:08EN
MBMatthew Berman· Oct 21, 2026Sam Altman on AI Discovery, Consciousness, Compute and a Human-Centered FutureMatthew Berman, Sam Altman · Forward FutureIn a conversation with Matthew Berman, Altman discusses scientific progress, personal assistants, recursive self-improvement and the importance of human agency.AI for sciencePersonal agentsConsciousness+2
5 slides12:14EN
MBMatthew Berman· Oct 14, 2026Gemini 4 Argon Tested: 3D Demos, a Spreadsheet Prototype and Benchmark ResultsMatthew Berman · Forward FutureMatthew Berman tests Google’s model on games and visual projects, then compares reported coding and agent benchmarks.GeminiBenchmarksCoding agents+1
5 slides10:36EN
MBMatthew Berman· Oct 13, 2026Meta Muse Wonder Tested: Strong Benchmarks, Mixed Demos and Quota FrictionMatthew Berman · Forward FutureMatthew Berman tests Meta’s models on browser demos and reviews their published benchmark scores, availability and cost.Models & trainingBenchmarksAI cost & performance+1
2 slides17:37EN
MBMatthew Berman· Oct 10, 2026AI Coding, Game Mashups and the Value of Human TasteMatthew Berman · Forward FutureMatthew Berman explains decompilation and game mashups, then argues that iterative AI coding changes software and creativity.Coding agentsSoftware engineeringCreativity+1