API Reference
Base URL: https://api.agentbrain.ch
Authentifizierung
Alle Requests benötigen einen API Key im Header:
X-API-Key: dein_api_keyDu erhältst deinen API Key beim Erstellen eines Workspace. Jeder Workspace hat seinen eigenen Key. Der Key ist an den Workspace gebunden und hat Zugriff auf alle Memories, Entities und Alerts innerhalb dieses Workspace.
Rate Limits
| Field | Type | Required | Description |
|---|---|---|---|
| Store | POST | Nein | 100 Requests pro Minute pro Workspace |
| Recall | POST | Nein | 200 Requests pro Minute pro Workspace |
| Predict | GET | Nein | 60 Requests pro Minute pro Workspace |
| Health | GET | Nein | Kein Limit |
/healthStatus Check. Keine Authentifizierung nötig.
Response
{
"status": "ok",
"version": "1.0.0",
"database": "connected",
"embeddings": "loaded"
}curl
curl https://api.agentbrain.ch/health/memory/storeSpeichert eine Information im Gedächtnis. Der Perception Gate bewertet sie automatisch mit 4 Scores. spaCy extrahiert Entities. Der Knowledge Graph wird aktualisiert.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| workspace_id | string (UUID) | Ja | UUID des Workspace |
| content | string | Ja | Inhalt der gespeichert werden soll |
| agent_id | string (UUID) | null | Nein | UUID des Agents. null = Workspace-weit sichtbar |
| source_trust | float (0.0-1.0) | Nein | Vertrauenswürdigkeit der Quelle. Standard: 0.5. 0.9+ = offiziell, 0.7 = vertrauenswürdig, 0.3 = Gerücht |
| memory_type | string | Nein | Typ der Erinnerung. "episodic" (Standard), "semantic", "procedural", "working" |
Response
{
"memory_id": "f70fc2b0-...",
"emotion_score": -1.0,
"novelty_score": 0.8,
"urgency_score": 0.0,
"source_trust": 0.8,
"weight": 1.24,
"entities": [{"name": "Müller", "type": "person"}]
}curl
curl -X POST https://api.agentbrain.ch/memory/store \
-H "Content-Type: application/json" \
-H "X-API-Key: dein_api_key" \
-d '{
"workspace_id": "deine-workspace-id",
"content": "Kunde Müller hat wegen der Heizung angerufen.",
"source_trust": 0.8,
"memory_type": "episodic"
}'/memory/recallSucht im Gedächtnis nach relevanten Erinnerungen. Vector Search + Graph Traversal. Reconsolidation: Abgerufene Erinnerungen werden stärker (access_count++, weight bump).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| workspace_id | string (UUID) | Ja | UUID des Workspace |
| query | string | Ja | Suchanfrage in natürlicher Sprache |
| agent_id | string (UUID) | null | Nein | Filtert auf Agent-spezifische + Workspace-weite Erinnerungen |
| limit | integer | Nein | Max Ergebnisse. Standard: 10, Maximum: 100 |
Response
{
"memories": [
{
"id": "f70fc2b0-...",
"content": "Kunde Müller hat wegen der Heizung angerufen...",
"type": "episodic",
"emotion_score": -1.0,
"weight": 1.29,
"relevance": 0.49,
"created_at": "2026-04-05T00:05:24Z",
"access_count": 1
}
],
"entities": [
{"name": "Müller", "type": "person", "weight": 0.5}
],
"relationships": []
}curl
curl -X POST https://api.agentbrain.ch/memory/recall \
-H "Content-Type: application/json" \
-H "X-API-Key: dein_api_key" \
-d '{
"workspace_id": "deine-workspace-id",
"query": "Was wissen wir über Müller?",
"limit": 10
}'/predict/{workspace_id}Proaktive Alerts und Vorhersagen. Die Predictive Engine analysiert alle 60 Minuten zeitliche Muster und überfällige Events.
Response
{
"alerts": [
{
"id": "a1b2c3d4-...",
"content": "Saisonales Muster: Heizungsmeldung trat 3x im Oktober auf. Wahrscheinlichkeit: 85%",
"probability": 0.85,
"created_at": "2026-04-06T12:00:00Z",
"resolved": false
}
]
}curl
curl https://api.agentbrain.ch/predict/deine-workspace-id \
-H "X-API-Key: dein_api_key"/identity/{agent_id}Gibt Name, Rolle und Konfiguration eines registrierten Agents zurück.
Response
{
"id": "agent-uuid-...",
"name": "Sales Agent",
"role": "Sales & Outreach",
"workspace_id": "workspace-uuid-...",
"created_at": "2026-04-06T10:00:00Z"
}curl
curl https://api.agentbrain.ch/identity/agent-uuid \
-H "X-API-Key: dein_api_key"