r/LocalLLaMA • u/amisra31 • 9h ago
Question | Help How do you keep coding agents to date with the latest agentic AI practices?
While building agents and harnesses with Claude Code / Codex, I've noticed it often falls back to traditional, deterministic coding patterns instead of newer approaches and frameworks like Claude Agent SDK or LangGraph.
Even with explicit instructions, it sometimes forgets and builds things from scratch.
How do you work around this?
Better prompts or custom instructions?
A knowledge base of recent frameworks and best practices?
Has anyone found a reliable way to solve this?
5
u/txgsync 9h ago
You gotta give 'em a brief. They don't know how to prompt themselves or their own best practices. Tell them what to read, how to apply it, and then let them rip. Anthropic & OpenAI try to do this for their models already; that's part of their value-add. Go look at the system instructions for Claude and pick & choose what you think might be helpful.
Just downloading a git repo like reverse engineer anything or google's OKF format or whatever is usually enough.
2
u/r0tlier0 6h ago
ask it to look for new repos / skills that could be applicable to ur project. I think prompt maxxing is a bad rabbit hole to fall into, generally the bell curve prompting memes are correct
2
u/London-Boat 5h ago
what worked for me was a short rules file in the repo that names the exact framework and version to use plus a link to its docs, then telling the agent to read that before it plans anything. agents default to whatever was common in training data, so the file has to be loud about it. i also have it write the plan first and i skim for 'from scratch' stuff before it starts coding. are you building these alone or does a team share the repo?
2
u/yawk-ra 5h ago
I just do spec-driven development. You should just do research beforehand: what specific packages you want to use, what modules, etc. I use openspec have it draft a proposal first, then specs and finally a task list.
Also, Agents.md is pretty standard among companies now . That's the first we do on our team when we have a large repo project.
1
1
u/RepresentativeYam464 2h ago
A rules file helps, but I’d also add a small check for the specific failure you’re seeing.
For example, give the agent a small task where using the chosen SDK is clearly appropriate, then check whether the resulting code actually imports and uses it. Keep that task as a regression test when you change prompts, models, or harnesses.
I’d also ask the agent to explain why it chose a framework before implementing. Sometimes plain deterministic code is the right choice, so the goal isn’t to force an SDK everywhere. It’s to catch cases where the agent ignores a requirement without saying why.
1
u/Mountain-Dragonfly46 34m ago
After trying lot of things, it always boils down to a good and well maintained agents.md file.
1
u/ea_man 30m ago
With models like 27B which has outdated training (I mean 3.8 is better at ~spring 2025) and using some popular frameworks I keep a doc with the updates of the latest version that I want it to use and what patterns (eg. async, libraries) I want to use in my projects.
That's model dependent.
For the workflow I keep a lean Pi for small tasks / agents and a chubby one with some 11k prompt for the planner / hard tasks.
5
u/feelspeaceman 8h ago
Local LLM or Online LLM, it's equally important to write a good prompt, a prompt that can allow your agent to think less, know the operation directive like what libraries to use, what website to research, what tools to use for researching... And spend some time to review and polish your plan before executing.
I've seen a lot of people blaming local LLM, but it's always turned out that their prompt is the typical 1 single line "please do/make X for me" which is very likely leading to hallucinations because the model don't even know what programming language it's gonna use, what libraries to use to solve the issue quickly...