Documentation
Colnma Introduction
Prompt Management • Prompt Experiments (LLM-as-Judge) • Context Packs (universal RAG pipelines). Powering AI with a brain — enabling true context-aware intelligence through prompts that think, remember, and reason.
Menu
Quickstart
API
What is Colnma?
Colnma is a unified platform for Prompt Management, Experiments, and Context Pipelines — powering AI with a brain for context‑aware responses. It helps developers and teams transform static prompts into intelligent, reusable, and governed systems that learn and evolve with your data.
Benefits
- Centralized prompt management with governance.
- No-code Context Packs for universal RAG pipelines.
- Prompt Experiments with LLM-as-Judge evaluation.
- Fast SDKs and API integrations for JS and Python.
Quickstart Installation
npm install @Colnma/client
# or
pip install Colnma
JavaScript SDK
import { ColnmaClient } from "@Colnma/client";
const client = new ColnmaClient({ projectKey: "pv_sk_abc123" });
const systemPrompt = await client.getPrompt("hr-assistant", { question: "What is our PTO policy?" });
console.log(systemPrompt);
Python SDK
from Colnma import ColnmaClient
client = ColnmaClient(project_key="pv_sk_abc123")
system_prompt = client.get_prompt("hr-assistant", {"question": "What is our PTO policy?"})
print(system_prompt)
REST API
Request
POST /api/sdk/v1/prompt/client/{project_key}/{prompt_name}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"variables": { "question": "What is our PTO policy?" }
}
Response
{
"prompt": "You are \"Colnma AI,\" a world-class expert in prompt engineering and Large Language Model interaction. You firmly believe that a well-crafted prompt is the key to unlocking an AI's full potential.\nThe user has submitted a prompt for analysis. The content of their original prompt is provided in the eqeqed...\n##Use below Web References\n- https://colnma.com"
}
Responses: 200 OK → returns compiled system prompt; 401 Unauthorized; 422 Validation Error; 429 Rate limit exceeded.
Guides Overview
Colnma integrates with major agent-building frameworks. Below are examples for LangChain, LangChain.js, Vercel AI SDK, LlamaIndex, and HTTP-only flows.
LangChain (Python)
from Colnma import ColnmaClient
from langchain_openai import ChatOpenAI
from langchain.prompts import ChatPromptTemplate
ptv = ColnmaClient(project_key="pv_sk_abc123")
prompt_text = ptv.get_prompt("hr-assistant", {"question": "What is our PTO policy?"})
llm = ChatOpenAI(model="gpt-4o-mini")
prompt = ChatPromptTemplate.from_messages([
("system", prompt_text),
("user", "What is our PTO policy?")
])
result = (prompt | llm).invoke({})
print(result.content)
LangChain.js (TypeScript)
import { ColnmaClient } from "@Colnma/client";
import { ChatOpenAI } from "@langchain/openai";
import { ChatPromptTemplate } from "@langchain/core/prompts";
const ptv = new ColnmaClient({ projectKey: "pv_sk_abc123" });
const promptText = await ptv.getPrompt("hr-assistant", { question: "What is our PTO policy?" });
const model = new ChatOpenAI({ modelName: "gpt-4o-mini" });
const prompt = ChatPromptTemplate.fromMessages([
["system", promptText],
["user", "What is our PTO policy?"],
]);
const res = await prompt.pipe(model).invoke({});
console.log(res.content);
Vercel AI SDK (JavaScript)
import { ColnmaClient } from "@Colnma/client";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const ptv = new ColnmaClient({ projectKey: "pv_sk_abc123" });
const systemPrompt = await ptv.getPrompt("hr-assistant", { question: "What is our PTO policy?" });
const { text } = await generateText({
model: openai("gpt-4o-mini"),
system: systemPrompt,
prompt: "What is our PTO policy?",
});
console.log(text);
LlamaIndex (Python)
from Colnma import ColnmaClient
from llama_index.llms.openai import OpenAI
from llama_index.core.llms import ChatMessage, MessageRole
ptv = ColnmaClient(project_key="pv_sk_abc123")
system_prompt = ptv.get_prompt("hr-assistant", {"question": "What is our PTO policy?"})
llm = OpenAI(model="gpt-4o-mini")
resp = llm.chat(messages=[
ChatMessage(role=MessageRole.SYSTEM, content=system_prompt),
ChatMessage(role=MessageRole.USER, content="What is our PTO policy?")
])
print(resp.message.content)
HTTP → OpenAI (Python)
import requests
from openai import OpenAI
url = "https://api.colnma.com/api/sdk/v1/prompt/client/pv_sk_abc123/hr-assistant"
headers = {"Authorization": "Bearer YOUR_TOKEN", "Content-Type": "application/json"}
body = {"variables": {"question": "What is our PTO policy?"}}
system_prompt = requests.post(url, json=body, headers=headers).json()
client = OpenAI()
chat = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": "What is our PTO policy?"}
]
)
print(chat.choices[0].message.content)
Next Steps
- Create a project key and attach a Context Pack.
- Call it from SDK or REST as a system prompt.
Faq
What does the API return? The compiled system prompt with context.
Can I call prompts without variables? Yes — send
{}
or
{"variables":{}}
