[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81736":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":9,"rankLanguage":9,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":18,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},81736,"PromptOps","732124645\u002FPromptOps","732124645","Open-source runtime platform for AI prompts, agents, and workflows.",null,"Go",31,1,0,40.9,"Apache License 2.0",false,"main",true,[],"2026-06-12 04:01:35","# PromptOps\n\nEnglish | [简体中文](README.zh-CN.md)\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002F732124645\u002FPromptOps?color=blue)](LICENSE)\n[![Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002F732124645\u002FPromptOps?include_prereleases&label=release)](https:\u002F\u002Fgithub.com\u002F732124645\u002FPromptOps\u002Freleases)\n[![CI](https:\u002F\u002Fgithub.com\u002F732124645\u002FPromptOps\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002F732124645\u002FPromptOps\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Docs](https:\u002F\u002Fgithub.com\u002F732124645\u002FPromptOps\u002Factions\u002Fworkflows\u002Fdocs.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002F732124645.github.io\u002FPromptOps\u002F)\n[![Stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002F732124645\u002FPromptOps?style=social)](https:\u002F\u002Fgithub.com\u002F732124645\u002FPromptOps\u002Fstargazers)\n\nOpen-source runtime platform for AI prompts, agents, and workflows.\n\n> **Stop hardcoding prompts in your application.**\n\nPromptOps is a **Prompt Runtime platform** for AI applications. It decouples\nprompts, agents and workflows from code, so AI applications can hot-reload,\nversion, publish, gray-release and observe their prompts at runtime.\n\nCore idea: **Build → Version → Deploy → Runtime → Observe** prompts.\n\n## Security Notice\n\nThe defaults below are intentionally easy so `docker compose up` works out of\nthe box for local development. **Do not run a default-configured PromptOps\ninstance on the public internet.**\n\nBefore any production deployment, change at minimum:\n\n- The static token `PROMPTOPS_TOKEN` (default `promptops-dev-token`) — replace\n  with a high-entropy secret\n- The seeded `admin` \u002F `admin` account password (log in once, then change it\n  in the Web UI)\n- Terminate TLS at a reverse proxy (Nginx \u002F Caddy) in front of `:8080`\n- Restrict CORS and admin-UI access to trusted hosts \u002F networks\n- Mount the SQLite file on a persistent, backed-up volume\n\nThe full hardening checklist and vulnerability-reporting process live in\n[`SECURITY.md`](SECURITY.md).\n\n## Status\n\nThe MVP, SDKs \u002F hot-reload, Playground, Agent \u002F Workflow runtime, observability\nand audit are all complete.\n\n| Module | Stack | Description |\n|---|---|---|\n| Backend | Go + Gin + GORM + SQLite | Prompt CRUD \u002F search \u002F versioning \u002F multi-env \u002F SDK API |\n| Hot Reload | WebSocket (`\u002Fws`) | Real-time prompt-change push to connected clients |\n| Frontend | Vue 3 + Vite + Naive UI + Pinia | Prompt \u002F Agent \u002F Workflow \u002F Playground \u002F Observability pages |\n| SDK | Node (depends on `ws`) \u002F Python \u002F Java (zero-dependency) | Fetch prompts by key, render templates, WebSocket hot-reload |\n| Playground | Model gateway (mock \u002F OpenAI \u002F Claude \u002F Ollama \u002F Gemini) | Fill variables, call models, view results; version diff |\n| Agent | Config-driven agent (prompt + provider + model) | Save reusable configs and run with one click |\n| Workflow | Step engine (render → model → transform) | Orchestrate multi-step flows, chain output, view step trace |\n| Observability | Audit log + run log + token stats + connected clients | Records every change and model call, aggregates run metrics |\n| RBAC | Users \u002F roles \u002F sessions (PBKDF2 passwords) | admin \u002F editor \u002F viewer roles, route access by role |\n| Gray Release | Rollout (A\u002FB traffic split by key + env) | The SDK returns one of two versions by weight |\n| Workspace | Workspace | Prompts \u002F Agents \u002F Workflows grouped by workspace, switchable in the UI |\n\n## Project structure\n\n```txt\nPromptOps\u002F\n├── server\u002F      # Go backend (Gin + GORM + SQLite)\n├── web\u002F         # Vue 3 frontend (Vite + Naive UI)\n├── sdk\u002F         # Runtime SDKs (node \u002F python \u002F java)\n├── docs\u002F        # Design docs\n├── scripts\u002F     # Smoke tests and other scripts\n├── Dockerfile\n└── docker-compose.yml\n```\n\n## Local development\n\n### Backend\n\n```bash\ncd server\ngo mod tidy\ngo run .            # listens on :8080 by default; SQLite file at server\u002Fdata\u002Fpromptops.db\n```\n\nEnvironment variables: `PROMPTOPS_ADDR` (default `:8080`), `PROMPTOPS_DB`,\n`PROMPTOPS_TOKEN` (default `promptops-dev-token`).\n\n### Frontend\n\n```bash\ncd web\nnpm install\nnpm run dev         # http:\u002F\u002Flocalhost:5173, proxied to the backend on :8080\n```\n\nDefault login: `admin` \u002F `admin` (created on first start). The static token\n`promptops-dev-token` also works as an admin credential for SDKs and scripts.\n\n## Docker deployment\n\n```bash\ndocker compose up --build   # builds frontend + backend, open http:\u002F\u002Flocalhost:8080\n```\n\n## API overview\n\n| Method | Path | Description |\n|---|---|---|\n| POST | `\u002Fapi\u002Flogin` | Log in (username \u002F password, or static token) |\n| GET | `\u002Fapi\u002Fme` | Current user and role |\n| GET\u002FPOST\u002FPUT\u002FDELETE | `\u002Fapi\u002Fusers` `\u002Fapi\u002Fusers\u002F:id` | User management (admin only) |\n| GET\u002FPOST\u002FDELETE | `\u002Fapi\u002Fworkspaces` `\u002Fapi\u002Fworkspaces\u002F:id` | Workspace management |\n| GET | `\u002Fapi\u002Fprompts` | List \u002F search (`q`, `env`, `category`, `tag`) |\n| POST | `\u002Fapi\u002Fprompts` | Create |\n| GET\u002FPUT\u002FDELETE | `\u002Fapi\u002Fprompts\u002F:id` | Get \u002F update \u002F delete |\n| GET | `\u002Fapi\u002Fprompts\u002F:id\u002Fversions` | Version history |\n| POST | `\u002Fapi\u002Fprompts\u002Fpublish` | Publish (snapshot current content as a version) |\n| POST | `\u002Fapi\u002Fprompts\u002Frollback` | Roll back to a version |\n| GET\u002FPUT\u002FDELETE | `\u002Fapi\u002Fprompts\u002F:id\u002Frollout` | Gray release (A\u002FB) config |\n| GET | `\u002Fapi\u002Fsdk\u002Fprompts\u002F:key?env=` | SDK runtime fetch by key |\n| POST | `\u002Fapi\u002Fplayground\u002Frun` | Render a prompt and call a model provider |\n| GET | `\u002Fapi\u002Fplayground\u002Fproviders` | List available model providers |\n| GET\u002FPOST\u002FPUT\u002FDELETE | `\u002Fapi\u002Fagents` `\u002Fapi\u002Fagents\u002F:id` | Agent CRUD |\n| POST | `\u002Fapi\u002Fagents\u002F:id\u002Frun` | Run an agent |\n| GET\u002FPOST\u002FPUT\u002FDELETE | `\u002Fapi\u002Fworkflows` `\u002Fapi\u002Fworkflows\u002F:id` | Workflow CRUD |\n| POST | `\u002Fapi\u002Fworkflows\u002F:id\u002Frun` | Run a workflow, returns the step trace |\n| GET | `\u002Fapi\u002Faudit` | Audit log (change records) |\n| GET | `\u002Fapi\u002Fruns` | Run log (model-call records) |\n| GET | `\u002Fapi\u002Fruns\u002Fstats` | Aggregated run metrics (count \u002F tokens \u002F latency) |\n| GET | `\u002Fapi\u002Fclients` | Live hot-reload connections (SDKs & browser) |\n| GET | `\u002Fws` | WebSocket hot-reload event stream |\n\nAll `\u002Fapi\u002F*` routes except `\u002Fapi\u002Flogin` and `\u002Fhealth` require\n`Authorization: Bearer \u003Ctoken>`; the `\u002Fws` WebSocket authenticates via a\n`?token=` query parameter. Write operations require the `editor` role or above,\nuser management requires `admin`; `viewer` can only read and run.\n\n## SDK\n\nPromptOps provides lightweight runtime SDKs for fetching prompts by key,\nrendering `{{variable}}` templates, and hot-reload over WebSocket (`watch()` —\nthe local cache refreshes automatically when a prompt changes on the server).\n\n- `sdk\u002Fnode` — Node.js (Node 18+, depends only on `ws`; uses the built-in `fetch`)\n- `sdk\u002Fpython` — Python (zero-dependency, standard library only, with a minimal WebSocket client)\n- `sdk\u002Fjava` — Java (zero-dependency, pure JDK, uses `java.net.http`)\n\nNode example:\n\n```js\nimport { PromptOpsClient } from '@promptops\u002Fclient'\n\nconst client = new PromptOpsClient({ server: 'http:\u002F\u002Flocalhost:8080', namespace: 'prod' })\n\nconst text = await client.render('sql.generator', { question: 'list all users' })\n\nclient.on('update', (e) => console.log('prompt hot-reloaded:', e.key))\nclient.watch()\n```\n\n## Examples\n\nEnd-to-end runnable demos live under [`examples\u002F`](examples\u002F):\n\n- [`examples\u002Fnode-hot-reload`](examples\u002Fnode-hot-reload) — minimal Node\n  consumer that fetches a prompt every few seconds and reflects edits made\n  in the Web UI without restarting\n- [`examples\u002Fsql-agent`](examples\u002Fsql-agent) — natural-language → SQL agent\n  showing how to change generation rules at runtime by editing the prompt\n  (uses the built-in `mock` provider, so no API key is required)\n\nSee [`examples\u002FREADME.md`](examples\u002FREADME.md) for the full list and\ncontribution ideas.\n\n## CI\n\n`.github\u002Fworkflows\u002Fci.yml` verifies on GitHub runners: the backend\n(`go build`, `go test`, smoke test), the frontend (`npm run build`), unit tests\nfor all three SDKs, and an integration job — starting a real server and running\neach SDK's full \"fetch → render → WebSocket hot-reload\" path.\n\n## Documentation\n\nOnline documentation site (VitePress, hosted on GitHub Pages):\n\u003Chttps:\u002F\u002F732124645.github.io\u002FPromptOps\u002F> — the source lives in `website\u002F` and\nis built and published by `.github\u002Fworkflows\u002Fdocs.yml`.\n\nThe full design document is at [docs\u002FPromptOps.md](docs\u002FPromptOps.md), covering\npositioning, core concepts, MVP scope, architecture, database and API design,\nSDKs, hot-reload, deployment and the roadmap.\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=732124645\u002FPromptOps&type=Date)](https:\u002F\u002Fstar-history.com\u002F#732124645\u002FPromptOps&Date)\n","PromptOps 是一个开源的AI提示、代理和工作流运行时平台。它通过将提示、代理和工作流与代码解耦，实现了AI应用中的热重载、版本控制、发布、灰度发布以及运行时观察等功能。项目基于Go语言开发，并利用了Gin、GORM等技术栈，支持多种编程语言的SDK接入，如Node.js、Python和Java。适用于需要灵活管理和迭代AI提示及流程的企业级应用场景，特别是在追求快速迭代与持续集成的软件开发环境中。",2,"2026-06-11 04:06:12","CREATED_QUERY"]