BrainAPI
BrainAPI
Retrieve

For the complete BrainAPI documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL. Docs MCP: /docs/mcp.

Choose a retrieval surface

Select Context, Search, Recommendations, graph APIs, or MCP from the output your caller needs

All retrieval surfaces can read the same brain, but they solve different caller problems. Start from the output contract rather than choosing the most advanced mechanism.

Compare the surfaces

SurfaceOutputBest forRelative work
/retrieve/contextPrompt-ready passages, triples, and historyGrounding one LLM callOne bounded retrieval pipeline.
/retrieve/searchOrdered hits, scores, snippets, facets, optional timingsSearch interfaces and relevance evaluationCandidate generation plus optional graph/plugin stages.
/retrieve/recommendItems related to a target user or nodeNext-item and related-content experiencesGraph reads; optional trained plugin backend.
Entity and graph APIsNodes, status, neighbors, paths, relationshipsInspection and deterministic graph workflowsExplicit traversal and application interpretation.
MCPTool results selected across several turnsInvestigations whose next step depends on earlier evidenceAgent orchestration and multiple calls.

Choose Context when an LLM consumes the result and a union of relevant evidence is more important than a stable total order. Choose Search when the order itself is a product feature, the UI displays snippets/facets, or you need to evaluate ranking metrics.

Enabling Search can change the passage mode available to Context, but it does not turn Context into /retrieve/search and does not attach Search plugins to Context.

Search or Recommendations?

Search starts from query text. Recommendations start from a target such as a user, document, course, media asset, or product. Query-gated personalization can softly reorder catalog search, but it does not replace the recommendation endpoint.

Graph APIs or MCP?

Use graph APIs when your application knows the entity or traversal it wants. Escalate to MCP when the question requires repeated tool selection, comparison, or follow-up based on intermediate results. Do not pay orchestration cost for a question one API call already answers.

Worked paths

Edit on GitHub

Last updated on

On this page