Delete README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657---title: Forgeemoji: π οΈcolorFrom: yellowcolorTo: graysdk: dockerapp_port: 7860pinned: false---
# Forge
A self-improving assistant you talk to like a person. Ask it to do something; if it doesn'talready have the tool for the job, it writes one and puts it in front of you for approvalbefore it ever runs. If an approved tool breaks, it patches itself and sends the patch backfor approval too.
## How it works
- **Chat** β plain conversation, backed by your Inference Port API.- **Tools** β small JavaScript functions (`async function run(args) { ... }`) that Forge writes on demand and calls like normal functions once approved.- **Approval gate** β nothing Forge writes runs until you hit *Approve* on its ticket card. Decline it and Forge is told why (if you give a reason) so it can try something else.- **Self-healing** β if a tool throws, Forge automatically drafts a fix and files it as a new ticket. The broken tool keeps its old code until the fix is approved.- **Sandboxing** β tool code runs in a restricted `vm` context with a timeout, not a fully hardened sandbox. The approval step is the real safety boundary β read the code before approving it, same as you would review a PR.
## Setup
1. **Set Space secrets/variables** (Settings β Variables and secrets): - `INFERENCE_API_URL` β the chat completions endpoint for your Inference Port API. Double-check this is current before deploying; see `.env.example` for the last known value. - `INFERENCE_API_KEY` β your key, as a **secret**, not a variable. - `INFERENCE_MODEL` β defaults to `llama-3.3-70b-versatile` if unset. - `AGENT_NAME` β optional, defaults to `Forge`. - `USE_PERSISTENT_STORAGE` β set to `true` to store tools at `/data/forge-tools` (requires persistent storage enabled in Space settings).
2. **Persistence.** Tools are written to `/data/forge-tools` if the **`USE_PERSISTENT_STORAGE`** env var is set to `true` **and** the Space has persistent storage enabled, otherwise they fall back to a local folder that's wiped on every rebuild. Turn on persistent storage in Space settings and set `USE_PERSISTENT_STORAGE=true` if you want tools to survive restarts.
3. Push this repo to your Space. The `Dockerfile` builds and runs it on port 7860.
## Local dev
```bashnpm installcp .env.example .env # fill in your valuesnpm start```
Then open http://localhost:7860.README.mdDeleted-57