Build grounded chat, synced knowledge bases, and graph-aware applications with Graphlit.
Graphlit is the context layer for AI applications and agents. This repo gives developers and coding agents the canonical Graphlit path: ingest or sync content, wait for processing, retrieve explicit evidence, and stream grounded answers with streamAgent().
Install the Skills · Use the Graphlit Skill · Run the Example · Read the Docs · Open Graphlit Studio
When a developer asks an agent to "add Graphlit", the result should use Graphlit primitives instead of drifting into generic RAG scaffolding.
This repo provides:
- a reusable
graphlitskill that routes the agent to the right Graphlit references - a reusable
durable-cliskill that teaches coding agents how to install, authenticate, connect source accounts, manage synced data sources, and operate Durable Agents from the terminal - a reusable
graphlit-agent-toolsskill for wiring@graphlit/agent-toolsinto tool-calling agents - a minimal Next.js example that proves the modern Graphlit app shape
- task-specific implementation guides for ingestion, retrieval, collections, feeds, specifications, and knowledge graph workflows
- grounded chat over documents, websites, notes, transcripts, and synced external content
- customer-scoped or workspace-scoped assistants using collections
- continuously synced knowledge bases from Slack, Google Drive, email, RSS, S3, and web crawls
- graph-aware applications that extract entities and relationships during ingest
- Verify credentials with
getProject(). - Ingest content with
ingestUri()or sync a source withcreateFeed(). - Wait for
isContentDone()orisFeedDone()before retrieval depends on new content. - Scope retrieval with a collection when the app has a clear dataset, tenant, customer, project, or workspace boundary.
- Use
streamAgent()as the chat harness. - Keep retrieval explicit through a standalone
retrieve_contentstool backed byretrieveSources()andlookupContents(). - Return and render visible sources in the UI.
The reusable Graphlit skill and its task-specific references. Start with SKILL.md when the goal is to integrate Graphlit into an application or have a coding agent do it correctly.
The reusable Durable CLI skill and its walkthrough references. Start with SKILL.md when the goal is to install, authenticate, connect source accounts, manage data sources, script, or operate Durable Agents from a terminal using the current command surface.
The reusable Graphlit Agent Tools skill for adding @graphlit/agent-tools factories to tool-calling frameworks. Start with SKILL.md when the goal is to expose Graphlit retrieval, resource reading, mutation, enrichment, or media generation tools to an agent.
The canonical sample app for this repo. It shows:
- URL ingestion with
ingestUri() - readiness polling with
isContentDone() - collection-scoped retrieval
streamAgent()with a standaloneretrieve_contentstool- streamed answers with visible sources
Use the skills CLI through npx to install these skills into your agent environment:
npx skills add graphlit/skillsThat installs the available skills from this repository into the current project for the detected agent. To see what is available before installing:
npx skills add graphlit/skills --listInstall a single skill when you only need one workflow:
npx skills add graphlit/skills --skill graphlit
npx skills add graphlit/skills --skill durable-cli
npx skills add graphlit/skills --skill graphlit-agent-toolsUseful install options:
--agent <agent-name>installs to a specific agent.--agent '*'installs to every supported local agent.--globalinstalls at the user level instead of the current project.--allinstalls every skill for every supported agent and skips prompts.
After installation, ask your agent to use $graphlit, $durable-cli, or $graphlit-agent-tools when you want it to follow the corresponding Graphlit workflow.
- Open Graphlit Studio.
- Create your account, organization, and first project. No credit card is required, and the project starts with 100 free credits of usage.
- Select that project so its project card is visible.
- Choose the target environment tab, usually
PrevieworProduction. - Click
Copy Environment Variables. - Paste the copied values into
.env.local. - Add
OPENAI_API_KEYfor the streaming example.
cd examples/nextjs-streaming-chat
npm install
cp .env.example .env.local
npm run check
npm run devOpen http://localhost:3000.
- the app connects to the intended Graphlit project
- a URL ingests successfully
- retrieval waits for content readiness
- the agent calls
retrieve_contents - the answer streams incrementally
- the UI shows the supporting sources
- prefer Graphlit SDK primitives over generic RAG stacks
- keep retrieval explicit and inspectable
- do not rely on newly ingested or newly synced content until Graphlit says it is ready
- keep examples small enough to copy into real apps quickly
The goal is to make Graphlit easy to adopt without hiding how Graphlit actually works.