How I automate my own job at Hugging Face using agents — Niels Rogge, Hugging Face

summarized

TLDR

Niels Rogge automated his job of convincing researchers to upload model weights to Hugging Face by building a nightly cron job that reads arXiv papers, checks if artifacts are on the Hub, and opens GitHub issues or pull requests. The initial workflow used deterministic LLM calls without an agent framework, but the follow-up to those issues is now handled by a fully autonomous agent built with the Claude Agents SDK and deployed on Modal. The key insight is that open models like GLM 5.2 are now good enough to replace closed-source models for this task, and the agent only needs a single CLI tool (the Hugging Face CLI) to do its work.

Key points

  • The community science team at Hugging Face exists because researchers often publish model weights on Google Drive, GitHub releases, Dropbox, or Zenodo instead of Hugging Face, which hurts discoverability.
  • Rogge initially opened GitHub issues manually using a template asking researchers to release checkpoints on Hugging Face, but this did not scale given hundreds of daily arXiv papers.
  • He built a deterministic workflow using LLM APIs within predefined steps (no agent framework) that runs as a nightly cron job via GitHub Actions, reading arXiv papers and opening GitHub issues or pull requests on Hugging Face.
  • For tracing and observability of the LLM calls, Rogge uses LangFuse to monitor inputs, outputs, prompts, cost, and latency.
  • The follow-up to GitHub issues was later automated using a fully autonomous agent built with the Claude Agents SDK, deployed on Modal using batch processing to spin up one container per GitHub issue.
  • The agent uses Bash as a tool (the terminal) and the Hugging Face CLI as its primary skill, and it also posts results to a Slack channel.
  • Rogge does not disclose to researchers that the GitHub issues are created by an agent, because the content is identical to what he would write manually and disclosure might cause people to close the issue.
  • Out of thousands of issues created, only two negative comments have been received; most researchers respond positively and upload their artifacts to Hugging Face.
  • Rogge also runs a Daily Papers Twitter account (90,000+ followers) that uses the same workflow to post interesting research papers and artifacts from Hugging Face every 4 hours, with Gemini selecting the best visual for each tweet.
  • He is working on a revival of Papers With Code at paperswithcode.co, aiming to make research and state-of-the-art benchmarks more accessible as an educational resource.

Tools mentioned

Techniques

  • deterministic workflow with LLM APIs in predefined steps
  • fully autonomous agent using LLM in a loop with tools
  • cron job for nightly batch processing
  • batch processing on Modal with one container per GitHub issue
  • using a single CLI tool (Hugging Face CLI) as the agent's primary skill
  • tracing and observability with LangFuse
Transcript (captions)

0:01 [music] >> Okay. All right. Hello everyone. Thanks for coming by.

0:21 Today I'll talk about how I automate my own job at Hugging Face using agents. Um short introduction. I'm just uh Niels from Belgium, the land of beer, fries, and chocolate. I studied at KU Leuven,

0:36 and I'm a machine learning engineer at Hugging Face for 5 years now. Uh today I'll talk about the community science team at Hugging Face, which is the team I'm part of.

0:47 Uh then I'll talk about how I automate large parts of the community science team. And finally, I'll also discuss some other efforts uh that we do at Hugging Face.

0:58 So, let's start with the community science team at Hugging Face. So, basically, this started when I was sent I was seeing like trending research uh passing by on GitHub. And a lot of

1:10 times when I saw new interesting work, um the weights were not available on Hugging Face, sadly. Like, researchers use either Google Drive or they use GitHub releases.

1:20 They use Dropbox, they use Zenodo, or other servers to put their um artifacts on. And this hurts uh discoverability of their work. It's like not easily uh visible or discoverable.

1:33 And when I then open a GitHub issue to say like, "Actually, you could put your weights on Hugging Face for free." Most of the time, people replied to me like, "Yeah, migrating the weights uh from

1:43 Google Drive to Hugging Face actually makes perfect sense." So, yeah, the community science team can also uh be described as the Google Drive to the hub team.

