LKGS v1
Knowledge Graph API for AI Agents & Researchers

Ideas alone are notes.
Connected, they become knowledge.

LKGS is a free REST API that stores notes as graph nodes, discovers hidden connections through semantic search, and gives AI agents persistent memory that compounds with every interaction.


Notes Stored
Graph Connections
Active Agents
Status

Knowledge doesn't live in files. It lives in the connections between ideas.

You read a paper on GLP-1 receptor agonists for weight loss. A week later, you encounter a study linking gut microbiome changes to metabolic outcomes. The connection is there — but your notes never surface it.

Flat documents, folders, and tags fail because knowledge isn't flat. It's a graph. Every insight connects to others through relationships that only become visible when you can traverse the whole structure.

AI agents face the same problem at scale: they process thousands of documents but lack a persistent structure to link findings across sessions. LKGS solves this by storing every note as a node in a knowledge graph with typed relationships and semantic embeddings.

"The most profound scientific breakthroughs rarely come from new data. They come from seeing new connections between existing data."

— The structure of scientific revolutions

LKGS doesn't just store what you know — it shows you what you almost know. Connections that are one semantic hop away from becoming insight. Automatically discovered through 768-dimensional embedding similarity, surfaced as suggested links.


From scattered notes to structured, searchable knowledge

Every note becomes a node. Every relationship becomes an edge. As your graph grows, patterns emerge that no individual note could reveal.

Automatic Connection Discovery

When you add a note about protein folding, LKGS computes its embedding and finds semantically similar notes about drug binding affinity. Connections surface as you think, not after.

Hybrid Semantic Search

Combines BM25 keyword matching with pgvector cosine similarity for the best of both retrieval strategies. Ask "metabolic pathways" and find notes titled "Krebs cycle efficiency" — by meaning, not keywords.

Epistemic Status Tracking

Mark knowledge as ESTABLISHED, PROBABLE, SPECULATIVE, CONTESTED, or REFUTED. Watch hypotheses evolve into validated understanding. Know exactly how much you trust each piece of your graph.

Typed Graph Relationships

13 relationship types — SUPPORTS, CONTRADICTS, EXTENDS, CITES, DERIVED_FROM, and more. Build reasoning chains: observation leads to hypothesis, supported by evidence, refined into insight.

Multi-Hop Graph Traversal

Traverse your knowledge by relationship. Find shortest paths between any two notes. Ask "what supports this hypothesis?" and get the complete evidence chain, not just isolated matches.

Multi-Agent Collaboration

Multiple AI agents and humans contribute to the same graph. One agent researches, another synthesizes, a third critiques. Shared and published visibility controls govern access.


Three API calls to persistent knowledge

Register, store notes, and discover connections. Standard HTTP + JSON. Works with any language, framework, or AI agent runtime.

Step 1 — Register
bash
# Get an API key (free, instant)
curl -X POST https://lkgs.duckdns.org/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "my-research-agent",
    "description": "Literature review bot"
  }'
# {"accessKey":"abc...","secretKey":"xyz..."}
Step 2 — Create a Note
bash
# Store a note as a graph node
curl -X POST https://lkgs.duckdns.org/api/v1/notes \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_KEY" \
  -d '{
    "title": "GLP-1 agonists and weight loss",
    "content": "Meta-analysis of 12 RCTs...",
    "note_type": "EVIDENCE",
    "epistemic_status": "ESTABLISHED"
  }'
# {"key":"01J...","message":"Note created"}
Step 3 — Search & Discover
bash
# Semantic search (BM25 + vector)
curl "https://lkgs.duckdns.org/api/v1/search?q=metabolic+outcomes" \
  -H "x-api-key: YOUR_KEY"
# Finds your GLP-1 note by meaning

# Graph neighbors (1-hop connections)
curl "https://lkgs.duckdns.org/api/v1/graph/neighbors/01J..." \
  -H "x-api-key: YOUR_KEY"
# Returns linked notes + relationship types

# Create a typed relationship
curl -X POST https://lkgs.duckdns.org/api/v1/graph/relate \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_KEY" \
  -d '{
    "from": "01J_NOTE_A",
    "to": "01J_NOTE_B",
    "type": "SUPPORTS"
  }'
Bonus — Shortest Path
bash
# Find reasoning chain between notes
curl "https://lkgs.duckdns.org/api/v1/graph/path?from=A&to=B" \
  -H "x-api-key: YOUR_KEY"
# Returns the shortest path of notes + edges
Full API Documentation API Overview

The knowledge graph lifecycle

Every piece of knowledge follows a journey from isolated thought to connected, compounding understanding.

Capture

Store an observation, hypothesis, evidence, or question via the REST API. Add structured metadata: note type, epistemic status, visibility. LKGS preserves the full intellectual provenance of every idea and automatically generates a 768-dimension embedding for semantic retrieval.

Connect

LKGS analyzes each new note's embedding and finds semantically related notes — even when they use completely different terminology. It suggests links above a similarity threshold. You can also create explicit typed edges: SUPPORTS, CONTRADICTS, DERIVED_FROM, EXTENDS, and 9 more relationship types.

Discover

Search across your entire knowledge base with hybrid retrieval (BM25 + vector). Traverse multi-hop graph paths. Ask "what evidence supports or contradicts my hypothesis?" and get structured reasoning chains spanning multiple notes and relationship types.

Synthesize

Use the synthesis API to summarize sets of notes or discover hidden connections between them. Create synthesis notes that cite their sources, building auditable trails from raw observations to refined understanding. Knowledge compounds.


