Hugging Face ?
ℏεsam: i played with the "smolagents" by Hugging Face ?and here's what I think:
1. I built an agent to get the top daily paper (@_akhaliq) from HF, download it from arxiv, and summarize it.
I used "Qaboutwen2.5-Coder-32B" and I had the easiest time pulling it off. the agent didn't get confused on which tools to use and how to use them. as in any agentic application, the key is in choosing the right model, defining the right tools, and documenting them. the whole task took 13 seconds to complete in 3 steps. it first found the top paper, downloaded it, read it, extracted the key points, and combined them to give a summary. (agent output screenshot in the reply section)
2. in smolagents the agent thinks in code! so the actions are not defined in JSON/text like the other frameworks but in Python code snippets. this makes the workflow faster, more secure and also makes more sense. they also support the typical way, but they emphasize the use of these Code Agents (they're not agents to code, but agents that act in code, and you have every right to be confused :D)
3. abstractions are at a minimum. the core is written in ~1000 Python lines that you can dig in easily. less abstractions means easier to understand and debug. so I'm all for it.
4. the whole developer experience is as smooth as butter. defining custom agents is as easy as simply writing a Python function. many models from HF can be used for free with a simple integration. building a simple workflow takes minimum lines of code without too much overhead.
5. there are some ready-to-use tools, I was expecting more but this being an open source library, I think we'll have a swarm of tools very soon. also, being integrated well with HF's ecosystem, I hope there's gonna be a tool hub in which you can just pick the tools you like with no effort (I read there's already such a tool hub, but didn't find it yet)
6. this is not HF's first attempt to build an agent library. the previous ones didn't stick with the community, and I think the lessons from those shortcomings played a key role in designing smolagents.
Conclusion?
test it! for me, it was different from the industry-standard libraries. it has something that I like the most: it makes sense. the design, the concept of Code Agent, the tool system, simple LLM import, etc.
if you have built any products related to AI agents, I think it's worth a shot to check it out.
Thu Jan 16 2025 23:58:51 GMT+0800 (China Standard Time)