{
  "openapi": "3.0.1",
  "info": {
    "title": "Ai Memory Actor Apify RAG",
    "description": "this actor work as a session tool for the AI viber coder IDE such as claude or antigravity what it does just connect the mcp of apify and then store your last session every new session the Ai will remember by recalling the last session",
    "version": "0.0",
    "x-build-id": "Vyi0CRbEeQdd0XmC3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/charmed_magnolia~Ai-memory-actor-apify/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-charmed_magnolia-Ai-memory-actor-apify",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/charmed_magnolia~Ai-memory-actor-apify/runs": {
      "post": {
        "operationId": "runs-sync-charmed_magnolia-Ai-memory-actor-apify",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/charmed_magnolia~Ai-memory-actor-apify/run-sync": {
      "post": {
        "operationId": "run-sync-charmed_magnolia-Ai-memory-actor-apify",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "action",
          "memoryStoreId"
        ],
        "properties": {
          "action": {
            "title": "Action",
            "enum": [
              "remember",
              "recall",
              "search",
              "forget",
              "context_pack",
              "update",
              "stats",
              "prune",
              "chunk"
            ],
            "type": "string",
            "description": "REQUIRED. Operation to perform: remember | recall | search | forget | context_pack | update | stats | prune | chunk",
            "default": "stats"
          },
          "memoryStoreId": {
            "title": "Memory Store ID",
            "type": "string",
            "description": "REQUIRED. Stable id for your named key-value store (e.g. my-github-user~stripe-integration). Same id across sessions = persistent memory."
          },
          "url": {
            "title": "URL",
            "maxLength": 2000,
            "type": "string",
            "description": "Page URL for remember, recall, or context_pack. Normalized for matching."
          },
          "content": {
            "title": "Memory Content",
            "maxLength": 200000,
            "type": "string",
            "description": "Text to save when action is remember."
          },
          "query": {
            "title": "Search Query",
            "maxLength": 1000,
            "type": "string",
            "description": "Keywords for search or to rank recall results."
          },
          "memoryId": {
            "title": "Memory ID",
            "type": "string",
            "description": "UUID of a single memory (for forget or update operations)."
          },
          "projectId": {
            "title": "Project ID",
            "maxLength": 200,
            "type": "string",
            "description": "Optional filter (repo name, feature slug)."
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit for recall and search.",
            "default": 20
          },
          "maxTokens": {
            "title": "Max Tokens (Estimate)",
            "minimum": 200,
            "maximum": 8000,
            "type": "integer",
            "description": "Approximate token budget for context markdown.",
            "default": 2500
          },
          "maxTokensPerChunk": {
            "title": "Max Tokens Per Chunk",
            "minimum": 50,
            "maximum": 4000,
            "type": "integer",
            "description": "For chunk action: max tokens per chunk before splitting. Default 400.",
            "default": 400
          },
          "idempotencyKey": {
            "title": "Idempotency Key",
            "maxLength": 100,
            "type": "string",
            "description": "Optional client-provided idempotency key to deduplicate repeated remember/create requests."
          },
          "memoryDetails": {
            "title": "Memory Details",
            "type": "object",
            "description": "Optional structured metadata when remembering.",
            "properties": {
              "title": {
                "title": "Memory Title",
                "type": "string",
                "description": "Short descriptive title for this memory.",
                "maxLength": 300
              },
              "memoryType": {
                "title": "Memory Type",
                "type": "string",
                "description": "Type classification for this memory.",
                "enum": [
                  "integration_note",
                  "api_quirk",
                  "auth_flow",
                  "selector",
                  "breaking_change",
                  "project_binding",
                  "general"
                ],
                "enumTitles": [
                  "Integration Note",
                  "API Quirk",
                  "Auth Flow",
                  "Selector",
                  "Breaking Change",
                  "Project Binding",
                  "General"
                ]
              },
              "tags": {
                "title": "Tags",
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50
                },
                "maxItems": 50,
                "description": "Optional tags to help categorize this memory."
              },
              "confidence": {
                "title": "Confidence",
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "description": "Estimated confidence (0.0 - 1.0) in the memory's accuracy."
              },
              "importance": {
                "title": "Importance",
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "description": "Importance score (0.0 - 1.0) for ranking and decay."
              },
              "category": {
                "title": "Category",
                "type": "string",
                "description": "Category for organizing memories.",
                "maxLength": 100
              },
              "source": {
                "title": "Source",
                "type": "string",
                "description": "Origin of the memory.",
                "enum": [
                  "agent",
                  "human",
                  "crawl"
                ],
                "enumTitles": [
                  "Agent",
                  "Human",
                  "Crawl"
                ]
              },
              "relatedUrls": {
                "title": "Related URLs",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "URLs related to this memory."
              }
            }
          },
          "searchOptions": {
            "title": "Search Options",
            "type": "object",
            "description": "Options for refining search results.",
            "properties": {
              "limit": {
                "title": "Limit",
                "type": "integer",
                "description": "Maximum number of results to return.",
                "default": 20,
                "minimum": 1,
                "maximum": 500
              },
              "category": {
                "title": "Category Filter",
                "type": "string",
                "description": "Filter results by category.",
                "maxLength": 100
              },
              "includeArchived": {
                "title": "Include Archived",
                "type": "boolean",
                "description": "Whether to include archived memories in results.",
                "default": false
              },
              "minScore": {
                "title": "Minimum Score",
                "type": "number",
                "description": "Minimum relevance score threshold for results.",
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "decayConfig": {
            "title": "Decay Configuration",
            "type": "object",
            "description": "Configuration for memory importance decay over time.",
            "properties": {
              "enabled": {
                "title": "Enabled",
                "type": "boolean",
                "description": "Whether memory decay is enabled.",
                "default": false
              },
              "halfLifeDays": {
                "title": "Half-Life Days",
                "type": "number",
                "description": "Number of days for importance to halve.",
                "default": 30,
                "minimum": 1
              },
              "minImportance": {
                "title": "Minimum Importance",
                "type": "number",
                "description": "Minimum importance before archiving.",
                "default": 0.1,
                "minimum": 0,
                "maximum": 1
              },
              "pruneThreshold": {
                "title": "Prune Threshold",
                "type": "number",
                "description": "Importance threshold below which memories are pruned.",
                "default": 0.05,
                "minimum": 0,
                "maximum": 1
              },
              "maxMemoriesPerUser": {
                "title": "Max Memories Per User",
                "type": "integer",
                "description": "Maximum number of active memories per user.",
                "default": 1000,
                "minimum": 1
              }
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}