Live data from Hacker News

You should write an agent

fly.io

61–70 of 409 posts

Re: You should write an agent

#61
post #37

Earlier quoted context omitted.

Honest question, as your comment confuses me. Did you get to the part where he said MCP is pointless and are saying he's wrong? Or did you just read the start of the article and not get to that bit?

I'd second the article on this, but also add to it that the biggest reason MCP servers don't really matter much any more is that the models are so capable of working with APIs , that most of the time you can just point them at an API and give them a spec instead. And the times that doesn't work, just give them a CLI tool with a good --help option . Now you have a CLI tool you can use yourself, and the agent has a too…

I feel the CLI vs MCP debate is an apples to oranges framing. When you're using claude you can watch it using CLI's, running brew, mise, lots of jq but what about when you've built an agent that needs to work through a complicated API? You don't want to make 5 CRUD calls to get the right answer. A curated MCP tool ensures it can determinism where it matters most.. when interacting with customer data

Re: You should write an agent

#62

Does anyone have an understanding - or intuition - of what the agentic loop looks like in the popular coding agents? Is it purely a “while 1: call_llm(system, assistant)”, or is there complex orchestration? I’m trying to understand if the value for Claude Code (for example) is purely in Sonnet/Haiku + the tool system prompt, or if there’s more secret sauce - beyond the “sugar” of instruction file inclusion via comman…

Generally, that's pretty much it. More advanced tools like Claude Code will also have context compaction (which sometimes isn't very good), or possibly RAG on code (unsure about this, I haven't used any tools that did this). Context compaction, to my understanding, is just passing all the previous context into a call which summarizes it, then that becomes to new context starting point.

Re: You should write an agent

#63

Does anyone have an understanding - or intuition - of what the agentic loop looks like in the popular coding agents? Is it purely a “while 1: call_llm(system, assistant)”, or is there complex orchestration? I’m trying to understand if the value for Claude Code (for example) is purely in Sonnet/Haiku + the tool system prompt, or if there’s more secret sauce - beyond the “sugar” of instruction file inclusion via comman…

I thought this was informative: https://minusx.ai/blog/decoding-claude-code/

Re: You should write an agent

#64
post #41

Absolutely, especially the part about just rolling your own alternative to Claude Code - build your own lightsaber. Having your coding agent improve itself is a pretty magical experience. And then you can trivially swap in whatever model you want (Cerebras is crazy fast, for example, which makes a big difference for these many-turn tool call conversations with big lumps of context, though gpt-oss 120b is obviously no…

Cerebras now has glm 4.6. Still obscenely fast, and now obscenely smart, too.

Re: You should write an agent

#65
post #5

Earlier quoted context omitted.

The whole post is about not using frameworks; all you need is the LLM API. You could do it with plain HTTP without much trouble.

When I ask for Patterns, I am seeking help for recurring problems that I have encountered. Context management .. small llms ( ones with small context size) break and get confused and forget work they have done or the original goal.

Start by thinking about how big the context window is, and what the rules should be for purging old context.

Design patterns can't help you here. The hard part is figuring out what to do; the "how" is trivial.

Re: You should write an agent

#66
post #38

I realize now what I need in Cursor: A button for "fork context". I believe that would be a powerful tool solving many things there are now separate techniques for.

crush-cli has this. I think the google gemini chat app also has this now.

Re: You should write an agent

#67
post #36

> Imagine what it’ll do if you give it bash. You could find out in less than 10 minutes. Spoiler: you’d be surprisingly close to having a working coding agent. Okay, but what if I'd prefer not to have to trust a remote service not to send me { "output": [ { "type": "function_call", "command": "rm -rf / --no-preserve-root" } ] } ?

There are MCP configured virtualization solutions that is supposed to be safe for letting LLM go wild. Like this one: https://github.com/zerocore-ai/microsandbox I haven't tried it.

You can build your agent into a docker image then easily limit both networking and file system scope.

    docker run -it --rm \
      -e SOME_API_KEY="$(SOME_API_KEY)" \
      -v "$(shell pwd):/app" \ /dev/null | awk '{printf " --add-host=llm-provider.com:%s", $$0}') \ 
Probably could be a bit cleaner, but it worked for me.

Re: You should write an agent

#68
post #48
post #40

Earlier quoted context omitted.

As it happens, I have a prototype for this, but the syntax is honestly rather unwieldy. Maybe there's a way to make it more like natural human language....

I can't tell whether any comment in this thread is a parody or not.

(Mine was intended as ironic, suggesting that a circle of development ideas would eventually complete. I interpreted the previous comments as satirically pointing at the fact that the notion of "UNIX-like tools" owes to the fact that there is actually such a thing as UNIX.)

Re: You should write an agent

#69

I agree with the sentiment but I also recommend you build a local only agent. Something that runs on llama.cpp or vllm, whatever... This way you can better grasp the more fundamental nature of what LLM's really are and how they work under the hood. That experience will also make you realize how much control you are giving up when using cloud based api providers like OpenAI and why so mane engineers feel that LLM's ar…

ive been trying this for a few week, but i dont at all currently own hardware good enough to be useful for local inference.

ill be trying again once i have written my own agent, but i dont expect to get any useful results compared to using some claude or gemini tokens

Post reply on HN