base_dir = "/mnt/agents/output/swarm-cli" # Fix README.md with proper Hugging Face Spaces frontmatter readme_content = '''--- title: Swarm CLI emoji: 🐝 colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 4.0.0 app_file: app.py pinned: false --- # 🐝 Swarm CLI Multi-agent AI system with 100+ tools, running entirely on free API tiers. ## Features - **8 Agent Categories**: File System, Shell, Web, Code, Data, Media, System, Memory - **30 Core Tools** with parameter multiplication = **100+ capabilities** - **Dual LLM**: Groq (fast/cheap) + Gemini (deep reasoning) - **Safety First**: Sandboxed file access, user confirmation for destructive ops - **Persistent Memory**: JSON-based knowledge storage ## Deployment ### Hugging Face Spaces 1. Create new Space with Gradio SDK 2. Upload all files 3. Add secrets: `GROQ_API_KEY`, `GEMINI_API_KEY` 4. Deploy ### Local ```bash pip install -r requirements.txt # Create .env with your keys python app.py ``` ## Tool Categories | Category | Tools | Examples | |----------|-------|----------| | File System | 8 | read, write, search, info, copy, move, delete, list | | Shell | 6 | bash, python, process, system, env, packages | | Web | 7 | search, fetch, scrape, api, dns, port, download | | Code | 6 | lint, format, git, deps, structure, search | | Data | 5 | convert, text, filter, calc, hash | | Media | 4 | image, pdf, audio, archive | | System | 3 | monitor, network, clipboard | | Memory | 3 | save, search, delete, stats | ## API Keys (Free Tiers) - **Groq**: https://console.groq.com (1,400 req/day) - **Gemini**: https://aistudio.google.com/app/apikey (1,500 req/day) ## License MIT ''' with open(f"{base_dir}/README.md", "w") as f: f.write(readme_content) print("README.md fixed with Hugging Face frontmatter")