@brinpage/cpm
v0.1.36
Published
**Modular prompts. One interface. Full control.**
Readme
@brinpage/cpm · CPM SDK for Next.js
Modular prompts. One interface. Full control.
@brinpage/cpm is a lightweight SDK to build AI-powered workflows in your Next.js apps.
It connects your app to the CPM Dashboard (running on localhost:3027) and to BrinPage Cloud, so you can manage:
- The Base Prompt and stackable Context Modules (CPM modular context graph)
- Providers and models (OpenAI, Gemini, Anthropic…)
- Temperatures, max tokens and embeddings
- Dynamic routing profiles:
auto-quality-firstauto-cost-firstauto-speed-first
All of this without wiring provider SDKs or secrets into your project.
What CPM gives you
One interface for multiple providers
Your app talks to CPM; CPM talks to BrinPage Cloud; Cloud routes to OpenAI, Gemini, Anthropic (and more as they’re added).Modular context instead of monolithic prompts
The CPM graph lets you break your system prompt into a Base Prompt plus focused context modules.
The dashboard decides what to attach for each task, and builds the final prompt deterministically.Unified routing and guardrails in the Cloud
Requests go through BrinPage Cloud, where you centralize:- provider and model selection
- routing profiles (quality / cost / speed)
- limits and cost controls
Zero backend config in your app
No provider keys or model-specific SDKs in your codebase.
The SDK just exposes a clean client (cpm) that calls the Cloud with the configuration you manage in the dashboard.Efficiency by design
Less repeated context, smarter routing and preflight validation mean:- fewer tokens,
- fewer retries,
- more predictable behaviour across environments and teams.
Where to go next
📘 Installation guide (how to wire CPM into your Next.js app):
https://docs.brinpage.com/cpm/installation🧠 Usage guide (CPM graph, context modules, routing profiles, examples):
https://docs.brinpage.com/cpm/usage💡 Product page (overview & concepts):
https://brinpage.com/cpm☁️ Create your workspace and get a Cloud API key:
https://cloud.brinpage.com/
