BSLBSL/ai-lab-m2-agent
0
ai-lab-m2-agent — Month 2 (generic-code, free tier)
Generic prompt → SmolAgentsCodeAgent+PythonExecutorTool+DatasetTool→{code, stdout, latency}. Free tier only:openai/gpt-oss-20b via Groq (3 models Inference Available)viahf-inference(toggle ON) or localSmolLM2-360M-Instruct(~700MB CPU).
Tools
python_interpreter(PythonExecutorTool, 10s timeout, no network) — fibonacci, csv filter, plot sin, prime 97, etc.dataset_search(DatasetTool, readsBSLBSL/month1-spam-sample50 rows) —keyword/limit→ filtered spam SMS for dataset-aware prompts (e.g. count FREE).
Demos
- VPS (live):
http://51.79.71.160.sslip.io/agent/andPOST /agent/runvia Caddyhandle_path /agent*→host.docker.internal:8001(host FastAPI, like/chat) - Static fallback:
index.htmlcallsPOST /agent/runwith JS; works with or without HF token.
API
curl -s http://51.79.71.160:8001/health
curl -s -X POST http://51.79.71.160:8001/agent/run -H 'Content-Type: application/json' -d '{"prompt":"fibonacci 20"}'
curl -s -X POST http://51.79.71.160:8001/agent/run -H 'Content-Type: application/json' -d '{"prompt":"count spam SMS containing FREE in BSLBSL/month1-spam-sample"}'Run locally
pip install -r requirements.txt
HF_TOKEN=hf_xxx REDIS_URL=redis://localhost:6379/0 uvicorn app:app --port 8001Metrics
Target ≥85% (17/20) generic-code stdout==expected, p50 <4s local 360M / <1s Groq via HF, tokens avg <400, tool calls avg 1.5–2.5. Cost $0. See METRICS.md.
