Need Python or .NET versions? Open Ask Graphlit from the Developer Portal sidebar (or visit ask.graphlit.dev) for autogenerated samples in any SDK.
Pattern 1: Multi-Turn Conversations with Memory
First, create an agent that keeps track of everything you've asked it:
What's happening:
Agent automatically retrieves relevant context from its memory
Conversation state persists across turns (follow-up questions work)
You can inspect the full conversation history after each exchange
Pattern 2: Agentic Tool Calling
Let your agent call custom tools instead of just responding with text:
What's happening:
Agent sees the available tool definitions and selects the right one
Tool calls are recorded on the conversation so you can execute them
Responses combine tool outputs with natural language answers
Real-world example: Zine uses this pattern for questions like βWhy are checkout timeouts spiking?β β the agent queries Sentry, Slack, GitHub, and meeting notes via tools.
Pattern 3: Multi-Agent Systems with Shared Knowledge
Point multiple agents at the same semantic memory but give each its own persona:
What's happening:
Two agents share the same knowledge base but have different prompts and temperatures
Retrieval strategy keeps both agents grounded in the same set of documents
You can orchestrate the agents together (sales β engineering handoff) without duplicating memory
Pattern 4: Streaming Responses
For real-time user experiences, stream agent output as it happens:
// Simple delay between prompts to respect rate limits
await new Promise((resolve) => setTimeout(resolve, 500));
// Update retrieval scope as the conversation evolves
const followUpCollectionId = 'collection-id-for-the-follow-up';
await graphlit.updateConversation({
id: conversationId,
filter: { collections: [{ id: followUpCollectionId }] },
});
// Or branch the thread to explore a new idea without losing history
const branch = await graphlit.branchConversation(conversationId);
console.log('β¨ Branched conversation:', branch.branchConversation?.id);