tuandunghcmut/qwen-agentworld-agent
0
๐ค Qwen-AgentWorld Tool-Calling Agent
A chatbot agent powered by `Qwen/Qwen-AgentWorld-35B-A3B` running on Hugging Face ZeroGPU.
The model acts as the agent policy: it decides which tool to call and with what arguments. The Space then executes the real tool and feeds the result back, looping until the model produces a final answer.
Tools available to the agent
How it works
- The user message is added to the conversation with the tool schemas (
tokenizer.apply_chat_template(..., tools=TOOL_SPECS)). - The model generates;
<tool_call>{...}</tool_call>blocks are parsed out. - Each tool runs, results are appended as
role: toolmessages. - Loop until the model answers in plain prose (max
MAX_TOOL_STEPS).
Configuration (Space variables / secrets)
Notes & caveats
- ZeroGPU requires a PRO account (or a Team/Enterprise org). This Space is hosted under a PRO account.
- The model is loaded in 4-bit (nf4) so the 35B MoE fits the ZeroGPU budget and loads quickly. Set the env var path / drop the quant config in
app.pyto run full precision on dedicated hardware. Qwen-AgentWorldis officially a world model (it can simulate environments). Here it is driven as a real tool-using agent; tool-call reliability may vary. Adjust the system prompt inapp.pyto taste.run_bash/run_pythonexecute inside the Space sandbox. Keep the Space private if you don't want arbitrary code execution exposed publicly.
