Documentation for Cloning the Ml Intern HF Space

#38
by david-thrower - opened

Hi @smolagents team,

First off, thank you for the excellent work on this Space it’s proven really powerful to propel my work.

Issue 1: Frequent capacity limits

Over the past few days I’ve been regularly hitting the server capacity error when trying to start a new conversation:

Server is at capacity (226/200 sessions)

This makes it difficult to rely on the public Space during peak hours.

Issue 2: Cloning is blocked by undocumented secrets

To keep working (and to avoid adding more load to your shared demo), I tried cloning the Space into my own private Hugging Face account. However, the repository requires a large number of secrets / environment variables, and there is no clear indication of:

  • Which variables are strictly required for the Space to boot at all.
  • Which are optional and only needed for specific tools or integrations.
  • What scopes / permissions each token needs.

I made an educated guess and populated what seemed like the core ones:

  • A Hugging Face token with permissions to start Spaces, push to repos, and reach inference providers.
  • A GitHub token with write access to repositories.

Unfortunately, the cloned Space still fails to start, so I’m stuck.

Request / Suggestion

Could you please add a section in the readme:

  1. A minimal list of required secrets / env vars needed just to get a private clone running.
  2. A list of optional secrets / env vars and what specific features they enable.
  3. The exact scopes / permissions required for each token (e.g., repo, write:packages, manage_spaces, etc.).
  4. If possible, a short “Self-hosting” or “Clone this Space” section in the README.

Having this would let power users run our own instances reliably, which should also take pressure off the public demo.

I’m happy to share the specific startup logs from my failed clone if that helps diagnose the issue.

The logs show:

===== Application Startup at 2026-05-13 21:25:37 =====

/app/.venv/lib/python3.12/site-packages/whoosh/analysis/filters.py:56: SyntaxWarning: invalid escape sequence '\w'
\w+([:.]?\w+)* # word characters, with opt. internal colons/dots
/app/.venv/lib/python3.12/site-packages/whoosh/analysis/filters.py:158: SyntaxWarning: invalid escape sequence '\S'

ana = RegexTokenizer(r"\S+") | TeeFilter(f1, f2)
/app/.venv/lib/python3.12/site-packages/whoosh/analysis/intraword.py:49: SyntaxWarning: invalid escape sequence '\S'
analyzer = RegexTokenizer(r"\S+") | cwf
/app/.venv/lib/python3.12/site-packages/whoosh/analysis/intraword.py:275: SyntaxWarning: invalid escape sequence '\S'
analyzer = RegexTokenizer(r"\S+") | iwf | LowercaseFilter()
/app/.venv/lib/python3.12/site-packages/whoosh/analysis/intraword.py:285: SyntaxWarning: invalid escape sequence '|'
def init(self, delims=u("-_'"()!@#$%^&*[]{}<>|;:,./?`~=+"),
2026-05-13 21:26:05,593 - main - INFO - Serving static files from /app/static
INFO: Started server process [7]
INFO: Waiting for application startup.
2026-05-13 21:26:05,594 - main - INFO - Starting HF Agent backend...
2026-05-13 21:26:05,671 - kpis_scheduler - INFO - kpis_scheduler: started (cron '5 * * * *' UTC)
2026-05-13 21:26:05,671 - kpis_scheduler - WARNING - kpis_scheduler: rollup for 2026-05-13 20:00:00+00:00 failed: [Errno 2] No such file or directory: '/app/scripts/build_kpis.py'
2026-05-13 21:26:05,672 - kpis_scheduler - WARNING - kpis_scheduler: rollup for 2026-05-13 19:00:00+00:00 failed: [Errno 2] No such file or directory: '/app/scripts/build_kpis.py'
2026-05-13 21:26:05,672 - kpis_scheduler - WARNING - kpis_scheduler: rollup for 2026-05-13 18:00:00+00:00 failed: [Errno 2] No such file or directory: '/app/scripts/build_kpis.py'
2026-05-13 21:26:05,672 - kpis_scheduler - WARNING - kpis_scheduler: rollup for 2026-05-13 17:00:00+00:00 failed: [Errno 2] No such file or directory: '/app/scripts/build_kpis.py'
2026-05-13 21:26:05,672 - kpis_scheduler - WARNING - kpis_scheduler: rollup for 2026-05-13 16:00:00+00:00 failed: [Errno 2] No such file or directory: '/app/scripts/build_kpis.py'
2026-05-13 21:26:05,672 - kpis_scheduler - WARNING - kpis_scheduler: rollup for 2026-05-13 15:00:00+00:00 failed: [Errno 2] No such file or directory: '/app/scripts/build_kpis.py'
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
INFO: 10.16.5.109:8371 - "GET /?logs=container&__sign=[redacted]DQ HTTP/1.1" 200 OK
INFO: 10.16.2.47:51852 - "GET /assets/index-CTDlGvua.js HTTP/1.1" 200 OK
INFO: 10.16.15.8:14920 - "GET /assets/index-CTDlGvua.js HTTP/1.1" 206 Partial Content
INFO: 10.16.5.109:8371 - "GET /auth/me HTTP/1.1" 401 Unauthorized
21:26:07 - LiteLLM:INFO: utils.py:4004 -
LiteLLM completion() model= us.anthropic.claude-opus-4-6-v1; provider = bedrock
2026-05-13 21:26:07,353 - LiteLLM - INFO -
LiteLLM completion() model= us.anthropic.claude-opus-4-6-v1; provider = bedrock
INFO: 10.16.2.47:51852 - "GET /auth/status HTTP/1.1" 200 OK
INFO: 10.16.20.80:26889 - "GET /smolagents.webp HTTP/1.1" 200 OK
2026-05-13 21:26:09,635 - routes.agent - WARNING - LLM health check failed (auth): litellm.AuthenticationError: BedrockException Invalid Authentication - Unable to locate credentials
INFO: 10.16.34.163:32618 - "GET /api/health/llm HTTP/1.1" 200 OK

But when I click the link to: https://david-thrower-ml-intern.hf.space/ - I get a "404 Sorry, we can’t find the page you are looking for".

Thanks for your time!

GITHUB_TOKEN="YOUR_VALUE_HERE"
HF_ADMIN_TOKEN="YOUR_VALUE_HERE"
ANTHROPIC_API_KEY="YOUR_VALUE_HERE"
INFERENCE_TOKEN="YOUR_VALUE_HERE"
HF_NAMESPACE="YOUR_VALUE_HERE"
HF_SESSION_UPLOAD_TOKEN="YOUR_VALUE_HERE"
HF_BILL_TO="YOUR_VALUE_HERE"
CLAUDE_FREE_DAILY="YOUR_VALUE_HERE"
CLAUDE_PRO_DAILY="YOUR_VALUE_HERE"
AWS_ACCESS_KEY_ID="YOUR_VALUE_HERE"
AWS_SECRET_ACCESS_KEY="YOUR_VALUE_HERE"
AWS_REGION="YOUR_VALUE_HERE"
MONGODB_DB="YOUR_VALUE_HERE"
MONGODB_URI="YOUR_VALUE_HERE"
OPENAI_API_KEY="YOUR_VALUE_HERE"
HF_EMPLOYEE_ORG="huggingface"

Sign up or log in to comment