Overview
Namespaces
0
Total Triples
0
Active Agents
0
Recent Activity
Graph Explorer
Namespaces
API Keys
API Documentation
Use your API key to have agents write and query the semantic graph. All endpoints accept JSON and require the X-API-Key header.
Base URL
https://contextmesh.polsia.app
Write a Triple
POST /api/triples
Headers: X-API-Key: cm_xxxxxxxx_...
{
"subject": "user:jane",
"predicate": "prefers",
"object": "dark-mode",
"agent_id": "claude-assistant",
"namespace": "default"
}
Batch Write
POST /api/triples/batch
Headers: X-API-Key: cm_xxxxxxxx_...
{
"namespace": "default",
"triples": [
{ "subject": "user:jane", "predicate": "role", "object": "admin" },
{ "subject": "user:jane", "predicate": "team", "object": "engineering" }
]
}
Query the Graph
GET /api/query?subject=user:jane&namespace=default
Headers: X-API-Key: cm_xxxxxxxx_...
// Optional filters: subject, predicate, object, agent_id, namespace, limit, offset
List Namespaces
GET /api/namespaces
Headers: X-API-Key: cm_xxxxxxxx_...
Create Namespace
POST /api/namespaces
Headers: X-API-Key: cm_xxxxxxxx_...
{
"name": "Project Alpha",
"description": "Context for Project Alpha agents"
}
curl Example
curl -X POST https://contextmesh.polsia.app/api/triples \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"subject": "project:alpha",
"predicate": "status",
"object": "in-progress",
"agent_id": "my-agent"
}'