1
Get an API key
Sign up at app.flumes.ai and grab your secret key from the dashboard.
2
Assemble context for a turn (optionally ingest)
curl -s https://api.flumes.ai/v0/context/assemble \
-H "Authorization: Bearer $FLUMES_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Flumes-Agent: demo" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"entity_id": "ent:user_123",
"turn": "I want to go to Rome in July. Any museum tips?",
"retrieval": { "preset": "balanced" },
"ingest": { "extract": false },
"return": {
"include_structured_facts": true,
"include_raw_matches": true,
"include_scores": true
},
"max_context_tokens": 1200
}'
const res = await fetch("https://api.flumes.ai/v0/context/assemble", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FLUMES_API_KEY}`,
"Content-Type": "application/json",
"X-Flumes-Agent": "demo",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
entity_id: "ent:user_123",
turn: "I want to go to Rome in July. Any museum tips?",
retrieval: { preset: "balanced" },
ingest: { extract: false },
return: { include_structured_facts: true, include_raw_matches: true, include_scores: true },
max_context_tokens: 1200
}),
});
console.log(await res.json());
import os, requests, uuid
resp = requests.post(
"https://api.flumes.ai/v0/context/assemble",
headers={
"Authorization": f"Bearer {os.getenv('FLUMES_API_KEY')}",
"Content-Type": "application/json",
"X-Flumes-Agent": "demo",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"entity_id": "ent:user_123",
"turn": "I want to go to Rome in July. Any museum tips?",
"retrieval": { "preset": "balanced" },
"ingest": { "extract": False },
"return": { "include_structured_facts": True, "include_raw_matches": True, "include_scores": True },
"max_context_tokens": 1200,
},
)
print(resp.json())
3
Recall explicitly (optional)
curl -s https://api.flumes.ai/v0/recall \
-H "Authorization: Bearer $FLUMES_API_KEY" \
-H "Content-Type": "application/json" \
-d '{
"query": "museums in Rome",
"entity_id": "ent:user_123",
"return": { "include_structured_facts": true, "include_scores": true },
"limit": 8
}'
That’s it! You now have a persistent memory layer for your app. Explore the auto-generated API to dive deeper.
