this post was submitted on 18 Apr 2025
3 points (100.0% liked)

Programming

0 readers
2 users here now

A magazine created for the discussion of computer programming-related topics.

Rules

Please keep submissions on topic and of high quality. No image posts, no memes, no politics. Keep the magazine focused on programming topics not general computing topics. Direct links to app demos (unrelated to programming) will be removed. No surveys.

founded 2 years ago
MODERATORS
 

"It’s not that hard to build a fully functioning, code-editing agent.

It seems like it would be. When you look at an agent editing files, running commands, wriggling itself out of errors, retrying different strategies - it seems like there has to be a secret behind it.

There isn’t. It’s an LLM, a loop, and enough tokens. It’s what we’ve been saying on the podcast from the start. The rest, the stuff that makes Amp so addictive and impressive? Elbow grease.

But building a small and yet highly impressive agent doesn’t even require that. You can do it in less than 400 lines of code, most of which is boilerplate.

I’m going to show you how, right now. We’re going to write some code together and go from zero lines of code to “oh wow, this is… a game changer.”

I urge you to follow along. No, really. You might think you can just read this and that you don’t have to type out the code, but it’s less than 400 lines of code. I need you to feel how little code it is and I want you to see this with your own eyes in your own terminal in your own folders.

Here’s what we need:

  • Go
  • Anthropic API key that you set as an environment variable, ANTHROPIC_API_KEY"

https://ampcode.com/how-to-build-an-agent

#AI #GenerativeAI #AIAgents #AICoding #Programming #Go #Claude #Anthropic #LLMs #Chatbots

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 week ago* (last edited 1 week ago)

@grober_Unfug Try Gemini-2.5 Pro Preview. It's the best LLM. Alternatively, you can always try o3, OpenAI's latest LLM: https://lmarena.ai/.

BTW: I'm not the author of the post above :)