1:52 Um why? Because on Hugging Face, we have these paper pages, uh and every single paper is from archive. And then on the right side, you can basically list the linked artifacts,

2:02 like the the linked models or data sets. So, people can easily reproduce your paper or find the models or data sets. So, yeah, you can see them on the right side.

2:14 Um this improves the discoverability of your work because we have these metadata tags or filters on the app, so you can easily find, for example, depth estimation model,

2:23 an LLM if you're interested. You can find them by language. You can tag them with the library they are compatible with and so on. So, this improves the discoverability of your work. So, these

2:33 are, yeah, the metadata tags that you can add to every single model on Hugging Face or every single data set. So, yeah, this is like the main problem that we saw, like, lots of people, lots

2:43 of researchers are like using third-party services to publish their work. We have the Hugging Face platform, which is like a centralized place where people can find machine learning

2:52 artifacts. It also improves with documentation because you can add a model card or a data set card. We have tooling, so you can easily upload or download stuff from

3:01 Hugging Face. And it might also help reach researchers in promoting their work. So, it's basically a win-win both for researchers and then other

3:09 people using the research. So, yeah, these are the typical GitHub issues that I was opening. I always had like the same template. I just asked, "Could you please release this

3:19 checkpoint on Hugging Face? Could you please release this data set on Hugging Face?" And [snorts] then I also opened PRs, pull requests on Hugging Face to add

3:27 data set cards or model cards to improve the documentation of those artifacts. But, there's a problem. It's not really scalable for me to open all these GitHub issues or pull requests

3:39 because every single day there are like hundreds of research papers coming out on archive, especially now with AI boom. Um yeah, also NeurIPS, for example, a major AI conference, they are seeing a

3:49 massive amount of papers. So, can we automate this? Can we scale the community science team with agents? So, that's the second part of my talk. How can we, yeah, scale this uh to a

4:01 massive amount of research papers? So, the idea is pretty simple. Uh we should have an AI agent which can help me do this outreach to all these researchers which publish uh models or

4:14 data sets uh as part of their research work. And then, yeah, do the outreach in an automated way. So, this is the typical workflow that I was following. So, basically, whenever I saw a research

4:25 paper, I first tried to find the GitHub URL uh of that paper, if it's available. Then, I I read the readme of that GitHub file. And then, I basically check if there's anything new interesting to be

4:38 shared on Hugging Face. Uh it could be that it's on Hugging Face already. In that case, I check whether the model cards or data set cards already properly

4:47 uh present, whether the metadata tags, for example, are there. If uh not, then I will might open a pull request. Otherwise, if the artifacts are not yet on Hugging Face, I open a GitHub

4:57 issue. And then, finally, I also follow up with the author. So, that's kind of the workflow that I had to automate uh with agents. And there are several ways to solve

5:07 this. Uh you could uh go with a workflow. Uh these pictures are, by the way, taken from the blog post building effective agents by Anthropic, which is a really

5:15 great read. Uh read. Um so, on the left side, you see, yeah, a workflow which is more deterministic. You basically use LLM APIs within steps of a predefined path or pipeline,

5:26 uh which is more predictable. It's more deterministic. You have more control over it. Of course, it's less flex- flexible. And then, on the other hand, you could have a fully fledged auto-

5:36 autonomous agent, which is an LLM in a loop that calls tools until it's done, which is more flexible, but also less uh predictable. Uh Uh, at the time, yeah, of course, it

5:46 doesn't have to be a binary story. You can have a workflow on one hand, you can have a fully autonomous agent on the other hand, but you you could of course also mix and match these type of things

5:55 uh, for your use case. In my case, I went for um, a pretty deterministic workflow. Uh, why? Because at the time that I was building this, this was in 2024,

6:06 was at the time that Anthropic uh, wrote their blog post building effective agents. And there they actually said, "Try to avoid building agents if you really don't have to. Start simple,

6:16 start with a single LLM API. Uh, avoid frameworks." Uh, and actually I think those were great tips. So, at the time I started building a workflow which basically replicated the workflow

