Show HN: Agent in 9 Lines Python

(gist.github.com)

17 points | by tosh 15 hours ago ago

7 comments

  • gabrielsroka 11 hours ago ago

    Nice.

    Do you have an ungolfed version? I was going to ask my LLM to make one.

  • JSR_FDED 14 hours ago ago

    Super cool for how compact yet still readable it is. Shouldn’t there be a tool description passed to the LLM though?

    • tosh 12 hours ago ago

      Great question!

      I had a tool description earlier but 'sh' as tool name seems to be sufficient, the agent behaviour was the same.

      There might be performance gains if a description is added though, or worth trying different ways of telling the agent about what is available in the environment.

      That said, the newer models are fairly good at driving a harness to explore the environment.