Live data from Hacker News

The Code-Only Agent

rijnard.com

21–30 of 73 posts

Re: The Code-Only Agent

#21

This was implemented far ago, at least by huggingface "smolagents". https://huggingface.co/docs/smolagents/index . I did use them, with evaluations. For the most cases, modern models tool call outperforms code agent. They just trained to use tools, not a code

The differentiating thing that llm tool calls can't do reliably is to handle a lot of data. if tool a emit data that tool b needs, and it's a significant compared to model context, scripting these tool to be chained in a code fragment where they are exposed as functions saves a lot of pain

Re: The Code-Only Agent

#22
post #6

What if the tools needed is large? Spawn some sub-agent for those? These sub-agent can be repetitive. Maybe we can reuse the result from some of them. How about sharing them across session? There are no point repeating common tasks. We need some common protocol for those... and we just get MCP back.

I can't find it now but there was a paper on HN a while ago that had gave agents a tool that searched through existing tools using embeddings. If the agent found a tool it could use to do its job, it used it, otherwise it wrote a new one, gave it a description, and it got saved in a database for future use with embeddings. I wonder what ever came of that.

sounds like it could be many things. there was a well-known paper called Voyager by NASA in which an agent was able to write its own skills in the form of code and improve them over time. funnily enough this agent played minecraft, and its skills were to collect materials or craft things. https://arxiv.org/abs/2305.16291

Re: The Code-Only Agent

#24
post #6

What if the tools needed is large? Spawn some sub-agent for those? These sub-agent can be repetitive. Maybe we can reuse the result from some of them. How about sharing them across session? There are no point repeating common tasks. We need some common protocol for those... and we just get MCP back.

I can't find it now but there was a paper on HN a while ago that had gave agents a tool that searched through existing tools using embeddings. If the agent found a tool it could use to do its job, it used it, otherwise it wrote a new one, gave it a description, and it got saved in a database for future use with embeddings. I wonder what ever came of that.

That sounds like Claude tool search tool with the extra instruction of generating new ones.

Re: The Code-Only Agent

#25

I went down (continue to do down) this rabbit hole and agree with the author. I tried a few different ideas and the most stable/useful so far has been giving the agent a single run_bash tool, explicitly prompting it to create and improve composable CLIs, and injecting knowledge about these CLIs back into it's system prompt (similar to have agent skills work). This leads to really cool pattens like: 1. User asks for s…

That’s pretty cool. Is it practical? What have you used it for?

I've been using it daily, so far it's built CLIs for hackernews, BBC news, weather, a todo manager, fetching/parsing webpages etc. I asked it to make a daily briefing one that just composes some of them. So the first thing it runs when I message it in the morning is the daily briefing which gives me a summary of top tech news/non-tech news, the weather, my open tasks between work/personal. I can ask for follow ups like "summarize the top 5 stories on HN" and it can fetch the content and show it to me in full or give me a bullet list of the key points.

Right now I'm thinking through how to make it more "proactive" even if it's just a cron that wakes it up, so it can do things like query my emails/calendar on an ongoing basis + send me alerts/messages I can respond to instead of me always having to message it first.

Re: The Code-Only Agent

#26

I went down (continue to do down) this rabbit hole and agree with the author. I tried a few different ideas and the most stable/useful so far has been giving the agent a single run_bash tool, explicitly prompting it to create and improve composable CLIs, and injecting knowledge about these CLIs back into it's system prompt (similar to have agent skills work). This leads to really cool pattens like: 1. User asks for s…

I've been on a similar path. Will have 1000 skills by the end of this week arranged in an evolving DAG. I'm loving the bottoms-up emergence of composable use cases. It's really getting me to rethink computing in general.

Re: The Code-Only Agent

#27

I went down (continue to do down) this rabbit hole and agree with the author. I tried a few different ideas and the most stable/useful so far has been giving the agent a single run_bash tool, explicitly prompting it to create and improve composable CLIs, and injecting knowledge about these CLIs back into it's system prompt (similar to have agent skills work). This leads to really cool pattens like: 1. User asks for s…

Have you done a comparison on token usage + cost? I'd imagine there would be some level of re-inventing the wheel (i.e. rewriting code for very similar tasks) for common tasks, or do you re-use previously generated code?

Re: The Code-Only Agent

#28

I went down (continue to do down) this rabbit hole and agree with the author. I tried a few different ideas and the most stable/useful so far has been giving the agent a single run_bash tool, explicitly prompting it to create and improve composable CLIs, and injecting knowledge about these CLIs back into it's system prompt (similar to have agent skills work). This leads to really cool pattens like: 1. User asks for s…

Have you done a comparison on token usage + cost? I'd imagine there would be some level of re-inventing the wheel (i.e. rewriting code for very similar tasks) for common tasks, or do you re-use previously generated code?

It reuses previously generated code, so tools it creates persists from session to session. It also lets the LLM avoid actually “seeing” the tokens in some cases since it can pipe directly between tools/write to disk instead of getting returned into the LLMs context window.

Re: The Code-Only Agent

#29

I went down (continue to do down) this rabbit hole and agree with the author. I tried a few different ideas and the most stable/useful so far has been giving the agent a single run_bash tool, explicitly prompting it to create and improve composable CLIs, and injecting knowledge about these CLIs back into it's system prompt (similar to have agent skills work). This leads to really cool pattens like: 1. User asks for s…

The point where that breaks down is “next time it’s aware of the CLI and uses it”. That only really works well inside the same session, and often the next session it will create a different tool and use that one.

Re: The Code-Only Agent

#30
post #4

The author seems to stop at 'code' but it seems we could go further and train an AI to work directly with binary. You give it a human prompt and a list of hardware components which make up your machine and it produces executable binary which fulfills your requirements and runs directly on those specific hardware, bypassing the OS... Or we could go further; the output nodes of the LLM could be physically connected to…

And we'd still have people on hacker news inspecting the binary and telling everyone how shit they think it is

[deleted]
Post reply on HN