6:27 that I was doing when I was doing this outreach. So, yeah, this is the whole uh, pipeline. This is created using the Excalidraw MCP server in Cursor. It's

6:35 pretty nice to create a visualization of your code. Uh, I'm not going to go into the details, but basically it just replicates um, the workflow that I was

6:43 doing when doing the outreach. And I use LLM APIs in then each of the steps without any framework, without any agent framework. So, it made it quite uh, deterministic and I had a lot of control

6:55 over uh, how this goes. Um, in terms of deployment of this uh, workflow, it's a simple cron job. So, cron is just something that runs regularly. In my case, I run it once

7:07 every night. So, when I'm sleeping, there is this agent, but technically it's just a cron job, a Python script with an LLM API, which is going to read all these hundreds of archive papers,

7:18 uh, and then it might open GitHub issues or it might open pull requests on Hugging Face. I'm using GitHub Actions for this. Uh, I saw this very nice blog post free cron

7:28 jobs with GitHub Actions, and actually it's probably the best entry point if you want to set up cron jobs, um, because GitHub has a pretty generous tier if you want to get started with

7:37 like putting simple cron jobs uh, up there. And yeah, it makes it really easy for me in the UI to manage all these cron jobs. So yeah, every night I have hundreds of

7:48 uh GitHub issues being created. For the tracing part, um I'm using LangFuse. Uh yeah, LangFuse also has a a booth here.

7:58 Um LangFuse is pretty great. Um I use it mostly for the tracing part, the observability part, just to see what is the LLM doing, what are the inputs, what are the outputs,

8:09 what are the prompts, how much does it cost, latency, and so on. Um so yeah, uh I definitely recommend it. Um but yeah, as my agents are opening so

8:21 many GitHub issues every night, I then end up with a massive amount of unread GitHub notifications because people reply to those GitHub issues. And that's a lot of work to then reply

8:32 to all of those issues. It's kind of like going through your mailbox. So you could wonder, could we also um automate the follow-up to those GitHub uh issues? Because initially I was still

8:45 the GitHub issue creation was done uh by an agent, but I was still the one involved in then doing the follow-up. Uh now a few months ago I also automated the the follow-up to those GitHub

8:55 issues. Again, you could think, how should you solve this? Should you go for a more deterministic workflow or can you go for a fully autonomous agents, uh an LLM in

9:05 a loop which runs with some tools and skills? Um well, here I went for kind of a fully autonomous agents, uh so it's kind of flexible. It's a bit less predictable,

9:15 but it works quite well. Um I went for this because uh in November of last year at AI Engineer in New York, there was a pretty nice workshop by Anthropic on the Claude agent SDK.

9:28 And there they were actually saying that agents might be better than workflows. So they So they were kind of contradicting themselves, but they he said that models have become so good

9:37 that you might actually now start to work with fully autonomous agents rather than a workflow. So this is why I went with this approach and I actually am using the Claude

9:47 agents SDK for this use case. Uh there was another pretty nice talk by Cursor also at AI Engineer. This was in the European version in London a few months ago.

9:58 There they talked about how they replaced 12,000 lines of custom code, pretty sophisticated workflow, with a very simple 200 lines of code skill. Uh actually it's pretty similar for me

10:08 like I can replace a lot of custom codes, thousands of lines of code, with nowadays just a simple agent with maybe a CLI as a tool and a skill and that's it

10:22 cuz the models have become so good. So yeah, in terms of the architecture, this is a bit what it looks like. Um so it's actually just the Claude

10:32 agents SDK which is, I would say, a pretty good Python SDK for building an agent. Initially I was using the Claude models, but then I since actually this week I'm

10:41 using the GLM 5.2 model via Hugging Face inference providers. So Hugging Face does offer a service which basically wraps a lot of inference providers like Together AI,

10:52 Fireworks, Cerebras and so on. So you can use a lot of open models in a unified way. It's OpenAI compatible or Anthropic compatible and then I deploy this on Modal. Modal is also

