{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "hkqr-my-free-code--run-coding-agents-on-local-models",
 "repo": "hkqr/my-free-code",
 "repo_url": "https://github.com/hkqr/my-free-code",
 "repo_slug": "hkqr-my-free-code",
 "title": "Run coding agents against local models",
 "page_title": "How to run coding agents against local models with My Free Code",
 "summary": "Point the gateway at Ollama, LM Studio, or llama.cpp so requests stay on your machine.",
 "who": "A developer working offline or with code that cannot leave the machine, who already runs a local model server.",
 "problem": "Coding agents are usually wired to hosted APIs, which sends source code to outside providers.",
 "outcome": "The gateway forwards agent requests to a local model server at a local base URL, and the agent works without a hosted provider key.",
 "steps": [
  "Start your local model server, such as Ollama at http://127.0.0.1:11434/v1, LM Studio at http://127.0.0.1:1234/v1, or llama.cpp at http://127.0.0.1:8080/v1.",
  "Run `cp .env.example .env` and set OLLAMA_BASE_URL, LM_STUDIO_BASE_URL, or LLAMACPP_BASE_URL plus MODEL to the matching local model, such as ollama/llama3.1.",
  "Run `python -m my_free_code` to start the gateway.",
  "Run `python -m my_free_code.cli.mfc claude` or another launcher command from the README to connect your agent.",
  "Confirm the gateway log shows the request reaching your local server rather than a hosted provider."
 ],
 "agent_prompt": "In the my-free-code repository, set OLLAMA_BASE_URL and MODEL=ollama/<model-name> in .env, start the gateway with python -m my_free_code, and send one test request. Expected output: a completed response generated by the local model. Verify that no hosted provider key is required for the request to succeed.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "60 minutes",
 "basis": "readme",
 "caveat": "The README says the gateway is intended for local use, so keep HOST set to 127.0.0.1 and do not expose the Admin endpoints to the Internet.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.11 or newer",
  "A clone of the my-free-code repository",
  "At least one provider API key for the MODEL values you choose, or a local model server such as Ollama, LM Studio, or llama.cpp",
  "Claude Code or another supported client installed and on PATH"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/hkqr-my-free-code/run-coding-agents-on-local-models/",
 "md": "https://dedupedai.com/use-cases/hkqr-my-free-code/run-coding-agents-on-local-models/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/hkqr-my-free-code--run-coding-agents-on-local-models.json",
 "api_version": "v1"
}
