VibeServer

Prompt-driven backend framework

v0.3.0 Python 3.11+ MIT License FastAPI + LiteLLM

Replace REST endpoints with natural language. Input is NL, processing is LLM reasoning + tool orchestration, output is structured response. A controlled hallucination engine with guardrails.

↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
┃ Architecture ┃

Request Lifecycle

Gateway
core/gateway.py
Context
core/context.py
LLM Planner
planners/hybrid.py
Executor
core/executor.py
Tool Registry
tools/registry.py
State / DB
storage/db.py
Responder
core/responder.py
{ }
Client
JSON Response
┃ Tool Registry ┃

Built-in Tools

9 pre-registered tools. All actions go through strict schema validation.

compute System

Transform data with 6 operations — uppercase, lowercase, json_parse, json_stringify, length, sum.

6Operations
λPure
create_record Data

Create a database record with owner scoping. Content stored as JSON with automatic type and metadata.

Capacity
+Mutation
search Data

Search records by type with pagination. Results limited to 100 max. Owner-scoped by default.

100Max Limit
Pagination
update_record Data

Update an existing record by ID. Validates ownership before mutation. Returns updated data.

Requires ID
Validated
delete_record Data

Delete a record by ID with ownership verification. Destructive action — gated behind auth check.

Destructive
Requires ID
auth Security

Verify API keys via SHA-256 hash lookup. Returns user identity on success. Entry point for authenticated flows.

SHAHash Algo
🔑Bearer
get_user Security

Look up user by ID. Self-access only unless admin. Defense-in-depth with dual permission check.

Self-only
AdminOverride
list_users Admin

List all users with pagination. Admin only. Passwords excluded from output. Limit capped at 100.

🛡Admin Only
100Max Limit
stats System

System statistics — user count, record count, DB type. No authentication required. Dashboard feed.

No Auth
📊Dashboard
┃ Quick Start ┃

5 lines to a running server

app.py from vibeserver import VibeServer vs = VibeServer() @vs.tool("greet", description="Greet a user by name") def greet(name: str) -> dict: return {"message": f"Hello, {name}!"} @vs.tool("calculate", description="Evaluate a math expression") def calculate(expression: str) -> dict: result = eval(expression) return {"result": result} @vs.tool("fetch_weather", description="Get weather for a city") def fetch_weather(city: str) -> dict: return {"city": city, "temp": "22°C", "condition": "sunny"} vs.run() # → http://localhost:8000

Install

pip install vibeserver

Scaffold

vibeserver init my-app
vibeserver serve

Then call it

POST /
{"input": "greet Alice"}
→ {"message": "Hello, Alice!"}

┃ Core Engine ┃

Intent Graph

Persistent NL→plan cache. No embedding model. Repeats skip the LLM entirely.

INPUT "greet Alice" Natural Language FINGERPRINT n-gram extraction cosine similarity threshold: 0.92 Zero-cost matching HIT MISS CACHE HIT plan retrieval ~0ms latency Skip LLM entirely LLM PLANNER reasoning tool selection ~1200ms latency Full reasoning chain GRAPH STORE plan caching index update Persistent storage PLAN [step_1, step_2] 87% Cache hit rate 0 Embedding models Unlimited patterns ~0ms Repeat latency
0
Dependencies
No vector DB, no embedding API, no external services
n-gram
Algorithm
Text fingerprinting with cosine similarity matching
TTL
Cache Policy
Time-to-live expiry with automatic invalidation
Patterns
Stores unlimited NL→plan mappings in memory
39
Source Files
2.4k
Lines of Code
14
API Endpoints
9
Built-in Tools
13/14
Spec Coverage
0.3.0
Version
┃ Capabilities ┃

Beyond the Spec

Intent Graph
Featured above — persistent NL→plan cache with n-gram fingerprinting. Zero dependencies, instant repeats.
SSE Streaming
Server-Sent Events for step-level execution visibility. Watch the planner reason and tools execute in real time.
Web Dashboard
Full SPA with auth flow, chat interface, live metrics, history browser. Zero frameworks — vanilla JS + fetch + SSE.
Dual Database
SQLite for dev, PostgreSQL for production. Auto-detection with pool pre-ping health checks. Single interface.
Plugin System
ABC-based extensibility. Drop new tools, planners, or memory backends into a directory. Auto-discovery at startup.
SDK Embedding
Mount VibeServer under any existing FastAPI app via .asgi(). Decorator-based tool registration with signature introspection.
Auth System
bcrypt passwords, SHA-256 API keys, owner-scoped CRUD. Register, login, generate keys — all through NL or REST.
Docker Ready
Single Dockerfile + Compose with PostgreSQL. Health checks, persistent volumes, and env-based configuration.
┃ Entity Profile ┃

System Character Sheet

VibeServer
Controlled Hallucination Engine
ClassBackend Framework
AlignmentStructured Chaos
LanguagePython 3.11+
EngineLiteLLM Bridge
StorageSQLite / PG
Defense3-Layer + Regex
ExecutionRetry + Replan
MemoryTTL Sessions
Guardrails
Security Firewall

19 injection patterns
Role-based blocking (banned)
Output key sanitization
Tool Registry schema validation
JSonschema Draft7 compliance
System prompt hardening

$ POST / {"input": "..."} → plan: [step_1, step_2] → execute: compute(params) → {"status": "success", ...} SYS.STATUS: OPERATIONAL GUARDRAILS: ACTIVE INTENT.GRAPH: WARM