11:06 present here today. And it's mainly using Bash as a tool so the terminal to basically do Hugging Face commands because it's using the Hugging Face CLI quite a bit.

11:18 So I combine it with the Hugging Face CLI skill which is actually all it needs. And then it might comment something on GitHub as a follow-up. And it also actually does

11:29 the posting on Slack because eventually I also want to see the final results on our Slack channel uh from Hugging Face. So yeah, given that there's also a lot of hype on GLM

11:38 5.2 recently, for example, Cursor uh saw great performance on their Cursor bench. Post-training bench is another one uh where it actually beats Opus 4.8 and it's cheaper. So,

11:50 yeah, there's no reason not to use GLM 5.2 uh especially given that I work at Hugging Face. Um for the deployment, as I said before, I use Modal.

11:59 It's pretty great if you want to deploy agents. Uh in my case, I'm using the batch processing feature. So, they allow you to spin up a massive amount of containers all in parallel. Every single

12:09 container is basically one agent loop that is processing one GitHub issue. Uh it's super easy to use, I have to say. Um

12:18 and the startups are also pretty fast. So, I definitely recommend it if you're building uh agents that are like, for example, running in the background, running overnight, for example.

12:29 Um and then the way I invoke it, yeah, technically I could also just uh deploy this as a cron job. Modal, for example, has support for this. But typically, the follow-up on the GitHub issues, I still

12:41 do that actually manually by invoking it as a skill. So, I created a skill for this in Cursor. Uh I call it process under it Modal. And then what it's going to do is it's

12:51 actually going to invoke an agent, in this case, Composer 2.5, which is like the agent that I'm mostly using in Cursor, which is again going to invoke all the other agents. So, that's this is

13:01 kind of the loop that people are talking about. And then finally, it's going to post uh all the results on our Slack channel. Uh so yeah, and this is actually what it

13:11 just posts. So, what it does is it basically just posts a huge amount of Hugging Face papers, uh which are these research papers which

13:19 people can uh make available on Hugging Face because every time someone mentions it in a model card or dataset card, we index it on the hub. And then it just posts all the artifacts that people have

13:29 been uploading based on the outreach that we do via GitHub. Um so yeah, I do this still in a manual form. So I just invoke the skill and then after a few minutes, these messages

13:40 appear on our Slack channel. Um yeah, I just included some fun results because to be honest, it's quite fun to see people interacting with the agents.

13:52 Um to be honest, I don't disclose that it's an agent. Why? Because I think if people know it's a bot, then they might quickly like close the issue. And to be honest,

14:01 they post exactly the same stuff as I was doing before manually. So I don't actually see any reason to to do that. Um so and then you see replies like this. Hi Niels, thanks a lot for your

14:14 suggestion and the clear guidance. I actually also often times see people using an agent to reply to my agents. So it's kind of the that internet nowadays. Um but people yeah, make all their

14:25 artifacts available on Hugging Face. And out of the thousands of issues that are being created on Hugging Face, actually so far I've only had two negative comments. One guy saying yeah, please

14:36 close this slop. So he closed the issue. And then another one. But most of the people they just say, yeah, actually it makes perfect sense to make my weights or my data sets available on Hugging

14:44 Face. Like why didn't I think of this? Um so it's kind of a win-win I would say. Uh I often times also post fun results on our Slack

14:55 channel. Like for example, one time someone a researcher from Apple sent me a DM like, I saw you reached out to me. Yeah, technically it's my agent just posting a GitHub issue regarding

15:05 publishing a new Apple uh the artifacts of an Apple paper on Hugging Face. Or for example, it reaches out to Google DeepMind to publish

15:14 um mathematics data sets. Um so a lot of times like I receive emails, the one on the the side, where yeah, they want to publish a 400 GB data set on Hugging Face, but this was

15:26 also my agent just opening GitHub issues. Um Yeah, this is another fun result. So, Paddle OCR, it's like a Chinese company.

