Team Ai
Apppublic

build-small-hackathon/Agentfreefood

sourceHugging Faceupdated 4mo agoView on Hugging Face
2likes
App README

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:fastest via 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

  1. 1.User asks something in chat ("free food in Austin tonight").
  2. 2.The LLM decides whether to call its single tool: search_free_food(city, threshold).
  3. 3.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.
  4. 4.Events at or above the threshold are streamed back into the chat as a markdown table sorted by score.
  5. 5.If no tool is needed, the LLM just chats normally.

Setup

Set these as Space secrets (Settings โ†’ Variables and secrets):

NameRequiredValue
HF_TOKENyesHugging Face token with Make calls to Inference Providers permission
HF_MODELoptionalDefaults to Qwen/Qwen2.5-7B-Instruct:fastest
HF_ROUTER_BASE_URLoptionalDefaults to https://router.huggingface.co/v1
EXA_API_KEYyesGet one at https://exa.ai

MODEL_NAME is still accepted as a fallback for older deployments, but new setups should use HF_MODEL.

Run locally

bash
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.py

Open http://127.0.0.1:7860.

Files

  • โ€”app.py โ€” Gradio UI, tool-routing chat, custom design system
  • โ€”free_food_agent.py โ€” Exa search + LLM scoring pipeline
  • โ€”requirements.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?"