Slice · AI prompt
Central operator console for the whole AI stack. Every other ai-* feature reads its registries from here. Tabs ordered to match the build-flow: 1. Providers — register Anthropic / OpenAI / Google / Mistral / Ollama (API keys AES-encrypted at rest) 2. Models — per-provider catalog (capabilities, context window, pricing) 3. Instructions — custom system-prompt library (Claude Projects-style) 4. Skills — named instruction + model default + tool defaults (consumed by chat + studio) 5. Tools — JSON-schema function specs + impl (http / convex / shell) + sandbox flag 6. Agents — skill × model × tools × max-iter (consumed by ai-agents) 7. Budgets — per-workspace cost caps + alerts + hard kill 8. Audit — every AI call: actor / agent / tokens / cost / latency / outcome Includes Create-Agent / Create-Skill / Create-Tool / Create-Instruction wizards.
# Install `ai-admin` — AI Admin — Console (Instructions · Skills · Tools · Agents · Providers)
> Central operator console for the whole AI stack.
📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail : https://resource.rahmanef.com/slices/ai-admin
🧠 JSON catalog : https://resource.rahmanef.com/api/knowledge?slice=ai-admin
🔗 Source : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/ai-admin
## 1. Install
```bash
# alias: npx rr add ai-admin
```
The CLI copies `frontend/slices/ai-admin/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.
## 2. What it ships
- shadcn primitives: `card`, `button`, `badge`, `tabs`, `table`, `dialog`, `input`, `label`, `select`, `textarea`, `switch`, `command`
- peer slices (cascade install):
- `convex-auth` — requireAdmin gate.
- `rbac-roles` — Section gated by ai.* permissions (manage_providers, manage_skills, etc).
- `admin-panel` — Lives as a registered admin section.
- `audit-log` — Every config change + AI call routes through audit-log.
- env vars:
- `AI_ADMIN_ENCRYPTION_KEY` (convex, required) — Encrypts stored provider API keys at rest.
- convex feature paths: `convex/features/ai`
## 3. Wire it up
Run `npx rr add ai-admin`. Adds an `AI` section to the admin-panel ADMIN_SECTIONS registry. Sub-tabs ordered to match build-flow: Providers → Models → Instructions → Skills → Tools → Agents → Budgets → Audit. Includes Create-* wizards for instructions / skills / tools / agents. API keys AES-encrypted via AI_ADMIN_ENCRYPTION_KEY env. The instruction / skill / tool / agent registries are SSOTs consumed by every ai-* consumer slice (chat + studio + agents).
## Rules of engagement
- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice
The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.