15:35 They migrated all their OCR models to Hugging Face based on outreach by the agents that create issues for me. So, yeah, it's pretty nice. Another fun result is like when it when

15:49 it completes the default template of model cards on Hugging Face. So, Mac Mitchell, who also works at Hugging Face, she has a famous paper called model cards for model reporting, making

16:00 sure that anyone documents their models in a proper way. And so, we do provide this template, which you can see on the left side in the Git diff. And then, the agent is just completing that template

16:12 based on the content that it finds based on the paper, like the GitHub readme, the PDF itself, and so on. Um yeah, it's also quite funny to see, for example, in this case that it

16:25 included me in the model card. It said, "Model card authors, Niels part of the Hugging Face community science team." I never prompted it this way, but it's pretty

16:34 fun to see. Or people are replying, "Thank you for helping me fix my mistakes." So, those are all done by the agents.

16:44 Uh I think the most popular GitHub issue that was created was this paper Tiny Recursive Models, which you might have seen, was quite trending both on Hugging Face, but also on

16:55 Twitter. So, yeah, more than 60 people actually upvoted that issue so that the model was released on Hugging Face. So, this is again, I think, the win-win. So, it's

17:04 both a win for the researcher, making their research more discoverable on Hugging Face, but it's also, yeah, better for the people then who want to build on top of

17:12 that research and want to use them. Uh so, yeah, I I hundreds of GitHub issues where I think I can show uh nice results

17:21 um where people interact with the agents. You might also wonder, yeah, how to avoid slop because you might think, okay, you have an agent uh spamming the

17:31 whole internet with your GitHub issues. Like, should you even do this? Again, I already talked about the win-win. Um, but a blog post that I highly recommend, if you want to avoid that your agent is

17:41 just posting slop, is um the LLM Evils FAQ uh by Hamel Husain. Uh, I would say he's like the main expert when it comes to LLM evaluation.

17:53 He also has like a a paid course, but he also publishes a lot of stuff for free online including this blog post. So, I highly recommend to go through it if you want to learn more about how to evaluate

18:03 your agents. So, my conclusion would be um that open models are actually getting great, especially now with GLM 5.2. You have Deep Seek V4 and so on. So, um yeah, we

18:16 we are able to now replace closed-source models by open ones. Uh, for my use case, I would say agents are actually better than uh workflows. Uh, they only need a single CLI, which

18:26 is the Hugging Face CLI. They need a single skill, the Hugging Face CLI skill, and a sandbox, and that's all they need to do their work. And finally, yeah, don't forget about

18:34 evaluation. Um Finally, uh I can also discuss some other efforts that we do as part of the community science uh team.

18:44 Um, very shortly. Um, so, I have a Twitter account that I created. It's called Daily Papers. And it actually uses the exact same workflow as my agents behind the scenes

18:54 to post interesting research papers on X. It uh recently crossed 90,000 followers without any involvement of me. I just deployed this uh and it posts

19:04 interesting research papers and artifacts from Hugging Face every 4 hours or every time someone uh releases something cool on the Hugging Face. Um so, yeah.

19:15 And I have like Gemini determining the best visual to tweet or to include in the tweet. Like for example, this recent tweet where it tweeted out that Nvidia

19:25 released an optimized version of GLM 5.2 got more than 2,000 likes. So, that's pretty cool to see. And a final effort that I'm working on right now is a revival of Papers With

19:36 Code, which is a website that once existed and then was acquired by Meta and then sadly it died. So, I'm I'm trying to re- revive it and making a research and state-of-the-art easier

19:48 accessible. Um for now it lives at paperswithcode.co. Uh so, yeah. You can find benchmarks over there. For example, for OCR models, all OCR benches like popular benchmark.

20:01 But I'm also making it an educational resource so that people can learn about technical terms like mixed training uh on policy distillation and so on. So, yeah. That was it for my talk. I

20:14 hope you learned something. Thanks all of you for your attention. >> [applause]

Frontier News · by Hyperjump Technology