48 lines
1.8 KiB
Markdown
48 lines
1.8 KiB
Markdown
# Gadget Code
|
|
|
|
A self-hosted **Agentic Engineering Platform (AEP)** — an IDE that drives autonomous AI agents to perform software engineering work on your behalf, running in your own environment.
|
|
|
|
## Projects
|
|
|
|
| Package | Role |
|
|
|---|---|
|
|
| `gadget-code` | Web service — agentic IDE, browser UI, API server |
|
|
| `gadget-drone` | Worker process — runs the agentic workflow loop in workspace directories |
|
|
| `@gadget/ai` | Shared AI API abstraction — Ollama and OpenAI, called by both |
|
|
|
|
## AI API Abstraction (`@gadget/ai`)
|
|
|
|
All AI API calls throughout the Gadget Code ecosystem route through `@gadget/ai`. No consumer code imports Ollama or OpenAI SDKs directly. No consumer code checks `provider.sdk` after the factory call. The shared module translates Gadget Code's internal API contract into whatever provider is configured, and translates responses back to Gadget Code's internal types.
|
|
|
|
See `packages/ai/README.md` for the full API reference.
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
## Build
|
|
|
|
```bash
|
|
pnpm -r build # build all packages
|
|
pnpm --filter @gadget/ai build
|
|
pnpm --filter gadget-drone build
|
|
pnpm --filter gadget-code build:backend
|
|
```
|
|
|
|
## Run
|
|
|
|
```bash
|
|
# Backend
|
|
pnpm --filter gadget-code dev
|
|
|
|
# Drone worker (in a project workspace directory)
|
|
pnpm --filter gadget-drone dev
|
|
```
|
|
|
|
## Architecture
|
|
|
|
gadget-code runs on server infrastructure (MongoDB, Redis, etc.) and serves the browser-based IDE. gadget-drone runs on end-user machines, connecting via WebSocket to gadget-code, and executes the agentic workflow loop against local project directories via remote control. gadget-drone never connects directly to MongoDB or Redis — it communicates entirely through the Gadget Code API.
|
|
|
|
AI calls are handled by `@gadget/ai`, which both projects depend on. This keeps all AI SDK knowledge in one place. |