{
  "name": "LUAF",
  "symbol": "LUAF",
  "description": "# LUAF — Large-scale Unified Agent Foundry\n\nLUAF turns a **business brief** into a **research → build → validate → launch** pipeline for autonomous business units. You describe a use case (or leave it blank for an AI-generated idea); LUAF runs web search, optional planner/designer LLM steps, validation (with auto pip-install on missing imports), and publish to [swarms.world](https://swarms.world) with optional Solana tokenization.\n\n**Repository:** [github.com/Euroswarms-Institute/LUAF](https://github.com/Euroswarms-Institute/LUAF)\n\n---\n\n## What it does\n\n- **Topic / brief:** You provide a short description of the autonomous unit you want (e.g. \"DeFi backtester for ETH/USDT\") or press Enter to have the LLM generate a monetizable idea.\n- **Research:** DuckDuckGo (and optional multi-hop RAG) gathers context.\n- **Plan (optional):** Planner produces a structured plan; executor fills a template.\n- **Design:** Designer LLM produces a full Python agent (name, ticker, code, requirements, use cases). Quality packages (e.g. swarms, loguru, tinydb, requests) are enforced per topic.\n- **Validate:** Generated script is run in a subprocess. On `ModuleNotFoundError`, LUAF runs `pip install <module>` and retries. Optional urllib3/Retry compatibility fix is applied. If validation fails, the user can choose to publish anyway or validate manually.\n- **Publish:** Payload is sent to `POST /api/add-agent` with Bearer token (SWARMS_API_KEY). Dry-run by default; set `LUAF_DRY_RUN=0` and provide `SOLANA_PRIVATE_KEY` for tokenized launch.\n- **Persistent mode:** Loop until wallet balance reaches a target SOL; each iteration can use a new or fixed topic (env/file list).\n\n---\n\n## Environment variables (summary)\n\n| Variable | Purpose |\n|----------|---------|\n| `OPENAI_API_KEY` | LLM (designer, topic generator, planner). Required for pipeline. |\n| `OPENAI_BASE_URL` | Optional; default `https://api.openai.com/v1`. |\n| `SWARMS_API_KEY` | Bearer token for publish and Swarms Cloud. |\n| `LUAF_TOPIC` | Default topic/brief; empty = generate via LLM. |\n| `LUAF_DRY_RUN` | `1` (default) = no real publish; `0` = publish. |\n| `LUAF_USE_PLANNER` | Use planner + executor (default 1). |\n| `LUAF_USE_DESIGNER` | Use designer LLM (default 1). |\n| `LUAF_GENERATED_AGENTS_DIR` | Where to save generated .py files; `.` = same dir as LUAF.py. |\n| `SOLANA_PRIVATE_KEY` / `SOLANA_PRIVATE_KEY_FILE` | For tokenized publish. |\n| `CREATOR_WALLET` / `SOLANA_PUBKEY` | Creator pubkey for balance and claims. |\n| `LUAF_MODE` | `persistent` = run autonomous loop on startup. |\n| `LUAF_MAX_MISSING_IMPORT_RETRIES` | Retries for pip-install on validation (default 3). |\n\nSee repo README and in-code comments for the full list.\n\n---\n\n## Usage tutorials\n\n### 1. Interactive menu (TUI or CLI)\n\n```bash\npython LUAF.py\n```\n\n- If Textual is installed: TUI with balance, target SOL, current brief, live log. Use **s** to stop, **q** to quit.\n- Otherwise: text menu — 1 = Pipeline, 2 = Persistent, 0 = Exit.\n\n### 2. Single pipeline run (no TUI)\n\n```bash\npython LUAF.py --no-tui -o\n```\n\n- Prompts: business use case or brief (Enter = generate), unit name (Enter = auto), ticker (Enter = auto).\n- Runs one designer cycle (up to MAX_STEPS with validation retries). Saves generated unit to `<Name>.py` or `generated_agent_step<N>.py`. On validation failure, asks whether to publish without validation and mentions manual validation.\n\n### 3. Persistent (autonomous loop)\n\n```bash\npython LUAF.py --persistent\n# or\nLUAF_MODE=persistent python LUAF.py\n```\n\n- Runs until Solana balance >= `LUAF_PERSISTENT_TARGET_SOL` (default 10) or user stops.\n- Each iteration: get next topic (single / env list / file), search, designer, validate, publish if funds, run unit once, optional delayed claim.\n\n### 4. Self-train pipeline\n\n```bash\npython LUAF.py --self-train \"Your topic here\"\npython LUAF.py --self-train   # uses LUAF_TOPIC or default\n```\n\n### 5. Legacy positional\n\n```bash\npython LUAF.py run        # same as --once\npython LUAF.py persistent # same as --persistent\n```\n\n### 6. Help\n\n```bash\npython LUAF.py --help\n```\n\nShows description, epilog examples, and all flags (--no-tui, --once, --persistent, --self-train).\n\n---\n\n## Requirements (for running LUAF)\n\nCore: `requests`, `python-dotenv`, `loguru`, `ddgs`. Optional: `textual` (TUI), `sentence-transformers` (RAG), `swarms`, `toolbox`, `planner`, `executor`, `tinydb` (designer quality-packages). See [requirements.txt](https://github.com/Euroswarms-Institute/LUAF) in the repo.\n",
  "image": "https://static-create.jup.ag/images/6MDzvUPXbnfhtAbtYhyVNFJnSv5KJBzg3BUxwoJAswrm"
}