InfraNodus API Documentation
All InfraNodus subscribers can use the API to generate AI advice and a knowledge graph from any text. The insights include advanced network graph analytics measures, such as clusters of concepts (topical communities), word rankings, content gaps, and latent concepts. These insights can be used to better understand the data and to augment AI prompts for better RAG results with the underlying knowledge graph data.
If you build with Claude Code, Cursor, or your own agents, the API also gives them memory that persists across sessions and a way to follow what a concept is connected to and correct what they stored. The InfraNodus MCP server exposes many of the same operations as tools. Where a tool calls an endpoint, the MCP server examples block under it shows the exact request, so you can copy what works for your agent.
Some of the endpoints are also available via RapidAPI, which provides OpenAPI schemas that you can feed to your AI development tools.
Authorization
To authorize, obtain your API token at https://infranodus.com/api-access
Add this API token to your request header:
Authorization: Bearer your_api_token_here
Python example:
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
}
Note: We do provide, at our own discretion, an ability to make several requests for free without using the API key. You won't be able to access all the functions, but you can use it to try the InfraNodus API. For production you absolutely need to get the API key to avoid failures and rate limiting. If you don't have an account, we do offer 14-day free trial.
Available Endpoints
- 1. Obtain Graph, Statements, and Graph Summary
- 2. Obtain AI-Generated Advice for a Text
- 3. Generate DOT Graph and GraphSummary
- 4. AI-Generated Advice from Knowledge Graph
- List and Search Graphs
- 5. List Existing Graphs
- 6. Search Statements and Build Graph
- Compare Graphs
- 7. Compare Graphs of Multiple Contexts
- 8. AI Advice for Several Graphs or Their Difference
- Filter Statements and Trend Analysis
- Import from Google and YouTube
- 9. Build a Graph of Google Search Results
- 10. AI Advice for Google Search Results
- 11. Build a Graph of Search Intent
- 12. AI Advice for Search Intent
- 13. Compare Search Results vs. Search Intent
- 14. AI Advice on Search Results vs. Search Intent
- 15. Build a Graph of YouTube Content
- Edit and Delete Graphs
- 16. Delete Statements from a Graph
- 17. Update Statements in a Graph
- 18. Delete a Graph
- 19. Change Graph Privacy
- AI and Retrieval
- 20. Semantic Search over Statements
- 21. Explore a Node's Neighborhood
- 22. Generate Vector Embeddings
- 23. Dify External Knowledge Retrieval
- Agent Memory
- 24. Project Learnings
- 25. Topic and Personal Memory
- 26. Recall Memory for a Prompt
- 27. Ingest and Forget a Session
- Models and Account
- 28. List AI Models and Get Your User ID
- Appendices
- Appendix 1: AI Request Types
- Appendix 2: Optimize Modes
- Appendix 3: Response Object Reference
1. Obtain Graph, Statements, and Graph Summary
Submit text as a string or array of statements (POST) and obtain a graph and statements JSON object, plus a graph summary with insights about topical clusters, main concepts, gaps, and conceptual gateways. Alternatively, specify an existing graph name to generate a knowledge graph JSON and summary for AI RAG workflows.
Query Parameters
doNotSave: boolean (default: true)
addStats: boolean (default: true)
includeStatements: boolean (default: true)
includeGraphSummary: boolean (default: false)
extendedGraphSummary: boolean (default: true)
includeGraph: boolean (default: true)
gapDepth: number (default: 0) // increase up to 3 to iterate through gaps
compactStatements: boolean (default: false)
compactGraph: boolean (default: false)
multifractal: boolean (default: false) // add the multifractal spectrum to network_dynamics (about 0.5 s more)
fractalExperimental: boolean (default: false) // return every network_dynamics field, not only the default ones
Privacy Notice
By default (doNotSave=true), your text will NOT be saved. No logs are kept. Processing happens on InfraNodus EU servers (AWS Ireland).
If you use AI features (aiTopics), only the concepts in top clusters (not your content) are sent to OpenAI.
Request Body
{
"name": "name_of_your_graph",
"text": "text_string_to_process",
"statements": ["statement 1", "statement 2"],
"timestamps": [],
"aiTopics": false,
"modifyAnalyzedText": "",
"replaceEntities": false,
"contextType": "STANDARD",
"userName": ""
}
If statements is submitted, it overrides text.
If neither is specified, InfraNodus retrieves the existing graph by name.
To read only part of a saved graph (by tag, date, or a slice of its statements in time order), add statementFilter.
Text Processing Settings (optional)
"contextSettings": {
"partOfSpeechToProcess": "HASHTAGS_AND_WORDS",
"doubleSquarebracketsProcessing": "PROCESS_AS_MENTIONS",
"squareBracketsProcessing": "IGNORE_BRACKETS",
"mentionsProcessing": "CONNECT_TO_ALL_CONCEPTS"
}
Response
The response is a JSON object with the top-level key entriesAndGraphOfContext, which contains:
graph— the knowledge graph as agraphologyGraphobject withnodes(concept words with degree, betweenness centrality, community ID),edges(co-occurrence links with weights), andattributes(cluster structure, content gaps, diversity metrics).statements— the original text segments, each annotated with extracted concepts, community assignments, and which topical cluster it best represents.extendedGraphSummary— a structured object with arrays formainTopics,mainConcepts,contentGaps,insightClusters,conceptualGateways,topRelations, anddiversityStatistics.graphSummary— a plain-text version of the summary (whenincludeGraphSummary=true).diversity_stats— graph structure insights (modularity, bias, diversity, etc.).network_dynamics— how the text moves through its own graph in reading order: a text type, fractal (DFA) exponents and path measures (see network_dynamics).userName,graphUrl,isPublic— metadata about the graph owner and access.
The graph format follows the InfraNodus schema and is a modified Graphology JSON graph compatible with Graphology, Gephi, and Sigma.Js. See Appendix 3: Response Object Reference for the full structure of every field.
MCP server examples: 4 tools
generate_knowledge_graph
Analyzes a text without saving it. aiTopics names the topical clusters, and extendedGraphSummary returns the clusters and gaps without the full graph.
{
"aiTopics": "true",
"text": "Your text here"
}
create_knowledge_graph
The same analysis, saved under a name you can reuse. The difference is doNotSave=false and a name.
{
"name": "my-research-notes",
"aiTopics": "true",
"text": "Your text here"
}
generate_content_gaps
Finds what is missing between topics in a saved graph. Send text instead of name to analyze new content. The tool reads extendedGraphSummary.contentGaps, and generate_topical_clusters makes the same request and reads the clusters.
{
"name": "my-research-notes"
}
generate_contextual_hint
A short structural summary to add to an LLM prompt: includeGraphSummary=true and nothing else.
{
"text": "Your text here"
}
2. Obtain AI-Generated Advice for a Text
Submit plain text and obtain an AI-generated question, statement, or summary that uses the underlying graph structure for precise results.
Query Parameters
doNotSave: boolean (default: true)
addStats: boolean (default: true)
optimize: string ('develop' | 'reinforce' | 'gap' | 'imagine')
transcend: boolean // do not include graph structure into prompt
includeStatements: boolean (default: false)
includeGraphSummary: boolean (default: false)
extendedGraphSummary: boolean (default: true)
includeGraph: boolean (default: true)
gapDepth: integer (default: 0)
extendedAdvice: boolean (default: false)
Optimize modes:
• develop — top nodes from all clusters, helping develop the discourse
• reinforce — top nodes from top clusters, reinforcing the discourse
• gaps — bridges gaps in the graph structure; uses gapDepth for deeper exploration
• latent — develops the least represented topical clusters
• imagine — finds ideal entry points to connect the discourse to other discourses
• optimize (default) — bridges the insight clusters, picked from the structure of the graph; uses gapDepth for the next set
Request Body
{
"name": "name_of_your_graph",
"text": "text string to process",
"requestMode": "question",
"modelToUse": "gpt-4o",
"pinnedNodes": ["node1", "node2"],
"prompt": "what is this text about?",
"promptChatContext": [],
"aiTopics": false,
"modifyAnalyzedText": "",
"replaceEntities": false,
"stopwords": [],
"systemPrompt": ""
}
requestMode options: 'question', 'idea', 'develop',
'fact', 'chat', 'challenge', 'response',
'gptchat', 'summary', 'graph summary', 'reprompt'
'develop' generates a deep, insightful idea linking the selected
groups of concepts: as concise as 'idea' or 'question',
but with the depth of 'response' (not to be confused with the
optimize mode of the same name above).
Response
{
"aiAdvice": [
{
"text": "AI-generated response text...",
"finish_reason": "stop"
}
],
"graph": { "graphologyGraph": {} },
"statements": [],
"usage": 338,
"created_timestamp": 1722261741
}
MCP server examples: 5 tools
generate_research_questions
Turns the insight clusters of a graph into research questions. The tool's optimize input is sent as the optimize parameter: optimize (default), gap for the widest content gap, develop or latent. Raise gapDepth to reach the next, less prominent set, and set extendedAdvice=true to use several. The tool reads extendedGraphSummary.insightClusters to report which clusters were bridged. generate_research_ideas sends the same request with requestMode set to response or idea.
{
"name": "my-research-notes",
"userName": "",
"aiTopics": "true",
"requestMode": "question",
"modelToUse": "gpt-4o"
}
develop_latent_topics
Develops the topics that are present but underused. develop_conceptual_bridges sends the same request with optimize=imagine to connect the text to a wider context.
{
"text": "Your text here",
"aiTopics": "true",
"requestMode": "transcend",
"modelToUse": "gpt-4o"
}
optimize_text_structure
Reads the structure of a text and picks the development that fits it. optimize_reasoning makes the same request for an agent's own reasoning trace.
{
"text": "Your text here",
"aiTopics": "true",
"requestMode": "response",
"modelToUse": "gpt-5.4"
}
generate_responses_from_graph
Answers a prompt using the structure of a saved graph.
{
"name": "my-research-notes",
"userName": "",
"aiTopics": "true",
"requestMode": "response",
"prompt": "What should we explore next?",
"modelToUse": "gpt-4o"
}
retrieve_from_knowledge_base
GraphRAG retrieval. requestMode: "search" returns the statements that match the prompt, and hops=2 adds statements linked through an intermediate concept.
{
"name": "my-research-notes",
"aiTopics": "true",
"requestMode": "search",
"prompt": "What do we know about agent memory?",
"modelToUse": "gpt-4o",
"userName": ""
}
3. Generate DOT Graph and GraphSummary
Ingest plain text or a Graphology JSON graph and get a compact DOT graph representation
plus a graphSummary string, both suitable for forwarding to LLM models as context.
Query Parameters
optimize: string ('auto' | 'reinforce' | 'develop' | 'gaps' | 'latent')
includeGraph: boolean (default: false)
includeGraphSummary: boolean (default: true)
extendedGraphSummary: boolean (default: true)
Request Body (for /dotGraphFromText)
{
"name": "name of the text",
"text": "apple and oranges are delicious fruits",
"stopwords": ["car", "tool"],
"aiTopics": true
}
Response
{
"graphKeywords": "apple <-> orange [label=\"delicious, fruit\"]...",
"clusterIds": [],
"clusterKeywords": "\"delicious orange apple fruit\" and \"lemon make sense\"",
"allClusters": [
{ "text": "delicious orange apple fruit" },
{ "text": "lemon make sense" }
],
"graphSummary": "",
"bigrams": [
"orange <-> delicious",
"apple <-> orange",
"delicious <-> fruit"
]
}
4. AI-Generated Advice from Knowledge Graph
Submit a knowledge graph in InfraNodus/Graphology format and obtain an AI-generated question or idea that leverages the structural and semantic information.
Query Parameters
optimize: string ('gaps' | 'reinforce' | 'develop' | 'imagine')
transcend: boolean // go beyond the graph structure
Request Body
{
"prompt": "What connections exist between these concepts?",
"userPrompt": [{ "role": "user", "content": "prompt text" }],
"promptContext": "",
"promptChatContext": [],
"requestMode": "question",
"language": "EN",
"modelToUse": "gpt-4",
"pinnedNodes": [],
"topicsToProcess": [],
"graph": {
"nodes": [],
"edges": [],
"attributes": {
"top_nodes": [],
"top_clusters": [],
"gaps": [],
"statementHashtags": []
}
},
"statements": []
}
Response
{
"aiAdvice": [
{
"text": "AI-generated insight...",
"finish_reason": "stop"
}
],
"usage": 338,
"created_timestamp": 1722261741
}
List and Search Graphs
5. List Existing Graphs
Retrieve all graphs created by a user with various filters (favorite, name, date, type, language).
Request Body
| Parameter | Type | Description |
|---|---|---|
query |
string | Search term(s) to match against contextName and description |
type |
string | Filter by contextType (e.g. "CSV", "GOOGLE", "STANDARD") |
fromDate |
string (ISO) | Filter graphs created on or after this date |
toDate |
string (ISO) | Filter graphs created on or before this date |
language |
string | Filter by language code (e.g. "EN", "DE") |
favorite |
boolean | Filter by favorite status |
Use comma-separated values for OR logic:
"csv,google" matches CSV or GOOGLE.
{
"query": "expert,ontology",
"type": "STANDARD",
"language": "EN"
}
MCP server examples: 1 tool
list_graphs
Finds graphs by name before an agent works with one. Every filter is optional, and an empty body lists all graphs.
{
"query": "research",
"type": "STANDARD",
"favorite": true
}
6. Search Statements and Build Graph
Submit a search term and get all matching statements, then build a graph from them.
Request Body
{
"query": "graphrag",
"contextNames": "",
"userName": "",
"maxNodes": 150,
"showContexts": false
}
Response
Returns a list of statements and a graph in JSON format following the InfraNodus return object schema.
MCP server examples: 2 tools
search
Finds a concept across graphs. Leave contextNames empty to search all of them.
{
"query": "agent memory",
"contextNames": "",
"contextTypes": ""
}
fetch
Reads one result back. The tool splits a result ID of the form user:graph:query into these fields.
{
"query": "agent memory",
"contextNames": "my-research-notes",
"userName": "your_username"
}
Compare Graphs
7. Compare Graphs of Multiple Contexts
Submit several contexts (existing graphs, statement arrays, or text strings) and obtain a graph that merges them, shows overlap, or highlights differences.
Query Parameters
doNotSave: boolean (default: true)
addStats: boolean (default: true)
includeStatements: boolean (default: true)
includeGraphSummary: boolean (default: false)
extendedGraphSummary: boolean (default: true)
includeGraph: boolean (default: true)
compactStatements: boolean (default: false)
compactGraph: boolean (default: false)
compareMode: string ('merge' | 'difference' | 'difference_nodes' | 'intersection' | 'intersection_nodes') (default: 'merge')
Request Body
{
"contexts": [
{ "text": "first text to compare" },
{ "text": "second text to compare" }
]
}
Every context in a request must use the same input: text (plain text string),
name (existing graph name), or statements (array, which also needs a name).
In difference mode the order of the contexts matters.
For the full specification, see the
complete API documentation.
MCP server examples: 3 tools
overlap_between_texts
What the texts have in common.
{
"contexts": [
{
"text": "Your first text",
"modifyAnalyzedText": "none"
},
{
"text": "Your second text",
"modifyAnalyzedText": "none"
}
],
"aiTopics": "true"
}
difference_between_texts
What is missing from the first text but present in the others. Put the text you want to improve first.
{
"contexts": [
{
"text": "Your first text",
"modifyAnalyzedText": "none"
},
{
"text": "Your second text",
"modifyAnalyzedText": "none"
}
],
"aiTopics": "true"
}
merged_graph_from_texts
One combined graph of all the texts.
{
"contexts": [
{
"text": "Your first text",
"modifyAnalyzedText": "none"
},
{
"text": "Your second text",
"modifyAnalyzedText": "none"
}
],
"aiTopics": "true"
}
optimize_knowledge_base
Uses compareMode=difference to compare two layers of a project, such as its docs and its code, then calls graphAndAdvice to find what is under-developed.
8. AI-Generated Advice for Several Graphs or Their Difference
Submit plain texts, existing contexts, or arrays of statements and obtain AI-generated advice that takes the underlying graph structure (or the difference of the graphs) into account.
Query Parameters
Same parameters as the graphAndAdvice endpoint (#2), plus the compareMode parameter from the graphsAndStatements endpoint (#7).
Request Body
Contexts should follow the same format as the graphsAndStatements endpoint (#7). You can also include body parameters from the graphAndAdvice endpoint (#2).
const fetch = require('node-fetch');
const url = 'https://infranodus.com/api/v1/graphsAndAiAdvice'
+ '?doNotSave=true&addStats=true&optimize=gaps';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
contexts: [
{ text: 'First text to analyze' },
{ text: 'Second text to compare' }
],
requestMode: 'question',
compareMode: 'difference'
})
});
const data = await response.json();
console.log(data.aiAdvice);
import requests
response = requests.post(
'https://infranodus.com/api/v1/graphsAndAiAdvice',
params={'doNotSave': 'true', 'addStats': 'true', 'optimize': 'gaps'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'contexts': [
{'text': 'First text to analyze'},
{'text': 'Second text to compare'}
],
'requestMode': 'question',
'compareMode': 'difference'
}
)
data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/graphsAndAiAdvice?\
doNotSave=true&addStats=true&optimize=gaps" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"contexts": [
{"text": "First text to analyze"},
{"text": "Second text to compare"}
],
"requestMode": "question",
"compareMode": "difference"
}'
const url = 'https://infranodus.com/api/v1/graphsAndAiAdvice'
+ '?doNotSave=true&addStats=true&optimize=gaps';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
contexts: [
{ text: 'First text to analyze' },
{ text: 'Second text to compare' }
],
requestMode: 'question',
compareMode: 'difference'
})
});
const data = await response.json();
console.log(data.aiAdvice);
Filter Statements: Tags, Dates, and Time Slices
Build the graph from part of a saved graph's statements instead of all of them: the statements with certain tags, from a date range, or a slice of the statements in time order, such as the latest fifth. Read two time periods of the same graph and compare them for a text trend analysis: which topical clusters are emerging, which are stable, and which are fading.
Add statementFilter to the request body of any endpoint that reads a saved graph by name:
graphAndStatements (#1), graphAndAdvice (#2),
and nodeNeighborhood (#21). It is not applied when the request submits
text or statements.
Request Body
{
"name": "name_of_your_graph",
"statementFilter": {
"categories": ["pricing", "review"],
"categoryMatch": "any",
"from": "2026-03-01",
"to": "2026-03-31",
"slice": { "from": 0.8, "to": 1 }
}
}
| Parameter | Type | Description |
|---|---|---|
categories | string[] | Statement tags: the categories stored on each statement. Matched whatever their case. |
categoryMatch | string | any: statements with at least one of the tags. all: statements that carry every tag. Default: any. |
from | string | ISO 8601 date. Statements dated on or after it, such as 2026-03-01 or 2026-03-01T14:30:00Z. |
to | string | ISO 8601 date. Statements dated on or before it. A day without a time covers that whole day. |
slice | object | { "from": 0.8, "to": 1 }: a share (0 to 1) of the statements in time order, by count. The start is included and the end excluded, so 0–0.8 and 0.8–1 share no statement and leave none out. An omitted end defaults to 0 or 1. |
Every field is optional. They apply in this order: tags, dates, then the slice, so
categories with a slice of 0.8 to 1 reads the latest fifth of the statements that carry the tag.
- Statement date: the entry in
timestampsthe statement was saved with, or the time it was saved when none was sent. Statements with the same date keep the order of the text, so a slice of a document imported in one request is a part of that document. - Large graphs: a graph over 9,000 statements is sampled before it is built. With a filter, only the filtered part is sampled, so a part under 9,000 statements is read whole.
Response
A filtered read adds the counts to the response:
{
"statementFilter": { "matched": 20, "selected": 4, "total": 40 }
}
matched statements passed the tags and dates, selected is what the slice kept,
and total is the whole graph. A filter that selects no statements, or has an invalid value,
returns an error that says why.
Trend Analysis: Compare the Time Periods of One Graph
Read the earlier period and the latest period of the graph, then send the two sets of statements to the
graphsAndStatements endpoint (#7) with compareMode=difference.
Put the earlier period first: the result is the emerging topics, what the latest period has that the earlier one lacks.
Put the latest period first for the fading topics, and use compareMode=intersection for the stable ones that both periods share.
const API = 'https://infranodus.com/api/v1';
const headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
};
// The statements of one time period of the graph, as a single text
async function readPeriod(slice) {
const response = await fetch(
`${API}/graphAndStatements?doNotSave=true&includeGraph=false&includeStatements=true&compactStatements=true`,
{
method: 'POST',
headers,
body: JSON.stringify({ name: 'name_of_your_graph', statementFilter: { slice } })
}
);
const data = await response.json();
return data.entriesAndGraphOfContext.statements.map(s => s.content).join('\n');
}
const earlier = await readPeriod({ from: 0, to: 0.8 });
const latest = await readPeriod({ from: 0.8, to: 1 });
// Emerging topics: what the latest fifth has that the earlier period lacks
const response = await fetch(
`${API}/graphsAndStatements?doNotSave=true&compareMode=difference&includeGraph=false&includeStatements=false`,
{
method: 'POST',
headers,
body: JSON.stringify({ contexts: [{ text: earlier }, { text: latest }] })
}
);
const emerging = await response.json();
MCP server examples: every tool that reads a saved graph
analyze_existing_graph_by_name
The topical clusters and content gaps of the latest fifth only. The same statementFilter works on generate_content_gaps, generate_research_questions, retrieve_from_knowledge_base, get_node_neighborhood, and the other tools that take graphName.
{
"graphName": "my-research-notes",
"statementFilter": {
"slice": { "from": 0.8, "to": 1 }
}
}
difference_between_texts
Trend analysis with the same graph twice, each with its own slice: the emerging topics, which the latest fifth has and the earlier period lacks. overlap_between_texts with the same two contexts returns the stable topics; swap the two contexts for the fading ones.
{
"contexts": [
{
"graphName": "my-research-notes",
"statementFilter": { "slice": { "from": 0, "to": 0.8 } }
},
{
"graphName": "my-research-notes",
"statementFilter": { "slice": { "from": 0.8, "to": 1 } }
}
]
}
A walkthrough with prompts: Text Trend Analysis.
Import from Google and YouTube
9. Build a Graph of Google Search Results
Submit a search query to generate a knowledge graph of the top Google search results. Useful for getting an overview of the current informational supply, finding content gaps, performing SEO optimization, and integrating search results data into LLM workflows.
Query Parameters
doNotSave: boolean (default: false)
// plus other parameters from the graphAndStatements endpoint (#1)
Request Body
{
"searchQuery": "graphrag",
"aiTopics": true,
"doNotAddGraph": false,
"importCountry": "US",
"importLanguage": "AUTO"
}
const fetch = require('node-fetch');
const url = 'https://infranodus.com/api/v1/import/googleSearchResultsGraph'
+ '?doNotSave=true&addStats=true&compactGraph=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
importCountry: 'US',
importLanguage: 'EN'
})
});
const data = await response.json();
console.log(data.entriesAndGraphOfContext);
import requests
response = requests.post(
'https://infranodus.com/api/v1/import/googleSearchResultsGraph',
params={'doNotSave': 'true', 'addStats': 'true', 'compactGraph': 'true'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'searchQuery': 'graphrag',
'aiTopics': True,
'importCountry': 'US',
'importLanguage': 'EN'
}
)
data = response.json()
print(data['entriesAndGraphOfContext'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchResultsGraph?\
doNotSave=true&addStats=true&compactGraph=true" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"searchQuery": "graphrag",
"aiTopics": true,
"importCountry": "US",
"importLanguage": "EN"
}'
const url = 'https://infranodus.com/api/v1/import/googleSearchResultsGraph'
+ '?doNotSave=true&addStats=true&compactGraph=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
importCountry: 'US',
importLanguage: 'EN'
})
});
const data = await response.json();
console.log(data.entriesAndGraphOfContext);
Response
{
"entriesAndGraphOfContext": {
"statements": [{
"content": "Statement content",
"categories": ["category 1", "category 2"]
}],
"graph": {
"nodes": [],
"edges": [],
"graph": { "nodes_to_statements_map": {} }
}
}
}
MCP server examples: 1 tool
analyze_google_search_results
Shows the topics that already rank for a query. Separate several queries with commas.
{
"searchQuery": "claude code memory,agent memory",
"includeGraph": "false",
"aiTopics": "true",
"includeSearchResultsOnly": "false",
"importLanguage": "EN",
"importCountry": "US"
}
10. AI Advice for Google Search Results
Get AI-generated advice and research questions based on topical clusters or content gaps identified in Google search results for a query.
Query Parameters
doNotSave: boolean (default: false)
// plus other parameters from the graphAndAdvice endpoint (#2)
Request Body
{
"searchQuery": "graphrag",
"aiTopics": true,
"requestMode": "question",
"importCountry": "US",
"importLanguage": "AUTO"
}
const fetch = require('node-fetch');
const url = 'https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice'
+ '?doNotSave=true&optimize=gaps';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
requestMode: 'question'
})
});
const data = await response.json();
console.log(data.aiAdvice);
import requests
response = requests.post(
'https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice',
params={'doNotSave': 'true', 'optimize': 'gaps'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'searchQuery': 'graphrag',
'aiTopics': True,
'requestMode': 'question'
}
)
data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice?\
doNotSave=true&optimize=gaps" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"searchQuery": "graphrag",
"aiTopics": true,
"requestMode": "question"
}'
const url = 'https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice'
+ '?doNotSave=true&optimize=gaps';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
requestMode: 'question'
})
});
const data = await response.json();
console.log(data.aiAdvice);
Response
Same structure as the graphAndAdvice endpoint (#2) response.
11. Build a Graph of Search Intent
Submit a search query to generate a knowledge graph of related keywords (from Google's suggested keywords or AdWords recommendations) that people use to search for this topic. Useful for understanding informational demand, finding topical clusters and related keywords, and SEO optimization.
Request Body
{
"searchQuery": "graphrag",
"aiTopics": true,
"doNotAddGraph": false,
"keywordsSource": "related",
"importCountry": "US",
"importLanguage": "AUTO"
}
const fetch = require('node-fetch');
const url = 'https://infranodus.com/api/v1/import/googleSearchIntentGraph'
+ '?doNotSave=true&addStats=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
keywordsSource: 'related',
importCountry: 'US'
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://infranodus.com/api/v1/import/googleSearchIntentGraph',
params={'doNotSave': 'true', 'addStats': 'true'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'searchQuery': 'graphrag',
'aiTopics': True,
'keywordsSource': 'related',
'importCountry': 'US'
}
)
data = response.json()
print(data)
curl -X POST "https://infranodus.com/api/v1/import/googleSearchIntentGraph?\
doNotSave=true&addStats=true" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"searchQuery": "graphrag",
"aiTopics": true,
"keywordsSource": "related",
"importCountry": "US"
}'
const url = 'https://infranodus.com/api/v1/import/googleSearchIntentGraph'
+ '?doNotSave=true&addStats=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
keywordsSource: 'related',
importCountry: 'US'
})
});
const data = await response.json();
console.log(data);
Response
Returns a list of statements and a graph in JSON format following the InfraNodus return object schema.
MCP server examples: 1 tool
analyze_related_search_queries
Shows what people search for around a query. Use keywordsSource: "adwords" for Google Ads keyword data.
{
"searchQuery": "claude code memory",
"includeSearchQueriesOnly": "false",
"keywordsSource": "related",
"aiTopics": "true",
"importLanguage": "EN",
"importCountry": "US"
}
12. AI Advice for Search Intent
Get AI-generated advice and research questions based on topical clusters or content gaps identified in suggested Google search queries. Useful for generating ideas based on current informational demand.
Request Body
{
"searchQuery": "graphrag",
"aiTopics": true,
"requestMode": "question",
"keywordsSource": "related"
}
const fetch = require('node-fetch');
const response = await fetch(
'https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice?doNotSave=true',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
requestMode: 'question',
keywordsSource: 'related'
})
}
);
const data = await response.json();
console.log(data.aiAdvice);
import requests
response = requests.post(
'https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice',
params={'doNotSave': 'true'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'searchQuery': 'graphrag',
'aiTopics': True,
'requestMode': 'question',
'keywordsSource': 'related'
}
)
data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice?\
doNotSave=true" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"searchQuery": "graphrag",
"aiTopics": true,
"requestMode": "question",
"keywordsSource": "related"
}'
const response = await fetch(
'https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice?doNotSave=true',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
requestMode: 'question',
keywordsSource: 'related'
})
}
);
const data = await response.json();
console.log(data.aiAdvice);
Response
Same structure as the graphAndAdvice endpoint (#2) response.
13. Compare Search Results vs. Search Intent
Generate a graph showing relations that exist in search intent but not in search results, along with topical clusters and content gaps. Useful for understanding what people search for but don't find and adjusting content strategy to cater to underserved niches.
Query Parameters
compareMode: string ('difference' | 'difference_nodes')
// plus other parameters from the graphAndStatements endpoint (#1)
Request Body
{
"searchQuery": "graphrag",
"aiTopics": true
}
const fetch = require('node-fetch');
const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentGraph'
+ '?compareMode=difference&doNotSave=true&addStats=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://infranodus.com/api/v1/import/googleSearchVsIntentGraph',
params={'compareMode': 'difference', 'doNotSave': 'true', 'addStats': 'true'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'searchQuery': 'graphrag',
'aiTopics': True
}
)
data = response.json()
print(data)
curl -X POST "https://infranodus.com/api/v1/import/googleSearchVsIntentGraph?\
compareMode=difference&doNotSave=true&addStats=true" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"searchQuery": "graphrag",
"aiTopics": true
}'
const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentGraph'
+ '?compareMode=difference&doNotSave=true&addStats=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true
})
});
const data = await response.json();
console.log(data);
MCP server examples: 1 tool
search_queries_vs_search_results
Finds what people look for that current results do not cover.
{
"searchQuery": "claude code memory",
"aiTopics": "true",
"importLanguage": "EN",
"importCountry": "US"
}
generate_seo_report
Chains six requests into one report: the topics of your text (graphAndStatements), the search results and search intent (endpoints 9 and 11), your text compared with each of them (graphsAndStatements with compareMode=difference), and this endpoint for what results do not cover.
14. AI Advice on Search Results vs. Search Intent
Get AI-generated advice and research questions based on the graph of what people search for but don't find. Useful for generating ideas based on informational demand not catered to by current supply.
Query Parameters
compareMode: string ('difference' | 'difference_nodes')
// plus other parameters from the graphAndAdvice endpoint (#2)
Request Body
{
"searchQuery": "graphrag",
"aiTopics": true,
"requestMode": "question",
"keywordsSource": "related"
}
const fetch = require('node-fetch');
const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice'
+ '?compareMode=difference&doNotSave=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
requestMode: 'question',
keywordsSource: 'related'
})
});
const data = await response.json();
console.log(data.aiAdvice);
import requests
response = requests.post(
'https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice',
params={'compareMode': 'difference', 'doNotSave': 'true'},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
json={
'searchQuery': 'graphrag',
'aiTopics': True,
'requestMode': 'question',
'keywordsSource': 'related'
}
)
data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice?\
compareMode=difference&doNotSave=true" \
-H "Authorization: Bearer your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"searchQuery": "graphrag",
"aiTopics": true,
"requestMode": "question",
"keywordsSource": "related"
}'
const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice'
+ '?compareMode=difference&doNotSave=true';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_api_token_here'
},
body: JSON.stringify({
searchQuery: 'graphrag',
aiTopics: true,
requestMode: 'question',
keywordsSource: 'related'
})
});
const data = await response.json();
console.log(data.aiAdvice);
Response
Same structure as the graphAndAdvice endpoint (#2) response.
15. Build a Graph of YouTube Content
Build a knowledge graph from YouTube search results, comments, or subtitles to see the topics in a conversation and the gaps between them. The graph is returned in the response and is not saved.
Query Parameters
Same as the graphAndStatements endpoint (#1).
Request Body
{
"searchQuery": "knowledge graph llm",
"searchMode": "search",
"importRegion": "US",
"limit": 500,
"sortBy": "Oldest",
"includeAuthors": false,
"includeReplies": false,
"modifyAnalyzedText": "",
"replaceEntities": false,
"aiAdvice": "false"
}
searchMode options: 'search' (default), 'comments', 'channel', 'playlist',
'subtitles', 'subtitlesChannel', 'subtitlesPlaylist'.
limit can be up to 2,000. sortBy options: 'Oldest' (default), 'Popular', 'Latest'.
Response
Same structure as the graphAndStatements endpoint (#1) response.
With "aiAdvice": "true", it follows the graphAndAdvice endpoint (#2) response.
MCP server examples: 1 tool
analyze_youtube_results
Maps the topics in YouTube results for a search term.
{
"searchQuery": "knowledge graph",
"searchMode": "search",
"limit": 100,
"sortBy": "Relevance",
"includeReplies": "false",
"excludeDescriptions": "true",
"includeGraph": "false",
"aiTopics": "true",
"includeSearchResultsOnly": "false",
"importLanguage": "EN",
"importRegion": "US"
}
Edit and Delete Graphs
16. Delete Statements from a Graph
Remove statements from one of your own graphs by describing which ones to remove. You don't need statement IDs.
Run it with dryRun: true first to see what would go. This endpoint requires the API key of a registered account.
Request Body
Send name (the graph name), exactly one selector, and optionally dryRun.
| Selector | Type | Matches |
|---|---|---|
categories | string[] | Statements with at least one of these categories |
statements | string[] | Statements with exactly this text (whitespace is normalized) |
query | string | Case-insensitive substring, or a regular expression written as /pattern/flags |
before, after | string (ISO 8601) | Statements dated before before and on or after after. Use one or both. |
all | boolean | Every statement. Must be true. |
statementIds | integer[] | Statements with these IDs. IDs not in the graph are returned in ignoredIds. |
{
"name": "name_of_your_graph",
"query": "/draft|outdated/i",
"dryRun": true
}
Response
{
"graphName": "name_of_your_graph",
"graphUrl": "https://infranodus.com/your_user/name_of_your_graph/edit",
"matchedCount": 2,
"matched": [
{ "id": 101, "content": "...", "categories": [], "timestamp": "2026-10-01T10:00:00.000Z" }
],
"removedIds": [],
"removedCount": 0,
"remaining": 48,
"dryRun": true
}
matched previews up to 200 statements. matchedByCategory is added for the
categories selector.
MCP server examples: 1 tool
delete_statements
The tool always sends dryRun: true first and shows the matches. It repeats the request with dryRun: false only after the user approves, which is a good pattern to copy for any agent that edits a graph.
{
"name": "my-research-notes",
"query": "/draft|outdated/i",
"dryRun": true
}
17. Update Statements in a Graph
Edit statements in one of your own graphs in place, for example to correct a fact in an agent's memory or retag notes after you restructure a topic. This endpoint requires the API key of a registered account.
Request Body
Send name, optionally dryRun, and one of the two modes below.
Mode A: list the edits. Each edit targets a statement by its exact text (match) or its statementId, and changes at least one of content (up to 1,000 characters), categories, or timestamp.
{
"name": "name_of_your_graph",
"edits": [
{ "match": "The old statement text", "content": "The corrected statement text" },
{ "statementId": 102, "categories": ["reviewed"] }
]
}
Mode B: select, then change. Use one selector from endpoint 16 with set, replace, or both.
set accepts addCategories, removeCategories, categories (replaces the list, so it can't be combined with the other two), and timestamp.
replace.pattern is a case-insensitive literal replaced everywhere, or a /pattern/flags regular expression (add g to replace every occurrence).
{
"name": "name_of_your_graph",
"categories": ["client-a"],
"set": { "addCategories": ["archived"] },
"replace": { "pattern": "Acme", "with": "Acme Corp" },
"dryRun": true
}
Response
{
"graphName": "name_of_your_graph",
"graphUrl": "https://infranodus.com/your_user/name_of_your_graph/edit",
"matchedCount": 1,
"updatedCount": 0,
"updated": [
{
"id": 102,
"before": { "content": "...", "categories": [], "timestamp": "..." },
"after": { "content": "...", "categories": ["reviewed"], "timestamp": "..." }
}
],
"unchanged": 0,
"rejected": [],
"dryRun": true
}
updated previews up to 200 statements. rejected lists edits that would leave a statement empty or too long.
In Mode A, unmatched lists the edits that found no statement.
MCP server examples: 1 tool
update_statements
Follows the same dry run and approval steps as delete_statements.
{
"name": "my-research-notes",
"edits": [
{
"match": "The old statement text",
"content": "The corrected statement text"
}
],
"dryRun": true
}
18. Delete a Graph
Permanently delete one of your own graphs with its statements, revisions, settings, and URL. The name becomes free again.
To empty a graph but keep it, use deleteStatements with all: true.
This endpoint requires the API key of a registered account.
Request Body
{
"name": "name_of_your_graph",
"dryRun": true
}
Response
{
"graphName": "name_of_your_graph",
"graphUrl": "https://infranodus.com/your_user/name_of_your_graph/edit",
"isLive": false,
"deleted": false,
"dryRun": true
}
MCP server examples: 1 tool
delete_graph
Also starts with a dry run, so the user sees what will go before anything is removed.
{
"name": "my-research-notes",
"dryRun": true
}
19. Change Graph Privacy
Make one or more of your graphs public or private. A public graph can be viewed by anyone with its URL.
Request Body
{
"context": "first_graph,second_graph",
"makePublic": true
}
context takes one graph name or several separated by commas. Without makePublic: true, the graphs become private.
The response is { "success": "..." } with a confirmation message, or { "error": "..." }.
AI and Retrieval
20. Semantic Search over Statements
Rank a list of statements by their vector similarity to a search query, so you can pick the evidence closest to a question.
Request Body
{
"mode": "aiSearch",
"searchQuery": "agent memory",
"text": ["first statement", "second statement"],
"numberOfResults": 300,
"similarityThreshold": 0.1
}
mode (or requestMode) must be aiSearch. text is a string or an array of statements, up to 512 KB in total.
searchQuery can be up to 32 KB.
Response
[
{ "similarity": 0.62, "matchedContent": "first statement" }
]
21. Explore a Node's Neighborhood
Find out what a concept is connected to in a saved graph: its neighbors by hop distance, the node each was reached through, the edge weight, and the statements on those links. This request makes no AI call.
Request Body
{
"name": "name_of_your_graph",
"node": "memory",
"hops": 2,
"maxNeighbors": 30,
"includeStatements": true
}
| Parameter | Type | Description |
|---|---|---|
name | string | Required. The name of your graph. |
node or nodes | string or string[] | Required. A node with or without [[ ]], or several spellings at once, such as ["gpu", "gpus"]. |
hops | integer | Distance from the node, 1 to 3. Default: 1. |
maxNeighbors | integer | 1 to 200. Default: 30. |
includeStatements | boolean | Default: true. |
maxNodes | integer | Size of the graph to search, 10 to 2,000. Default: 2,000. |
statementFilter | object | Search only part of the graph's statements. See Filter Statements. |
Response
{
"graphName": "name_of_your_graph",
"hops": 2,
"matched": ["memory"],
"nodes": [
{ "node": "memory", "degree": 12, "weighedDegree": 30, "bc": 0.4, "community": 1 }
],
"neighbors": [
{ "node": "agent", "hop": 1, "weight": 5, "via": null, "community": 1, "statementIds": [101] }
],
"statements": []
}
If no node matches, the endpoint answers 404 with similar node names in suggestions.
It returns up to 40 statements, closest first.
MCP server examples: 1 tool
get_node_neighborhood
Answers "what is this concept connected to?" without downloading the graph. These values for hops, maxNeighbors, and includeStatements are the tool's defaults.
{
"name": "my-research-notes",
"nodes": [
"agent memory"
],
"hops": 2,
"maxNeighbors": 30,
"includeStatements": true
}
22. Generate Vector Embeddings
Get a vector embedding for a text or for each statement in an array. Embeddings come from the OpenAI text-embedding-3-small model.
Request Body
{
"text": ["first statement", "second statement"]
}
text is a string or an array of strings, up to 512 KB in total.
Response
[
{ "query": "first statement", "embedding": [0.012, -0.034] }
]
23. Dify External Knowledge Retrieval
Use an InfraNodus graph as an external knowledge base in Dify. The endpoint follows the Dify External Knowledge API format,
and knowledge_id is the name of your graph.
Request Body
{
"knowledge_id": "name_of_your_graph",
"query": "How do agents keep memory between sessions?",
"retrieval_setting": {
"top_k": 10,
"score_threshold": 0.3
}
}
Response
{
"records": [
{
"content": "statement text",
"score": 0.71,
"title": "name_of_your_graph",
"metadata": {
"path": "https://infranodus.com/your_user/name_of_your_graph/edit",
"categories": []
}
}
]
}
Agent Memory
24. Project Learnings
Keep what agents learn about a project (where things live, traps, conventions, decisions) in a graph named learn-<project>,
so the next session starts from it. These endpoints power the
project learnings skill and the matching tools of the InfraNodus MCP server.
All memory endpoints in sections 24 to 27 require the API key of a registered account.
Enable Learnings for a Project
Creates the memory graph. A graph of the same name that isn't a memory graph is never modified.
{ "project": "my-repo", "language": "EN" }
Add Learnings
Without confirm: true, the request is a dry run that returns wouldWrite, so a person can review the batch before saving it.
types needs one entry per statement: location, trap, convention, decision,
workflow, question, or approach.
{
"project": "my-repo",
"statements": ["The [[build]] step must run before [[nodemon]] picks up changes."],
"types": ["workflow"],
"confirm": true
}
Statements can be up to 400 characters. A batch with an empty, overlong, or secret-like statement is rejected with status 422 and a rejected list.
Near-duplicates of existing learnings are saved as reinforced.
{
"enabled": true,
"written": 1,
"new": 1,
"reinforced": 0,
"graphName": "learn-my-repo",
"url": "https://infranodus.com/your_user/learn-my-repo/edit"
}
Get Learnings
{
"project": "my-repo",
"prompt": "How do I deploy this?",
"type": "workflow",
"limit": 15
}
| Send | You get |
|---|---|
No project | The list of your learnings graphs |
project only | An overview (knownAreas, mainConcepts, gaps) and the newest learnings |
entity | Every learning that mentions it. With hops of 2 or 3, also what it is connected to. |
prompt | GraphRAG retrieval of the closest learnings, with a similarity score. Counts as an AI call. |
limit defaults to 15 and can be up to 50. Learnings are returned in a learnings array, each with its categories and createdAt.
Reading for a Review of the Memory
Three more inputs are for a pass that reviews the memory, such as the dream command of the memory plugin:
| Input | Effect |
|---|---|
order | With project only: newest (default) or oldest, the end of the list to start from |
uncheckedFor | With project only: a number of days, 1 to 3650. Leaves out the learnings that carry a dream-YYYY-MM-DD category from the last that many days, and the "Confirmed again" repeats. The response then has unchecked, the number left to check |
transcend | only or include. See below |
Two category labels change what is returned. A learning with the category superseded is kept in the graph and never returned.
A statement with the category transcend is an idea brought in from outside the memory, checked against nothing: it is left out of every answer
unless you send transcend: "only" (just the ideas) or transcend: "include" (the ideas among the learnings).
The overview counts them as transcendIdeas. Both labels are set with the statement update call.
MCP server examples: 3 tools
enable_project_learnings
Creates the graph once per project, on the user's request.
{
"project": "my-repo",
"language": "EN"
}
add_project_learnings
Unless the user has already approved, the tool first sends confirm: false, shows what would be written, and saves with confirm: true after approval.
{
"project": "my-repo",
"statements": [
"[[Webpack]] builds must run before a [[deploy]]."
],
"types": [
"workflow"
],
"confirm": false
}
get_project_learnings
Send prompt for the learnings most related to a task, or entity to look up one concept.
{
"project": "my-repo",
"prompt": "How do we deploy?",
"limit": 15
}
25. Topic and Personal Memory
Store facts about a subject, client, or case (scope: "topic", graph memory-<topic>),
or your own preferences and setup (scope: "personal"). Enable a memory once, then add to it and read from it.
Enable Memory
{ "scope": "topic", "topic": "client-a" }
Add to Memory
Each statement needs at least two [[entities]] and can be up to 400 characters. Without confirm: true, the request is a dry run.
categories and timestamps are optional arrays with one entry per statement.
{
"scope": "topic",
"topic": "client-a",
"statements": ["[[Client A]] renews its [[contract]] in March."],
"categories": [["contracts"]],
"timestamps": ["2026-11-03T10:00:00.000Z"],
"confirm": true
}
Get from Memory
{
"scope": "topic",
"topic": "client-a",
"entity": "contract",
"hops": 2,
"limit": 15
}
| Send | You get |
|---|---|
scope (and topic) only | The newest statements and an overview of the graph: total, knownAreas, mainConcepts, gaps |
category | Only the statements saved with that category (for example, every fact tagged recipient), with the same overview of the whole graph |
entity | Every statement that mentions it. With hops of 2 or 3, also what it is connected to. |
prompt | GraphRAG retrieval of the closest statements, with a similarity score and the graph's gaps. Counts as an AI call. |
Results are returned in a statements array, newest first unless you send prompt.
limit defaults to 15 and can be up to 50. A request with category:
{
"scope": "topic",
"topic": "client-a",
"category": "recipient"
}
Response:
{
"enabled": true,
"scope": "topic",
"graphName": "memory-client-a",
"url": "https://infranodus.com/your_user/memory-client-a/edit",
"category": "recipient",
"total": 2,
"knownAreas": ["..."],
"mainConcepts": ["client a", "contract"],
"gaps": ["contract <-> renewal"],
"statements": [
{
"content": "[[Client A]] sends the [[contract]] to [[Northwind GmbH]].",
"categories": ["recipient"],
"createdAt": "2026-11-03T10:00:00.000Z"
}
]
}
MCP server examples: 3 tools
enable_memory
Turns on topic or personal memory once, on the user's request.
{
"scope": "topic",
"topic": "acme-client"
}
memory_add_relations
Saves statements with the same confirm steps as project learnings.
{
"scope": "topic",
"topic": "acme-client",
"statements": [
"[[Acme]] prefers [[quarterly reviews]]."
],
"confirm": false
}
memory_get_relations
Reads memory back for a task. Without scope, this tool uses the search endpoint instead.
{
"scope": "topic",
"topic": "acme-client",
"prompt": "What does Acme care about?",
"limit": 15
}
26. Recall Memory for a Prompt
Rank a project's learnings and your personal memory against a prompt, without an AI call. The
Graph Memory plugin calls it on each prompt and adds block to the agent's context.
Request Body
{
"project": "my-repo",
"prompt": "Why does the page not update after a build?"
}
Response
{
"project": "my-repo",
"graphName": "learn-my-repo",
"graphUrl": "https://infranodus.com/your_user/learn-my-repo/edit",
"exists": true,
"items": [
{ "kind": "learning", "type": "workflow", "text": "..." }
],
"block": "Text to add to the agent's context"
}
The response also has gap when a content gap relates to the prompt, and saved with the latest ingested session.
Up to two of the five items are kept for learnings with the category core, which are returned whatever the prompt is; those items have core: true.
Statements with the category superseded or transcend are never returned.
27. Ingest and Forget a Session
ingest uploads a session excerpt, and an AI call extracts the learnings from it in the background.
memory/forget undoes one ingested session. Both are used by the
Graph Memory plugin.
Ingest a Session
{
"project": "my-repo",
"excerpt": "The session transcript...",
"sessionId": "session_123",
"save": "learnings"
}
excerpt can be up to 80,000 characters. save takes learnings (default), memories, or both.
The endpoint answers 202 with { "accepted": true, ... } before extraction runs, or 409 if a graph of that name isn't a memory graph.
Forget a Session
{ "project": "my-repo", "sessionId": "session_123" }
Without sessionId, the most recent session is removed from every memory graph that has it.
{
"project": "my-repo",
"graphName": "learn-my-repo",
"sessionId": "session_123",
"forgotten": 4,
"from": { "learn-my-repo": 4 },
"restored": 0
}
Models and Account
28. List AI Models and Get Your User ID
aiModels lists the values you can pass as modelToUse and needs no API token. userId returns the account your token belongs to.
Response
{
"infranodus_models": ["infranodus-v1"],
"ai_models": ["gpt-4o", "gpt-4o-mini"]
}
{ "userId": 123, "userName": "your_user" }
Appendix 1: AI Request Types
The requestMode parameter controls what kind of insight the model generates.
It influences the final prompt sent to the LLM.
| Value | Description |
|---|---|
summary |
Generates a summary augmented with graph structure and your custom prompt |
graph summary |
Generates summaries for each topical cluster. Use with aiTopics=true for best results |
question |
Generates a question that bridges structural gaps in the graph |
chat |
Responds directly to the user's prompt, enhancing the context with the graph structure |
paraphrase |
Extracts the graph's structure and paraphrases main topics in one paragraph |
outline |
Generates a title and article outline based on the graph's structure |
response |
Direct response to the prompt, taking graph structure and conversation context into account |
idea |
Generates an innovative idea that bridges structural gaps in the graph |
develop |
Develops a deep, insightful idea that bridges structural gaps in the graph, revealing the underlying connection between the topics — as concise as idea, but with the depth of response |
fact |
Generates a factual statement that bridges structural gaps in the graph |
challenge |
Generates a challenging statement that bridges structural gaps in the graph |
reprompt |
Rewrites your original prompt using context information — useful for GraphRAG prompt augmentation |
custom |
Uses your own prompt from the prompt parameter. The graph data is appended automatically, so adjust your prompt accordingly |
transcend |
Selects topical clusters based on the optimize value (or content gaps by default) and then generates ideas that go beyond the graph structure — while still taking the identified topics and conceptual gateways into account. Useful for exploring how the discourse connects to broader themes and for generating novel perspectives that are informed by the graph but not constrained by it |
Appendix 2: Optimize Modes
The optimize query parameter controls how the algorithm selects which parts of the knowledge graph
to focus on when generating AI advice. Each mode uses a different strategy based on the graph's topical structure.
| Value | Description |
|---|---|
develop |
Gets the top nodes from all clusters of the graph, helping develop the current discourse broadly. If pinnedNodes or topicsToProcess are provided, it focuses on those instead. |
reinforce |
Gets the top nodes from the top clusters only, reinforcing the dominant themes of the current discourse. |
gaps |
Identifies structural gaps in the graph and directs the prompt to bridge them. When the graph is diverse, focuses on the most common gap. When highly connected, encourages exploring the least connected topics on the periphery. Use the gapDepth parameter (0–3) to reach deeper, less obvious gaps — higher values select further gaps with smaller topics in focus. |
latent |
Identifies the least represented topical clusters and attempts to bridge them, bringing underdeveloped areas of the discourse into focus. |
imagine |
Identifies the least represented clusters and the ideal entry points into the graph — nodes with the highest ratio of influence (betweenness centrality) to degree. These conceptual gateways can potentially connect the text to other discourses, helping explore beyond the periphery. |
optimize |
The default. Reads the state of the structure (biased, focused, diversified or dispersed) and bridges the graph's insight clusters: one to three clusters picked so that connecting them moves the structure toward a balanced shape. In a biased or focused graph these are the least influential clusters across a gap, in a diversified graph the widest gap, in a dispersed graph the most influential clusters across a gap. Use gapDepth to move to the next, less prominent set. If topicsToProcess is provided, it uses those topics instead. This is the best choice when you want the algorithm to adapt to the text automatically. |
Appendix 3: Response Object Reference
This appendix documents the complete structure of the entriesAndGraphOfContext object
returned by the graphAndStatements endpoint and shared by most other graph-returning endpoints.
Top-Level Envelope
{
"entriesAndGraphOfContext": {
"graph": {},
"statements": [],
"extendedGraphSummary": {},
"graphSummary": "",
"graphUrl": "",
"graphName": "",
"userName": "",
"isPublic": false,
"warning": ""
}
}
| Field | Type | Description |
|---|---|---|
graph | object | The knowledge graph (see Graph Object below) |
statements | array | Text segments with community annotations (see Statements). Empty when includeStatements=false |
extendedGraphSummary | object | Structured summary (see Extended Graph Summary). Included by default |
graphSummary | string | Plain-text summary of concepts, topics, gaps, gateways, and diversity stats. Only when includeGraphSummary=true |
graphUrl | string | URL to the graph on InfraNodus (only when saved with doNotSave=false) |
graphName | string | The context name of the saved graph |
userName | string | Graph owner name or "anonymous" |
isPublic | boolean | Whether this is a public graph being viewed |
warning | string | Present if AI topic generation timed out or was skipped |
Graph Object
The graph field contains:
| Field | Type | Description |
|---|---|---|
graphologyGraph | object | Serialized Graphology graph with nodes, edges, and attributes |
statementHashtags | object | Map of statement IDs to their extracted hashtag arrays |
graphologyGraph.attributes
Graph-level analytics and community structure:
| Field | Type | Description |
|---|---|---|
modularity | number | Community detection modularity score (0–1). Higher = more distinct clusters |
top_nodes | string[] | Top concept names ranked by influence (up to 16) |
top_influential_nodes | array | Top influential node data |
top_clusters | array | Topical clusters (see Clusters) |
gaps | array | Content gaps between clusters (see Gaps) |
diversity_stats | object | Network diversity/bias metrics (see Diversity Stats) |
network_dynamics | object | How the text moves through the graph in reading order: text type, DFA exponents, path measures, sentence rhythm (see network_dynamics) |
nodes_to_statements_map | object | Map of node names to arrays of statement IDs they appear in |
dotGraph | string | DOT-format keyword representation of the full graph |
dotGraphByCluster | object | DOT-format representations keyed by cluster ID (also includes pinned, top_nodes, conceptual_gateways) |
allClusters | array | Cluster summaries: { id, community, text, dotGraph, aiName } |
bigrams | object | Connected word pairs keyed by cluster ID |
includeGraph=false
When includeGraph=false, nodes, edges, top_nodes, top_clusters, gaps, dotGraph, dotGraphByCluster, allClusters, bigrams, and nodes_to_statements_map are removed from the response.
graphologyGraph.nodes
Each node represents a concept (word or entity) in the graph:
| Field | Type | Description |
|---|---|---|
key | string | The concept word (node identifier) |
attributes.degree | number | Number of connections to other concepts |
attributes.bc | number | Betweenness centrality — how much this concept bridges different parts of the graph |
attributes.community | string | Which topical cluster this node belongs to |
With compactGraph=true, nodes are reduced to { key, attributes: { bc } }.
graphologyGraph.edges
Each edge represents a co-occurrence relationship between two concepts:
| Field | Type | Description |
|---|---|---|
source | string | Source node key |
target | string | Target node key |
attributes.weight | number | Co-occurrence weight (higher = more frequently appear together) |
With compactGraph=true, edges are reduced to { source, target, attributes: { weight } }.
top_clusters (Topical Clusters)
Each entry in top_clusters represents a detected topical community:
| Field | Type | Description |
|---|---|---|
community | string | Cluster/community ID |
nodes | array | Nodes in this cluster: { nodeName: string, bc: number }, sorted by betweenness centrality |
numberRatio | number | Fraction of total nodes in this cluster (degree-based influence) |
bcRatio | number | Fraction of total betweenness centrality held by this cluster |
topStatementId | string | ID of the most representative statement for this cluster |
aiName | string | AI-generated topic name (when aiTopics=true) |
gaps (Content Gaps)
Each gap represents a structural hole between two topical clusters — a potential area for new content or insight:
| Field | Type | Description |
|---|---|---|
from | object | Source cluster: { community, nodes: [{ nodeName, bc }], aiName? } |
to | object | Target cluster: { community, nodes: [{ nodeName, bc }], aiName? } |
Use the gapDepth query parameter (0–3) to cycle through gaps from the most prominent to deeper, less obvious ones.
insight_clusters (Insight Clusters)
The clusters the AI bridges by default (optimize=optimize, no topics selected). They are chosen once, when the graph is built, from its gaps, the influence of each cluster and the diversity score, so the app, the API and the MCP server all use the same ones. The attribute is an array with one entry per gap depth; entry 0 is the default and gapDepth selects the others. It is null for a graph with fewer than two clusters.
| Field | Type | Description |
|---|---|---|
gapDepth | number | The depth this entry serves |
rule | string | The state the choice was made for: biased, focused, diversified, dispersed or default |
clusters | array | One to three clusters, the primary one first: { community, role }. community is the cluster ID in top_clusters. role is gap (an end of the gap being bridged), bridge (a cluster linked to that gap through another gap) or influence (picked by influence when no gap applies) |
The raw attribute is returned with the graph (includeGraph=true, also with compactGraph=true). /graphAndAdvice with includeGraph=false returns no graph object at all, so read the insight clusters from extendedGraphSummary.insightClusters there: the same choice as readable lines with the cluster names.
diversity_stats
Measures how balanced the text's topical structure is:
| Field | Type | Description |
|---|---|---|
diversity_score | string | "biased" | "focused" | "diversified" | "dispersed" |
modularity_score | number | Modularity interpretation value |
too_focused_on_top_nodes | boolean | Whether top concepts dominate disproportionately |
too_focused_on_top_clusters | boolean | Whether top clusters dominate disproportionately |
ratio_of_top_nodes_influence_by_betweenness | number | How much betweenness the top nodes hold |
ratio_of_top_cluster_influence_by_betweenness | number | How much betweenness the top clusters hold |
total_clusters | number | Total number of detected clusters |
fair_influence_by_cluster | number | Expected fair betweenness/influence ratio per cluster |
top_nodes_entropy | number | Entropy of how top nodes are distributed among clusters (higher = more evenly spread) |
network_dynamics
Read in order, the words of a text trace a path through its graph. network_dynamics describes that path, so you can tell how a text is built and not only what it is about: whether it keeps returning to a few main concepts, whether it stays in a topic before moving on, and whether its sentences come in runs of similar length. Use it to compare a draft with its edited version, to profile the writing of a source, or to give an agent a structural description of a text next to its topics and gaps. It is returned in graph.graphologyGraph.attributes, next to diversity_stats, whenever the graph is built with addStats=true.
These measures describe structure. They are not an AI detector, and a single text should be read as a tendency: the same text can read differently in its first and second half.
"network_dynamics": {
"text_type": {
"label": "refrain",
"description": "Has a core and keeps moving (roams): the text keeps returning to the same core at an even rate, without settling into any part of it.",
"has_core": true, "structure": "focused",
"stays_where_it_goes": false, "basis": "memory",
"memory_score": -0.97, "memory_parts": 6, "confidence": "clear"
},
"fractal_variability": {
"ngram4_graph_radial_distance": { "series_length": 903, "dfa_alpha_global": 0.709, "dfa_alpha2": 0.575 },
"ngram4_graph_step_length": { "series_length": 902, "dfa_alpha_global": 0.666, "dfa_alpha1": 0.651, "dfa_alpha2": 0.648 },
"sentence_word_count": { "series_length": 229, "dfa_alpha_global": 0.586, "dfa_alpha1": 0.7 },
"sentence_word_count_series_available": 229,
"node_betweenness_rank": { "series_length": 906, "dfa_alpha1": 0.512 }
},
"node_graph_path_amplitude": {
"steps": 905,
"mean_step_relative_to_graph_radius": 0.914,
"cross_cluster_step_share": 0.526,
"cluster_dwell_cv": 0.901,
"mean_radial_distance_relative_to_graph_radius": 0.895,
"radial_distance_cv": 0.215
},
"sentence_rhythm": {
"prose_sentences": 156,
"skipped_fragments_under_12_words": 15,
"mean_words_per_sentence": 16.5,
"share_under_8_words": 0.115,
"share_over_30_words": 0.051
}
}
text_type — one of four names, from two yes-or-no questions:
| Stays where it goes (dwells) | Keeps moving (roams) | |
|---|---|---|
| Has a core | deep dive: goes into its main topic, stays there, comes back to the core and goes out again | refrain: keeps returning to the same core at an even rate, without settling into any part of it |
| No single core | chapters: moves through several topics and stays in each for a while | sweep: touches many topics at an even rate, never settling |
| Field | Type | Description |
|---|---|---|
label | string | null | "deep dive" | "refrain" | "chapters" | "sweep". null when there is too little to judge by |
description | string | null | One sentence saying what the type means |
has_core | boolean | null | Whether one topical cluster or a few concepts carry the text. From structure: biased or focused = true, diversified or dispersed = false |
structure | string | null | The diversity_score the first answer was read from |
stays_where_it_goes | boolean | null | true = stays where it goes (dwells), false = keeps moving (roams). It is memory_score > 0 |
basis | string | null | "memory": judged from the memory score. "movement": the text is too short for any part of the score, so it is judged from the size of its steps and is a weak reading |
memory_score | number | null | The average of up to six parts, each expressed as its distance from a typical value in standard deviations. Three are DFA exponents: ngram4_graph_radial_distance.dfa_alpha2, node_betweenness_rank.dfa_alpha1 and sentence_word_count.dfa_alpha_global. Three describe how the text moves between topics and are read against a path of the same length: cross_cluster_step_share (reversed), cluster_dwell_cv and ngram4_graph_step_length.dfa_alpha1. A part that could not be measured is left out |
memory_parts | number | How many of the six parts the score is the average of. Texts under 64 sentences have five at most |
confidence | string | null | "clear" or "borderline". Borderline means the score is within 0.25 of zero or rests on a single part, so the neighbouring type is nearly as likely |
fractal_variability — detrended fluctuation analysis (DFA) of four series taken from the text in reading order. An exponent near 0.5 means each value is independent of the last; towards 1.0 the series is persistent, so similar values come in runs. A series needs at least 64 points, and is null below that.
| Field | Type | Description |
|---|---|---|
ngram4_graph_radial_distance | object | null | Every 4 consecutive concepts form a window. The series is the distance of each window from the centre of the path. A high dfa_alpha2 means the text moves in phases: near its main concepts for a while, then further out for a while |
ngram4_graph_step_length | object | null | The distance from each of those windows to the next. High values mean small and large steps come in runs: settled stretches, then restless ones. It describes the pattern of the movement, not its amount, and returns all three exponents |
sentence_word_count | object | null | The number of words in each sentence. High values mean long and short sentences come in runs |
sentence_word_count_series_available | number | How many sentences were found. Reported even when sentence_word_count is null because there were fewer than 64 |
node_betweenness_rank | object | null | The betweenness rank of each concept the text passes through, from peripheral (0) to central (1). A high dfa_alpha1 means central and peripheral concepts come in bursts |
Each series object holds series_length and its exponents: dfa_alpha_global (all scales, from 4 points up to a quarter of the series), dfa_alpha1 (short range, 4 to 16 points) and dfa_alpha2 (long range, 16 points and up). By default each series returns the exponents that are stable enough to interpret; fractalExperimental=true returns all three with a label for each. With multifractal=true the radial, sentence and betweenness series also carry a multifractal object (the spectrum needs about 512 points).
node_graph_path_amplitude — plain statistics of the path from concept to concept. Distances are in graph radii (the typical distance of a node from the middle of the graph), so they compare across graphs of different size.
| Field | Type | Description |
|---|---|---|
steps | number | Number of steps in the path, one per concept mention after the first |
mean_step_relative_to_graph_radius | number | Average distance between consecutive concepts. Grows with text length, so compare texts of similar length |
cross_cluster_step_share | number | null | Share of steps that cross into another topical cluster: how often the text switches topic. Grows with text length |
cluster_dwell_cv | number | null | How uneven the stays inside a topic are. High values mean long stays in some topics and brief visits to others. null when the text crosses between topics too few times |
mean_radial_distance_relative_to_graph_radius | number | Average distance of the path from its centre. Low values mean the text keeps repeating a few main concepts, which tend to be the ones connecting its topics. High values mean it gives all its concepts about the same number of mentions |
radial_distance_cv | number | How much that distance varies over the text |
With fractalExperimental=true this object also returns graph_radius_rms, step_cv and step_lag1_autocorrelation.
sentence_rhythm — sentence statistics of the source text, independent of the graph. Statements under 12 words (headings, list items, captions) are left out.
| Field | Type | Description |
|---|---|---|
prose_sentences | number | Sentences measured |
skipped_fragments_under_12_words | number | Short statements left out |
mean_words_per_sentence | number | Average sentence length in words |
share_under_8_words | number | Share of sentences under 8 words |
share_over_30_words | number | Share of sentences over 30 words |
With fractalExperimental=true it also returns prose_statements, words_per_sentence_cv and words_per_sentence_lag1_autocorrelation.
The same values, with one sentence of interpretation for each, are returned by the analyze_text_signature tool of the InfraNodus MCP server, so an agent in Claude, Cursor or another MCP client can explain a result instead of quoting numbers. In the app they are shown under Narrative → Variability; what each value means is explained on the Narrative Variability methodology page.
Statements
Each statement is an input text segment annotated with graph structure:
| Field | Type | Description |
|---|---|---|
id | string | Statement ID |
content | string | The statement text |
statementHashtags | string[] | Concept words extracted from this statement |
statementCommunities | array | Community IDs of the concepts in this statement |
topStatementCommunity | string | The most frequent community in this statement |
topStatementOfCommunity | string | Which community this statement best represents ("none" if not a top representative) |
categories | array | Categories associated with the statement |
timestamp | string | ISO date-time |
by | string | Author or source identifier |
name | string | Graph context name |
With compactStatements=true, statements are reduced to: { id, content, categories, topStatementCommunity, topStatementOfCommunity }.
Extended Graph Summary
The extendedGraphSummary is a structured object (included by default) that provides pre-processed analytics:
| Field | Type | Description |
|---|---|---|
mainTopics | string[] | Formatted topic descriptions with influence percentages |
mainTopicNames | string[] | Topic names only (AI-generated when available) |
mainConcepts | string[] | Top concept names |
contentGaps | string[] | Formatted gap descriptions (e.g. "Topic A → Topic B"): the three widest gaps |
insightClusters | string[] | The insight clusters for the first four gap depths, one line each, e.g. "Insight clusters 1 (biased): [gap] Topic A (words) + [bridge] Topic B (words)". Empty for graphs built before the attribute existed |
topInfluentialNodes | array | Top influential node data |
topRelations | string[] | Top co-occurring concept pairs |
topBigrams | string[] | Word pair strings (e.g. "concept1 concept2") |
topicsToDevelop | string[] | DOT-graph suggestions for each cluster |
conceptualGateways | string[] | Nodes that bridge multiple clusters |
conceptualGatewaysGraph | array | DOT-graph structure for gateway nodes |
diversityStatistics | object | Same as diversity_stats above, plus the modularity value |