Raku Search API

The search API from Raku — 2 operation(s) for search.

GitHub OpenAPI

Operations 2

POST /api/v1/memories/search Search Memories #
POST /api/v1/memories/recall Recall Memories #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/raku-so:raku-so-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

raku-so-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Raku So Search API
  version: 0.1.0
  description: 'Operations tagged search across 2 of this provider''s published API definitions: openapi.json, raku-so-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Search
paths:
  /api/v1/memories/search:
    post:
      tags:
      - Search
      summary: Search Memories
      description: 'Hybrid memory search with vector + FTS5 + RRF scoring.


        Returns 200 with empty results if nothing matches (not 404).

        Returns 503 if embedding service is unavailable.'
      operationId: search_memories_api_v1_memories_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/memories/recall:
    post:
      tags:
      - Search
      summary: Recall Memories
      description: 'Graph-enhanced recall — vector + FTS5 + knowledge-graph traversal fused

        with normalized RRF, every signal filtering is_current=1 (RKU-64), then

        cross-encoder reranked (top 2x-limit, when available) and ranked by the

        shared scoring blend (R2.60). A query-embedding failure surfaces as 503;

        a reranker failure degrades to RRF order (response.reranked=False).'
      operationId: recall_memories_api_v1_memories_recall_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecallRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecallResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    RecallResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/RecallResult'
          type: array
          title: Results
        total:
          type: integer
          title: Total
        query:
          type: string
          title: Query
        weights_used:
          $ref: '#/components/schemas/SearchWeights'
        reranked:
          type: boolean
          title: Reranked
          description: True when the cross-encoder actually reranked this response (False = RRF order; rerank disabled, unavailable, or skipped under RSS pressure)
          default: false
      type: object
      required:
      - results
      - total
      - query
      - weights_used
      title: RecallResponse
      description: Graph-enhanced recall results.
    MemoryType:
      type: string
      enum:
      - fact
      - event
      - preference
      - procedure
      - insight
      title: MemoryType
      description: "Types of memory that can be stored.\n\nv2.0 taxonomy (migration 005):\n    observation → event, reflection → insight, instruction → procedure.\n    fact and preference unchanged."
    SearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/SearchResult'
          type: array
          title: Results
        total:
          type: integer
          title: Total
        query:
          type: string
          title: Query
        min_similarity:
          type: number
          title: Min Similarity
        weights_used:
          $ref: '#/components/schemas/SearchWeights'
      type: object
      required:
      - results
      - total
      - query
      - min_similarity
      - weights_used
      title: SearchResponse
      description: Search results with metadata.
    MemoryResponse:
      properties:
        id:
          type: string
          title: Id
        content:
          type: string
          title: Content
        source:
          anyOf:
          - type: string
          - type: 'null'
          title: Source
        memory_type:
          type: string
          title: Memory Type
        importance:
          type: number
          title: Importance
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
        last_accessed:
          type: string
          title: Last Accessed
        access_count:
          type: integer
          title: Access Count
        tags:
          items:
            type: string
          type: array
          title: Tags
          default: []
        confidence_score:
          anyOf:
          - type: number
          - type: 'null'
          title: Confidence Score
        source_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Type
        evidence_count:
          type: integer
          title: Evidence Count
          default: 0
        contradiction_count:
          type: integer
          title: Contradiction Count
          default: 0
        confidence_decay_rate:
          anyOf:
          - type: number
          - type: 'null'
          title: Confidence Decay Rate
        last_validated_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Validated At
        valid_from:
          anyOf:
          - type: string
          - type: 'null'
          title: Valid From
        valid_to:
          anyOf:
          - type: string
          - type: 'null'
          title: Valid To
        tx_from:
          anyOf:
          - type: string
          - type: 'null'
          title: Tx From
        tx_to:
          anyOf:
          - type: string
          - type: 'null'
          title: Tx To
        superseded_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Superseded By
        is_current:
          type: boolean
          title: Is Current
          default: true
      type: object
      required:
      - id
      - content
      - memory_type
      - importance
      - created_at
      - updated_at
      - last_accessed
      - access_count
      title: MemoryResponse
      description: "API response for a single memory.\n\nEXCLUDED always (never add these fields):\n    - embedding vector (RAKU-3 — can be reverse-engineered)\n    - tenant_id (OWASP-MT §3 — no cross-tenant data)\n    - raw metadata (may contain sensitive data)"
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    RecallFilters:
      properties:
        memory_types:
          items:
            $ref: '#/components/schemas/MemoryType'
          type: array
          title: Memory Types
          description: Restrict results to these memory types (empty = all)
      type: object
      title: RecallFilters
      description: Filters for the graph-enhanced recall pipeline.
    SearchWeights:
      properties:
        alpha:
          type: number
          minimum: 0.0
          title: Alpha
          description: Recency weight
          default: 1.0
        beta:
          type: number
          minimum: 0.0
          title: Beta
          description: Importance weight
          default: 1.0
        gamma:
          type: number
          minimum: 0.0
          title: Gamma
          description: Relevance (vector similarity) weight
          default: 1.0
        delta:
          type: number
          minimum: 0.0
          title: Delta
          description: Confidence weight (v3.3, defaults to 1.0)
          default: 1.0
        half_life_hours:
          type: number
          exclusiveMinimum: 0.0
          title: Half Life Hours
          description: Recency half-life in hours (default 168 = 7 days)
          default: 168.0
      type: object
      title: SearchWeights
      description: "Configurable scoring weights for the memory scoring formula.\n\nscore = alpha * recency + beta * importance + gamma * relevance + delta * confidence\n\nRecency uses exponential decay with a configurable half-life:\n    recency = 2 ^ (-hours_since_last_accessed / half_life_hours)\n\nDefault half-life of 168 hours (7 days) is more conservative than the\nStanford Generative Agents paper (~5.8 days via 0.995^h). Tune per\ndeployment — shorter half-lives for conversational context, longer\nfor reference facts.\n\nv3.3 adds delta (confidence) and half_life_hours. Graph scoring\nadded in May."
    SearchRequest:
      properties:
        query:
          type: string
          maxLength: 2000
          minLength: 1
          title: Query
          description: Search query text
        limit:
          type: integer
          maximum: 50.0
          minimum: 1.0
          title: Limit
          description: Max results
          default: 10
        min_similarity:
          type: number
          maximum: 1.0
          minimum: 0.0
          title: Min Similarity
          description: Min cosine similarity threshold
          default: 0.5
        memory_type:
          anyOf:
          - $ref: '#/components/schemas/MemoryType'
          - type: 'null'
        tag:
          anyOf:
          - type: string
            maxLength: 100
          - type: 'null'
          title: Tag
        weights:
          anyOf:
          - $ref: '#/components/schemas/SearchWeights'
          - type: 'null'
      type: object
      required:
      - query
      title: SearchRequest
      description: "Memory search request using hybrid vector + FTS5.\n\nPOST body for /api/v1/memories/search. Uses POST (not GET) because\nsearch parameters are complex and may exceed URL length limits.\n\nInvariants:\n    - query limited to 2,000 characters\n    - limit capped at 50 (search is expensive — embedding call per query)\n    - min_similarity prevents returning garbage matches"
    RecallRequest:
      properties:
        query:
          type: string
          maxLength: 2000
          minLength: 1
          title: Query
          description: Recall query text
        limit:
          type: integer
          maximum: 50.0
          minimum: 1.0
          title: Limit
          description: Max results
          default: 10
        max_hops:
          type: integer
          maximum: 3.0
          minimum: 1.0
          title: Max Hops
          description: Graph relationship-hop depth
          default: 1
        filters:
          anyOf:
          - $ref: '#/components/schemas/RecallFilters'
          - type: 'null'
        weights:
          anyOf:
          - $ref: '#/components/schemas/SearchWeights'
          - type: 'null'
        rerank:
          type: boolean
          title: Rerank
          description: Cross-encoder rerank of the top 2x-limit candidates (falls back to RRF order when the reranker is unavailable — see response.reranked)
          default: true
      type: object
      required:
      - query
      title: RecallRequest
      description: 'POST body for /api/v1/memories/recall — graph-enhanced retrieval.


        Fuses three retrieval signals (vector + FTS5 + knowledge-graph traversal)

        with normalized Reciprocal Rank Fusion, then ranks by the shared scoring

        blend (R2.60 — same formula as /search). ``max_hops`` bounds the

        relationship expansion from the entities of the lexical/semantic hits.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchResult:
      properties:
        memory:
          $ref: '#/components/schemas/MemoryResponse'
        score:
          type: number
          title: Score
          description: Combined weighted score
        score_components:
          additionalProperties:
            type: number
          type: object
          title: Score Components
          description: 'Individual score signals: vector, fts, recency, importance'
      type: object
      required:
      - memory
      - score
      - score_components
      title: SearchResult
      description: 'Single search result with component scores for transparency.


        score_components provides individual signals so callers can understand

        WHY a memory ranked where it did. Currently: vector, fts, recency,

        importance. May adds: graph, confidence.'
    RecallResult:
      properties:
        memory:
          $ref: '#/components/schemas/MemoryResponse'
        score:
          type: number
          title: Score
          description: 'Blend: a*recency + b*importance + g*relevance + d*confidence'
        score_components:
          additionalProperties:
            type: number
          type: object
          title: Score Components
          description: 'Individual signals: relevance, recency, importance, confidence'
        relevance:
          type: number
          title: Relevance
          description: Normalized RRF relevance in [0, 1]
        signals:
          items:
            type: string
          type: array
          title: Signals
          description: 'Which signals matched: vector / fts / graph'
      type: object
      required:
      - memory
      - score
      - score_components
      - relevance
      - signals
      title: RecallResult
      description: 'A recalled memory: blended score, fused relevance, contributing signals.'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
x-refined-from:
- openapi.json
- raku-so-openapi.json