appsmith-api / README.md
Kakashiix26's picture
Deploy AppSmith API
30a8511 verified
|
Raw
History Blame Contribute Delete
2.33 kB
---
title: AppSmith API
emoji: πŸ”¨
colorFrom: red
colorTo: yellow
sdk: docker
app_port: 7860
pinned: false
---
# AppSmith API (CodyBuddy engine)
A LangGraph build agent: **planner β†’ architect β†’ coder**, plus VibeEngineer,
OnCall auto-repair, IntakeAgent, per-user Neon persistence, and a 7-provider
$0 model fallback chain. Serves the AppSmith frontend over FastAPI + SSE.
> Configuration (API keys, POSTGRES_URL, JWT_SECRET, GOOGLE_CLIENT_ID,
> ALLOWED_ORIGINS) is provided via **Space secrets**, never committed.
## Usage
```bash
uv run main.py "Build a colourful calculator app in html css and js"
uv run main.py # prompts interactively
```
## How it works
1. **Planner** β€” turns the request into a JSON plan (name, tech stack, features, file list).
2. **Architect** β€” breaks the plan into ordered, self-contained per-file tasks.
3. **Coder** β€” generates **all files concurrently** and writes them to `generated_project/`.
## Why it's fast & reliable
Designed after the NourishBot backend pattern:
- **OpenAI-compatible client directly** β€” no LangChain `with_structured_output`
(which forces fragile tool/json-schema mode). We prompt for JSON / raw text and
parse robustly, with a validation-retry loop on the structured steps.
- **Groq by default** β€” LPU inference is β‰ˆ5–10Γ— faster per token than NVIDIA NIM.
- **Parallel coder** β€” files are generated concurrently (ThreadPoolExecutor), so
wall-clock β‰ˆ the slowest single file, not the sum of all of them.
- **Bounded `max_tokens`** on every call.
> Reference build (3-file calculator) went from **~15 min (and failing)** to **~9 s**.
## Configuration (`.env`)
| Variable | Default | Notes |
|---|---|---|
| `LLM_PROVIDER` | `groq` if `GROQ_API_KEY` set, else `nvidia` | `groq` \| `nvidia` |
| `GROQ_API_KEY` | β€” | required for Groq |
| `NVIDIA_API_KEY` | β€” | required for NVIDIA NIM |
| `PLANNER_MODEL` | provider default | e.g. `llama-3.3-70b-versatile` |
| `CODER_MODEL` | provider default | override for a stronger coder model |
Provider defaults: Groq β†’ `llama-3.3-70b-versatile`, NVIDIA β†’ `meta/llama-3.1-70b-instruct`.
### Going even faster
- Set `CODER_MODEL=llama-3.1-8b-instant` (Groq) for near-instant small apps.
- Bump `MAX_CONCURRENCY` in `agent/graph.py` if your provider rate limits allow.