build-small-hackathon/Agentfreefood
Agent Free Food
๐ Live demo: https://huggingface.co/spaces/build-small-hackathon/Agentfreefood ๐ฆ Source: https://github.com/fozagtx/Agentfood ๐ฅ Demo video: https://youtu.be/MMg47HF4oVA ๐ฃ Social post: https://www.linkedin.com/posts/fawuzanibrahim_i-built-an-agent-that-finds-free-food-near-ugcPost-7472408995178414080-cNKX/ ๐ Field Notes blog: https://dev.to/ibrahimpima/i-built-an-agent-that-finds-free-food-near-you-3npb
An agentic chat that finds events with free food and free drinks in any city. Type a question โ the agent decides whether to chat or to run a live web search, scores each event with an LLM, and returns the best ones.
The agent instructions were prompt-tuned with Codex to surface the strongest free-food opportunities instead of generic event listings.
Powered by:
- Hugging Face Inference Providers running Qwen/Qwen2.5-7B-Instruct through the OpenAI-compatible router
- Exa neural web search
- Gradio UI
Build Small Submission
- Tracks: Backyard AI (
track:backyard) and Thousand Token Wood (track:wood) - Sponsor prize: Best Use of Codex (
sponsor:openai) - Achievements: Custom UI (
achievement:offbrand), Field Notes (achievement:fieldnotes) - Model:
Qwen/Qwen2.5-7B-Instruct:fastestvia Hugging Face Inference Providers, under the 32B parameter limit - Demo video: https://youtu.be/MMg47HF4oVA
- Social post: https://www.linkedin.com/posts/fawuzanibrahim_i-built-an-agent-that-finds-free-food-near-ugcPost-7472408995178414080-cNKX/
- Field Notes blog: https://dev.to/ibrahimpima/i-built-an-agent-that-finds-free-food-near-you-3npb
- Team HF username:
pima5
How it works
- User asks something in chat ("free food in Austin tonight").
- The LLM decides whether to call its single tool:
search_free_food(city, threshold). - If yes, the app runs Exa search across multiple curated queries, fetches page contents, and asks the LLM to score each event 0-100 on free-food likelihood.
- Events at or above the threshold are streamed back into the chat as a markdown table sorted by score.
- If no tool is needed, the LLM just chats normally.
Setup
Set these as Space secrets (Settings โ Variables and secrets):
MODEL_NAME is still accepted as a fallback for older deployments, but new setups should use HF_MODEL.
Run locally
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export HF_TOKEN="hf_..."
export HF_MODEL="Qwen/Qwen2.5-7B-Instruct:fastest"
export EXA_API_KEY="exa-..."
python app.pyOpen http://127.0.0.1:7860.
Files
app.pyโ Gradio UI, tool-routing chat, custom design systemfree_food_agent.pyโ Exa search + LLM scoring pipelinerequirements.txtโgradio==5.29.0,openai>1.0.0,exa-py
Try it
- "Find me free food events in San Francisco this week"
- "What's happening in NYC tonight with free drinks?"
- "Any free food events in Austin?"