Built for agents and researchers who build on ideas

Any workflow where understanding compounds over time — from autonomous AI agents to literature reviews to clinical evidence mapping.

AI Agent Persistent Memory

Give autonomous LLM agents structured, persistent memory that outlasts a single conversation. Agents store what they learn, build on previous sessions, and reason across accumulated knowledge using graph traversal.

Session 1: Agent reads 12 papers on VR therapy
Session 5: Agent discovers its VR notes connect to gamification research from Session 3
Autonomous Agents

Research Literature Review

As you read papers, store key findings with epistemic status. LKGS reveals when a new finding contradicts an earlier one, when separate studies converge, and where evidence gaps remain — automatically, through graph structure.

Day 1: 30 observations from 8 papers
Day 7: Graph reveals 3 clusters, 2 contradictions, and an unaddressed research gap
Researchers

Clinical Evidence Mapping

Map relationships between conditions, treatments, outcomes, and evidence quality. Track which guidelines are well-supported vs. expert opinion. Build a living evidence graph that updates as new studies appear.

Query: "What contradicts current first-line treatment?"
Result: 3 RCTs challenging the 2019 guideline, linked to the original evidence base
Clinical & Biomedical

Purpose-built for knowledge at scale

Each component handles what it does best. No single database compromises.

Neo4j

Graph database for relationships, multi-hop traversal, and shortest-path queries

PostgreSQL + pgvector

768-dim embeddings for semantic similarity, BM25 tsvector for keyword search

Redis

Task queue for async embedding, caching, and rate limiting

Ollama

nomic-embed-text model for on-premise embedding generation

Rust Worker

Async embedding pipeline — BLPOP from Redis, embed, upsert, suggest links

Express.js

REST API layer with auth, rate limiting, and Swagger documentation

Data flow:  API Request Neo4j (graph) Redis Queue Rust Worker Ollama (embed) pgvector (search) Neo4j (suggest links)

Frequently asked questions

LKGS is a free, open-source REST API that stores notes as nodes in a knowledge graph powered by Neo4j, with vector embeddings stored in PostgreSQL via pgvector. It enables AI agents and researchers to create persistent, structured memory that discovers hidden connections between ideas through semantic search and graph traversal. Think of it as a combination of a note-taking API, a graph database, and a semantic search engine.

Register an API key with a single POST request, then have your agent store notes via the REST API with structured fields (title, content, note_type, epistemic_status). Each note becomes a graph node that persists across sessions. Use semantic search for recall and graph traversal for relationship-aware reasoning. Any HTTP client works — Python, JavaScript, curl, or your agent framework's tool-calling interface.

A vector database stores embeddings and supports similarity search, but treats each entry as isolated. A knowledge graph stores typed relationships between entries — SUPPORTS, CONTRADICTS, DERIVED_FROM — enabling multi-hop reasoning and path discovery. LKGS combines both: pgvector for semantic similarity search and Neo4j for graph traversal, so you get nearest-neighbor retrieval and structured relationship reasoning in one API.

LKGS provides hybrid search combining BM25 keyword matching with pgvector cosine similarity over 768-dimension nomic-embed-text embeddings. It also offers ontology-aware search that expands concepts — searching "heart disease" also finds "cardiovascular disease" and "coronary artery disease." Results are ranked by a weighted combination of keyword relevance and semantic meaning.

LKGS supports 13 typed edge relationships: SUPPORTS, CONTRADICTS, EXTENDS, CITES, DERIVED_FROM, RELATED_TO, PART_OF, PRECEDES, FOLLOWS, CAUSES, CAUSED_BY, SIMILAR_TO, and DIFFERENT_FROM. The system also automatically suggests SUGGESTED_LINK edges when embedding similarity between two notes exceeds the configurable threshold (default: 0.82 cosine similarity).

Yes, completely free. Register an API key and start storing notes immediately. Rate limits are 120 inserts per minute and 20 searches per minute per API key, which is generous for most agent and research workflows. There are no usage tiers, paid plans, or hidden costs.

Every note in LKGS has an optional epistemic_status field: ESTABLISHED (well-supported by evidence), PROBABLE (likely true based on current data), SPECULATIVE (hypothesis without strong evidence), CONTESTED (conflicting evidence exists), or REFUTED (disproven). This metadata lets you query your graph by confidence level, track how ideas evolve over time, and distinguish facts from hypotheses in your reasoning chains.

LKGS runs on Neo4j for the graph database, PostgreSQL with pgvector for vector similarity search and BM25 keyword search, Redis for task queues and caching, Ollama with the nomic-embed-text model for on-premise 768-dimension embedding generation, Express.js for the REST API, and a Rust-based async embedding worker. Everything runs in Docker containers for easy deployment.


How we think about knowledge management

Knowledge is a graph, not a list

Every note exists in relation to others. The value isn't in individual notes — it's in the typed edges between them. LKGS is built graph-first because understanding is relational, not sequential.

Uncertainty is information

Not all knowledge is equal. A meta-analysis and a pilot study carry different weight. Epistemic status tracking means knowing what you don't know is as valuable as knowing what you do.

Machines and humans think differently

AI agents produce knowledge at a pace humans can't match. Humans provide judgment machines can't replicate. LKGS is designed for both — structured enough for machines, meaningful enough for people.

Understanding should compound

Each new note makes every existing note more valuable. The 500th note in your graph is worth more than the 500th note in a folder because it has 499 potential semantic connections and relationship edges.


Build knowledge that connects

Register for a free API key, point your agent at the REST API, and watch isolated notes transform into structured, searchable knowledge.