Hugging Face LLM Agent
hf_llm_agent · Built-in agent recipeAnnotation agent powered by an LLM on Hugging Face Inference Providers, e.g. Llama. Annotates named entities (NER), spans, part-of-speech tags and text categories, and accepts or rejects binary suggestions.
If you've connected Ellf to your coding assistant, it can set up the agent for you: it knows the recipe's settings, can create the datasets and assets it needs and will ask you about anything it can't work out itself.
✳︎Claude Code: Setting up an agent
› Set up an Ellf agent using the Hugging Face LLM Agent recipe (hf_llm_agent) and assign it to my annotation task.- In the app, go to AgentsNew agent.
- Select the Hugging Face LLM Agent recipe under APIs.
- Fill in the form – you'll need to provide Hugging Face token. Everything else has sensible defaults.
- Assign the agent to a task via AgentAdd to tasks, or add it from the task via TaskAdd agents.
API key needed
This recipe needs your Hugging Face token. Add it as a secret on your cluster and select it in the form.
Create the agent with ellf agents create and the recipe name. All settings from the form are available as arguments. To view all recipe arguments, run ellf agents create hf_llm_agent --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the agent | None |
--hf-token | str | Hugging Face token: Your own Hugging Face token, stored as an Ellf secret. It needs the 'Make calls to Inference Providers' permission; usage is billed to that account (or to the organization in 'Bill to'). | |
--model | str | Hugging Face model name: Chat model run remotely on Hugging Face Inference Providers, e.g. meta-llama/Llama-3.3-70B-Instruct. Available models are listed at https://router.huggingface.co/v1/models. Prefer instruct models: reasoning models that emit <think> blocks can confuse the answer parser. | "meta-llama/Llama-3.3-70B-Instruct" |
--provider | str | Provider: Leave empty to let Hugging Face route to an Inference Provider automatically. Or name a provider (e.g. groq, together, sambanova) or a routing policy (fastest, cheapest, preferred). | "" |
--bill-to | str | Bill to: Organization to bill Inference Providers usage to. Leave empty to bill the token's owner. | "" |
--labels.scheme | str | Label scheme: Labels asset with definitions. They replace the task's definitions of the same labels. | None |
--labels.ignore-task-labels | bool | Ignore label definitions from task: Only use the definitions from the agent's label scheme. | False |
--icon | str | Icon: Avatar shown for this agent's annotations.Available: bot, openai, gemini, claude, huggingface, mistral, ollama, wand, zap, tag, cpu | "huggingface" |
--settings.instructions | str | Agent instructions: Markdown document with guidelines for the agent. If annotation instructions from the task are used, the instructions are combined. | None |
--settings.ignore-task-instructions | bool | Ignore annotation instructions from task: Don't include the annotation instructions of the task the agent is assigned to. | False |
--temperature | float | Temperature | 0 |
--max-tokens | int | Max response tokens | 1024 |
--request-timeout | float | Request timeout (seconds) | 60 |
--poll-interval | float | Poll interval (seconds) | 1 |
--idle-shutdown-seconds | float | Idle shutdown (seconds): Stops the agent after it's been idle for this many seconds (0 = keep running). | 0 |
--project-id | str | Project ID to add agent to. Defaults to your saved project. | None |
--worker-class | str | Worker class to launch the agent on, as configured on your cluster | None |