Spaces:
Sleeping
Sleeping
metadata
title: agent-prompts — FORGE Prompt Registry
emoji: 💬
colorFrom: red
colorTo: purple
sdk: docker
pinned: true
license: mit
short_description: Versioned prompt library, persona management, and A/B
💬 agent-prompts
FORGE Prompt & Persona Registry
No more hardcoded system prompts. Every agent fetches its persona at startup from here. Owns: prompt templates, personas, A/B test variants, approval workflow.
Seeded prompts (migrated from existing spaces)
| ID | Type | Agent | Description |
|---|---|---|---|
nexus_router |
system | nexus | NEXUS routing & slot management persona |
pulse_scheduler |
system | pulse | PULSE ReAct scheduler persona |
self_reflect_prompt |
user | * | Post-task self-reflection (migrated from PULSE) |
task_decompose |
user | * | Break tasks into ordered subtasks |
error_recovery |
user | * | Graceful error handling in ReAct loops |
react_base |
system | * | Generic ReAct Thought/Action/Observation fragment |
relay_notification |
user | relay | Telegram notification template |
loop_improvement_cycle |
system | loop | LOOP orchestrator persona |
REST API
GET /api/prompts List/search (agent, type, status, tag, q)
GET /api/prompts/{id} Get prompt (latest version)
GET /api/prompts/{id}/render Render — pass variables as query params
GET /api/prompts/{id}/versions Version history
GET /api/prompts/{id}/ab A/B stats
POST /api/prompts Create/version a prompt
POST /api/prompts/{id}/approve Approve for production
POST /api/prompts/{id}/deprecate Deprecate
GET /api/personas List active personas
GET /api/personas/{agent} Get persona with rendered system prompt
POST /api/personas Upsert persona
POST /api/ab Record A/B outcome
GET /api/stats Registry stats
MCP
GET /mcp/sse · POST /mcp
Tools: prompts_get, prompts_search, prompts_create, prompts_approve,
persona_get, persona_set, ab_record, prompts_stats
Integration pattern for existing spaces
Add PROMPTS_URL secret, then at startup:
import os, requests
PROMPTS_URL = os.getenv("PROMPTS_URL", "https://chris4k-agent-prompts.hf.space")
_cached_persona = None
def get_system_prompt(fallback: str) -> str:
global _cached_persona
if _cached_persona: return _cached_persona
try:
r = requests.get(f"{PROMPTS_URL}/api/personas/nexus", timeout=3)
_cached_persona = r.json().get("system_prompt", fallback)
return _cached_persona
except Exception:
return fallback # always safe — never blocks startup
Secrets
| Key | Description |
|---|---|
PROMPTS_KEY |
Optional write auth (X-Prompts-Key header) |
Built by Chris4K — ki-fusion-labs.de