### Install and Start as Systemd Service Source: https://mem.nowledge.co/docs/server-deployment Installs the Mem server as a systemd service and starts it. ```bash nmem service install ``` -------------------------------- ### Install Mem as a Systemd Service (User) Source: https://mem.nowledge.co/docs/server-deployment Installs, enables, and starts the Mem service as a specified Linux user. Use this for production deployments. The service automatically starts on boot. You can customize the host and port if needed. ```bash sudo nmem service install --service-user # If you are running sudo directly from that Linux user, Mem can usually infer it sudo nmem service install # Custom host/port sudo nmem service install --service-user --host 0.0.0.0 --port 8080 ``` -------------------------------- ### Go Example for Get Source Image Source: https://mem.nowledge.co/docs/api/sources/source_id/images/filename/get A Go program snippet to retrieve a source image. This example demonstrates making the HTTP GET request and handling the response. ```go package main import ( "fmt" "io/ioutil" "log" "net/http" ) func main() { url := "http://127.0.0.1:14242/sources/string/images/string" resp, err := http.Get(url) if err != nil { log.Fatalf("Error making request: %v", err) } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { bodyBytes, _ := ioutil.ReadAll(resp.Body) log.Fatalf("Request failed with status %d: %s", resp.StatusCode, string(bodyBytes)) } imageBytes, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatalf("Error reading response body: %v", err) } // Process the imageBytes, e.g., save to a file or display fmt.Printf("Successfully retrieved %d bytes of image data.\n", len(imageBytes)) } ``` -------------------------------- ### Install Hooks for Local Plugin Source: https://mem.nowledge.co/docs/integrations/codex-cli Run the hook setup script from the repo-local plugin to complete the installation. This ensures that the necessary hooks are configured for the plugin. ```bash python3 ./.agents/nowledge-mem/scripts/install_hooks.py ``` -------------------------------- ### Install Nowledge Mem Plugin for Copilot CLI Source: https://mem.nowledge.co/docs/integrations/copilot-cli Install the Nowledge Mem plugin from the Copilot CLI plugin marketplace. This is a one-time setup. ```bash copilot plugin marketplace add nowledge-co/community copilot plugin install nowledge-mem@nowledge-community ``` -------------------------------- ### Verify Hermes Installation Source: https://mem.nowledge.co/docs/integrations/hermes After updating, the setup script prints the installed version and thread import endpoint. Verify these details to ensure Hermes is reading the correct HERMES_HOME. ```text Installed version: 0.5.18 Thread import endpoint: /threads/import ``` -------------------------------- ### C# Example for Get Source Image Source: https://mem.nowledge.co/docs/api/sources/source_id/images/filename/get C# code to fetch a source image using HttpClient. This example shows how to send the GET request and process the image data. ```csharp using System; using System.IO; using System.Net.Http; using System.Threading.Tasks; public class GetSourceImage { public static async Task Main(string[] args) { using (HttpClient client = new HttpClient()) { string url = "http://127.0.0.1:14242/sources/string/images/string"; try { HttpResponseMessage response = await client.GetAsync(url); response.EnsureSuccessStatusCode(); // Throw if HTTP status code is not success using (Stream streamToReadFrom = await response.Content.ReadAsStreamAsync()) using (Stream streamToWriteTo = File.Open("downloaded_image.jpg", FileMode.Create)) { await streamToReadFrom.CopyToAsync(streamToWriteTo); } Console.WriteLine("Image downloaded successfully."); } catch (HttpRequestException e) { Console.WriteLine($"Request error: {e.Message}"); } } } } ``` -------------------------------- ### Install Upgrade Request (Go) Source: https://mem.nowledge.co/docs/api/admin/upgrade/install/post Example of how to send a POST request to the install upgrade endpoint using Go's net/http package. The request body is JSON encoded with the target tag and confirmation. ```go package main import ( "bytes" "encoding/json" "log" "net/http" ) func main() { requestBody, err := json.Marshal(map[string]string{ "tag": "string", "confirm": "string", }) if err != nil { log.Fatalf("Error marshaling JSON: %v", err) } resp, err := http.Post("https://example.com/admin/upgrade/install", "application/json", bytes.NewBuffer(requestBody)) if err != nil { log.Fatalf("Error sending request: %v", err) } defer resp.Body.Close() // Handle response log.Printf("Status Code: %d", resp.StatusCode) } ``` -------------------------------- ### Install Upgrade Request (JavaScript) Source: https://mem.nowledge.co/docs/api/admin/upgrade/install/post Example of how to send a POST request to the install upgrade endpoint using JavaScript's fetch API. The request body includes the target tag and a confirmation string. ```javascript const response = await fetch("https://example.com/admin/upgrade/install", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ tag: "string", confirm: "string", }), }); ``` -------------------------------- ### Install Upgrade Request (C#) Source: https://mem.nowledge.co/docs/api/admin/upgrade/install/post Example of how to send a POST request to the install upgrade endpoint using C#'s HttpClient. The request body is JSON encoded with the target tag and confirmation. ```csharp using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; public class UpgradeInstaller { public static async Task InstallUpgradeAsync() { using (HttpClient client = new HttpClient()) { var json = "{\"tag\": \"string\", \"confirm\": \"string\"}"; var data = new StringContent(json, Encoding.UTF8, "application/json"); var url = "https://example.com/admin/upgrade/install"; var response = await client.PostAsync(url, data); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Status Code: {(int)response.StatusCode}"); Console.WriteLine($"Response Body: {result}"); } } public static void Main(string[] args) { InstallUpgradeAsync().GetAwaiter().GetResult(); } } ``` -------------------------------- ### JavaScript Example for Get Source Image Source: https://mem.nowledge.co/docs/api/sources/source_id/images/filename/get Example of how to fetch a source image using JavaScript. Ensure you replace placeholder values with actual IDs and filenames. ```javascript fetch("http://127.0.0.1:14242/sources/string/images/string") .then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return response.blob(); // or response.json() if the image is served with JSON metadata }) .then(blob => { // Handle the image blob, e.g., display it in an tag const imageUrl = URL.createObjectURL(blob); console.log("Image URL:", imageUrl); }) .catch(error => { console.error("Error fetching image:", error); }); ``` -------------------------------- ### Get Working Memory (C#) Source: https://mem.nowledge.co/docs/api/agent/working-memory/get C# example demonstrating how to get the agent's working memory. This uses HttpClient to make the request. ```csharp using System.Net.Http; using System.Threading.Tasks; public class Example { public static async Task GetWorkingMemoryAsync() { using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri("http://127.0.0.1:14242/"); HttpResponseMessage response = await client.GetAsync("agent/working-memory"); response.EnsureSuccessStatusCode(); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } } ``` -------------------------------- ### One-Command Setup for Nowledge Mem Plugin Source: https://mem.nowledge.co/docs/integrations/hermes This command provides a streamlined, one-line installation for the Nowledge Mem plugin, simplifying the setup process for Hermes Agent. ```bash bash <(curl -sL https://raw.githubusercontent.com/nowledge-co/community/main/nowledge-mem-hermes/setup.sh) ``` -------------------------------- ### Install Upgrade Request (Java) Source: https://mem.nowledge.co/docs/api/admin/upgrade/install/post Example of how to send a POST request to the install upgrade endpoint using Java's HttpClient. The request body is JSON encoded with the target tag and confirmation. ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; public class UpgradeInstall { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://example.com/admin/upgrade/install")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString( "{\"tag\": \"string\", \"confirm\": \"string\"}" )) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println("Status Code: " + response.statusCode()); System.out.println("Response Body: " + response.body()); } } ``` -------------------------------- ### Install Upgrade Request (cURL) Source: https://mem.nowledge.co/docs/api/admin/upgrade/install/post Example of how to send a POST request to the install upgrade endpoint using cURL. Ensure the tag and confirm fields match the desired version. ```shell curl -X POST "https://example.com/admin/upgrade/install" \ -H "Content-Type: application/json" \ -d '{ "tag": "string", "confirm": "string" }' ``` -------------------------------- ### Java Example for Get Source Image Source: https://mem.nowledge.co/docs/api/sources/source_id/images/filename/get Java code demonstrating how to retrieve a source image using HttpClient. This example handles the response and potential errors. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.file.Files; import java.nio.file.Paths; public class GetSourceImage { public static void main(String[] args) { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://127.0.0.1:14242/sources/string/images/string")) .GET() .build(); try { HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofByteArray()); if (response.statusCode() == 200) { Files.write(Paths.get("downloaded_image.jpg"), response.body()); System.out.println("Image downloaded successfully."); } else { System.err.println("Failed to download image. Status code: " + response.statusCode()); System.err.println("Response body: " + new String(response.body())); } } catch (IOException | InterruptedException e) { e.printStackTrace(); } } } ``` -------------------------------- ### Install Upgrade Request (Python) Source: https://mem.nowledge.co/docs/api/admin/upgrade/install/post Example of how to send a POST request to the install upgrade endpoint using Python's requests library. The request body is a JSON object containing the tag and confirmation. ```python import requests import json url = "https://example.com/admin/upgrade/install" headers = { "Content-Type": "application/json" } data = { "tag": "string", "confirm": "string" } response = requests.post(url, headers=headers, data=json.dumps(data)) print(f"Status Code: {response.status_code}") print(f"Response Body: {response.json()}") ``` -------------------------------- ### Agent Setup Instructions Source: https://mem.nowledge.co/docs/integrations/proma Provide this command to your agent for initial setup and verification of Nowledge Mem integration. ```shell Read https://mem.nowledge.co/SKILL.md and follow the instructions to install or update Nowledge Mem for Proma. Verify with nmem status, startup context, and a saved Proma thread, then summarize what changed. ``` -------------------------------- ### Python Example for Get Source Image Source: https://mem.nowledge.co/docs/api/sources/source_id/images/filename/get Python code to fetch an image from a source. This example uses the 'requests' library to make the GET request. ```python import requests url = "http://127.0.0.1:14242/sources/string/images/string" try: response = requests.get(url, stream=True) response.raise_for_status() # Raise an exception for bad status codes # Process the image content with open("downloaded_image.jpg", "wb") as f: for chunk in response.iter_content(chunk_size=8192): f.write(chunk) print("Image downloaded successfully.") except requests.exceptions.RequestException as e: print(f"Error fetching image: {e}") ``` -------------------------------- ### Install Mem Knowledge Co via AppImage Source: https://mem.nowledge.co/docs/server-deployment Downloads the AppImage, makes it executable, and runs it. Best for portable or manual use, not unattended server setup. ```bash BROWSER_UA='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' # Download the AppImage curl -A "$BROWSER_UA" -L -o nowledge-mem.AppImage https://nowled.ge/download-mem-appimage # Portable use only chmod +x nowledge-mem.AppImage ./nowledge-mem.AppImage ``` -------------------------------- ### Get Spaces API Response Example Source: https://mem.nowledge.co/docs/api/spaces/get This is an example of the JSON response body returned by the GET /spaces endpoint, showing the structure and typical fields for space information. ```json { "enabled": false, "spaces": [ { "id": "string", "key": "string", "name": "string", "aliases": [ "string" ], "description": "string", "icon": "string", "instructions": "string", "sharedSpaceIds": [ "string" ], "defaultRetrievalMode": "strict", "usage": { "memories": 0, "threads": 0, "sources": 0, "hasWorkingMemory": false }, "observed": false, "hasProfile": true } ] } ``` -------------------------------- ### Clone and Start Mem Docker Deployment Source: https://mem.nowledge.co/docs/docker Clone the community repository and use `nmemctl` to bring up the Mem Docker stack. This is the recommended method for a quick setup. ```bash git clone https://github.com/nowledge-co/community.git cd community/docker ./nmemctl up ``` -------------------------------- ### Go Example Source: https://mem.nowledge.co/docs/api/agent/ai-now/sessions/session_id/auto-approve/post Example of how to send a POST request to the auto-approve endpoint using Go. ```go package main import ( "bytes" "net/http" ) func main() { client := &http.Client{} request, _ := http.NewRequest("POST", "https://example.com/agent/ai-now/sessions/string/auto-approve", bytes.NewBuffer([]byte("{}"))) request.Header.Set("Content-Type", "application/json") client.Do(request) } ``` -------------------------------- ### GET /labels Source: https://mem.nowledge.co/docs/refs/openapi.json Lists labels with their usage counts. Supports pagination and sorting. ```APIDOC ## GET /labels ### Description List labels with usage counts. Paginate with ``offset`` to read past the first ``limit`` rows; the vocabulary can exceed a single page. ### Method GET ### Endpoint /labels ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of labels to return. Defaults to 100. Maximum value is 1000, minimum is 1. - **offset** (integer) - Optional - The number of labels to skip. Defaults to 0, minimum is 0. - **order_by** (string) - Optional - The field to sort labels by. Defaults to "name". - **order_desc** (boolean) - Optional - Whether to sort in descending order. Defaults to false. ### Response #### Success Response (200) An array of LabelResponse objects. #### Response Example [ { "id": "string", "name": "string", "color": "string", "description": "string", "usage_count": 0 } ] #### Error Response (422) Validation Error ``` -------------------------------- ### Install Raycast Extension from Source Source: https://mem.nowledge.co/docs/integrations/raycast Clone the community repository and install dependencies to set up the Raycast extension for development or customization. ```bash git clone https://github.com/nowledge-co/community.git cd community/nowledge-mem-raycast npm install && npm run dev ``` -------------------------------- ### Get Thread Coverage (cURL) Source: https://mem.nowledge.co/docs/api/threads/thread_id/coverage/get Example of how to call the Get Thread Coverage API using cURL. ```bash curl -X GET "http://127.0.0.1:14242/threads/string/coverage" ``` -------------------------------- ### GET /labels/merge-candidates Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves pairs of semantically similar labels that are candidates for merging. ```APIDOC ## GET /labels/merge-candidates ### Description Semantically-near label pairs (candidates for merge), read-only. Surfaces near-synonym and cross-language pairs for human/agent review. A cosine score is a candidate signal, not a verdict: nothing is merged here. Exact-canonical forks are excluded. ### Method GET ### Endpoint /labels/merge-candidates ### Response #### Success Response (200) An array of label pairs that are candidates for merging. #### Response Example [ { "label1": { "id": "string", "name": "string" }, "label2": { "id": "string", "name": "string" }, "similarity_score": 0.95 } ] #### Error Response (422) Validation Error ``` -------------------------------- ### Get Crystal Source Memories Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves the source memories from which a specific crystal was synthesized. ```APIDOC ## GET /library/crystal/{crystal_id}/source-memories ### Description Returns the source memories that were used to synthesize a given crystal. This endpoint powers the "Built from N memories" section on the Crystal page in the Library wiki. ### Method GET ### Endpoint /library/crystal/{crystal_id}/source-memories ### Parameters #### Path Parameters - **crystal_id** (string) - Required - The ID of the crystal. ### Response #### Success Response (200) - The response schema is not detailed in the source. #### Error Response (422) - Validation Error: Indicates an issue with the request parameters. ``` -------------------------------- ### GET /labels/{label_id} Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves a specific label by its unique identifier. ```APIDOC ## GET /labels/{label_id} ### Description Get a specific label by ID. ### Method GET ### Endpoint /labels/{label_id} ### Parameters #### Path Parameters - **label_id** (string) - Required - The unique identifier of the label to retrieve. ### Response #### Success Response (200) - (object) - Additional properties allowed. Represents the requested label. #### Error Response (422) - (object) - Validation Error. Schema reference: #/components/schemas/HTTPValidationError ``` -------------------------------- ### Get Entity Relationships (cURL) Source: https://mem.nowledge.co/docs/api/entities/entity_id/relationships/get Example of how to call the Get Entity Relationships API using cURL. ```shell curl -X GET "http://127.0.0.1:14242/entities/string/relationships" ``` -------------------------------- ### GET /library/wiki-page/topic/{community_id} Source: https://mem.nowledge.co/docs/refs/openapi.json Renders a single topic (community) wiki page as markdown, supporting cross-space graph aggregation. ```APIDOC ## GET /library/wiki-page/topic/{community_id} ### Description Renders a single topic (community) wiki page as markdown, supporting cross-space graph aggregation. ### Method GET ### Endpoint /library/wiki-page/topic/{community_id} ### Parameters #### Path Parameters - **community_id** (string) - Required - The unique identifier for the community (topic). ### Responses #### Success Response (200) - The response body schema is not detailed in the source. #### Error Response (422) - Validation Error: Indicates an issue with the request parameters. ``` -------------------------------- ### Get Thread Coverage Response (Success) Source: https://mem.nowledge.co/docs/api/threads/thread_id/coverage/get Example JSON response body for a successful Get Thread Coverage request. ```json { "thread_id": "string", "total_messages": 0, "covered_messages": 0, "memories": 0, "metadata": {} } ``` -------------------------------- ### GET /library/wiki-page/entity/{id_or_name} Source: https://mem.nowledge.co/docs/refs/openapi.json Renders a single entity's wiki page as markdown. It supports lookup by ID or a case-insensitive name fallback, facilitating cross-space graph aggregation. ```APIDOC ## GET /library/wiki-page/entity/{id_or_name} ### Description Renders a single entity's wiki page as markdown. It supports lookup by ID or a case-insensitive name fallback, facilitating cross-space graph aggregation. ### Method GET ### Endpoint /library/wiki-page/entity/{id_or_name} ### Parameters #### Path Parameters - **id_or_name** (string) - Required - The unique identifier (UUID) or canonical name of the entity. #### Query Parameters - **mention_limit** (integer) - Optional - The maximum number of mentions to include in the wiki page. Defaults to 30. Maximum value is 200, minimum value is 1. ### Responses #### Success Response (200) - The response body schema is not detailed in the source. #### Error Response (422) - Validation Error: Indicates an issue with the request parameters. ``` -------------------------------- ### GET /labels/health Source: https://mem.nowledge.co/docs/refs/openapi.json Provides a health report for the label vocabulary, including size, coverage, and consolidation progress. ```APIDOC ## GET /labels/health ### Description Label vocabulary health report. Reads the global label graph regardless of active space lens. Quantifies size, labels-per-memory, coverage, singleton rate, and the exact-canonical fork backlog so consolidation progress is measurable. ### Method GET ### Endpoint /labels/health ### Response #### Success Response (200) An object containing the label health report. The structure of this object is flexible and can contain various metrics. #### Response Example { "total_labels": 1500, "labels_per_memory_avg": 5.2, "coverage_percentage": 85.5, "singleton_rate": 10.2, "consolidation_backlog": 50 } #### Error Response (422) Validation Error ``` -------------------------------- ### GET /wiki/page/topic/library/wiki_page_topic/{community_id} Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves the topic library for a given community ID. It can optionally fetch the top N topics per community. ```APIDOC ## GET /wiki/page/topic/library/wiki_page_topic/{community_id} ### Description Retrieves the topic library for a given community ID. It can optionally fetch the top N topics per community. ### Method GET ### Endpoint /wiki/page/topic/library/wiki_page_topic/{community_id} ### Parameters #### Path Parameters - **community_id** (integer) - Required - The Louvain integer assigned by community detection. #### Query Parameters - **top_per_community** (integer) - Optional - The number of top topics to retrieve per community. Defaults to 12. Maximum value is 30, minimum is 1. ### Response #### Success Response (200) An empty JSON object is returned upon successful retrieval. #### Response Example {} #### Error Response (422) Validation Error ``` -------------------------------- ### Get Related Communities Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves other communities that share entity-to-entity edges with the specified community. ```APIDOC ## GET /library/community/{community_id}/related ### Description Returns other communities that share entity-to-entity edges with the specified community. Communities are identified via Louvain clustering over the global Entity projection. The "shared edge count" signifies the number of RELATES_TO edges between entities in the two communities, indicating a strong connection. ### Method GET ### Endpoint /library/community/{community_id}/related ### Parameters #### Path Parameters - **community_id** (integer) - Required - The ID of the community. #### Query Parameters - **limit** (integer) - Optional - The maximum number of related communities to return. Defaults to 6. (Minimum: 1, Maximum: 20) ### Response #### Success Response (200) - The response schema is not detailed in the source. #### Error Response (422) - Validation Error: Indicates an issue with the request parameters. ``` -------------------------------- ### Start Service Source: https://mem.nowledge.co/docs/server-deployment Starts the Mem systemd service. ```bash nmem service start ``` -------------------------------- ### Get Augmentation State Response (JSON) Source: https://mem.nowledge.co/docs/api/graph/augmentation/state/get Example JSON response body for a successful request to get the augmentation state. ```json { "success": true, "state": {} } ``` -------------------------------- ### Get Community Recent Memories Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves the most recent memories that mention any entity within a specified community. ```APIDOC ## GET /library/community/{community_id}/recent-memories ### Description Returns the most recent memories mentioning any entity in the specified community. This endpoint reads the global graph and powers the "Recent on this topic" section on the Library wiki community panel, connecting the community's topic definition with recent activity. ### Method GET ### Endpoint /library/community/{community_id}/recent-memories ### Parameters #### Path Parameters - **community_id** (integer) - Required - The ID of the community. #### Query Parameters - **limit** (integer) - Optional - The maximum number of recent memories to return. Defaults to 8. (Minimum: 1, Maximum: 20) ### Response #### Success Response (200) - The response schema is not detailed in the source. #### Error Response (422) - Validation Error: Indicates an issue with the request parameters. ``` -------------------------------- ### GET /library/crystal/{crystal_id}/source_memories Source: https://mem.nowledge.co/docs/refs/openapi.json Retrieves memories that contributed to a specific crystal, sorted by contribution weight in descending order. This endpoint follows the CRYSTALLIZED_FROM edge. ```APIDOC ## GET /library/crystal/{crystal_id}/source_memories ### Description Retrieves memories that contributed to a specific crystal, sorted by contribution weight in descending order. This endpoint follows the CRYSTALLIZED_FROM edge. ### Method GET ### Endpoint /library/crystal/{crystal_id}/source_memories ### Parameters #### Path Parameters - **crystal_id** (string) - Required - The unique identifier for the crystal. #### Query Parameters - **limit** (integer) - Optional - The maximum number of source memories to return. Defaults to 50. Maximum value is 100, minimum value is 1. ### Responses #### Success Response (200) - The response body schema is not detailed in the source. #### Error Response (422) - Validation Error: Indicates an issue with the request parameters. ``` -------------------------------- ### Start Watcher Response Body Source: https://mem.nowledge.co/docs/api/threads/watcher/start/post This is an example of a successful response body when starting the watcher. It indicates the watcher's status and configuration. ```json { "running": true, "watched_paths": [ "string" ], "last_check": 0, "auto_import_count": 0, "errors": [ "string" ] } ``` -------------------------------- ### Bge M3 Status Response (Not Installed) Source: https://mem.nowledge.co/docs/api/models/bge-m3/status/get Example JSON response indicating the Bge M3 model is not installed and not available for indexing. ```json { "exists": true, "available_for_indexing": false, "model_name": "search-embedding", "size_mb": 500, "message": "string", "embedding_mode": "local", "remote_provider": "string", "remote_model": "string", "backend": "auto", "platform": "unknown", "reindex_needed": false, "reindex_reason": "", "index_metadata_update_needed": false, "index_metadata_update_reason": "", "projection_repair_needed": false, "projection_repair_reason": "", "state": "not_installed", "verified": false, "integrity_ok": false, "smoke_test_ok": false, "singleton_initialized": false, "last_verified_at": "string", "error": "string" } ``` -------------------------------- ### List Entities with Limit and Type (Go) Source: https://mem.nowledge.co/docs/api/entities/get Go example demonstrating how to list entities with a specific limit and entity type. Adjust the URL parameters as needed. ```go package main import ( "fmt" "io" "net/http" "os" ) func main() { res, err := http.Get("http://127.0.0.1:14242/entities?limit=10&entity_type=person") if err != nil { fmt.Fprintf(os.Stderr, "Fatal error: %s\n", err.Error()) return } defer res.Body.Close() body, err := io.ReadAll(res.Body) if err != nil { fmt.Fprintf(os.Stderr, "Fatal error: %s\n", err.Error()) return } fmt.Println(string(body)) } ``` -------------------------------- ### Java Example Source: https://mem.nowledge.co/docs/api/agent/ai-now/sessions/session_id/auto-approve/post Example of how to send a POST request to the auto-approve endpoint using Java. ```java OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{}"); Request request = new Request.Builder() .url("https://example.com/agent/ai-now/sessions/string/auto-approve") .post(body) .addHeader("Content-Type", "application/json") .build(); client.newCall(request).execute(); ``` -------------------------------- ### Get Community Members (C#) Source: https://mem.nowledge.co/docs/api/graph/community-members/community_id/get C# example for retrieving community members. This demonstrates using HttpClient to send a GET request. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("http://127.0.0.1:14242/graph/community-members/string"), }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); } ``` -------------------------------- ### Get Context Bundle Request Source: https://mem.nowledge.co/docs/api/context/bundle/get Example cURL request to fetch the context bundle. This is a basic GET request to the specified endpoint. ```shell curl -X GET "http://127.0.0.1:14242/context/bundle" ``` -------------------------------- ### Install Nowledge Mem via AppImage (Linux) Source: https://mem.nowledge.co/docs/installation Download the latest AppImage, make it executable, and run it. This method does not install the `nmem` CLI into your PATH. ```bash BROWSER_UA='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' # Download the latest AppImage curl -A "$BROWSER_UA" -L -o nowledge-mem.AppImage https://nowled.ge/download-mem-appimage # Make it executable and run chmod +x nowledge-mem.AppImage ./nowledge-mem.AppImage ``` -------------------------------- ### Install or Update Nowledge Mem for Codex Source: https://mem.nowledge.co/docs/integrations/codex-cli This command installs or updates the Nowledge Mem for Codex. It's recommended to run this first as part of the setup process. Verify the installation with `nmem status`. ```bash Read https://mem.nowledge.co/SKILL.md and follow the instructions to install or update Nowledge Mem for Codex. Verify with nmem status and the Context Bundle or Working Memory check, then summarize what changed. ``` -------------------------------- ### Python Example Source: https://mem.nowledge.co/docs/api/agent/ai-now/sessions/session_id/auto-approve/post Example of how to send a POST request to the auto-approve endpoint using Python. ```python import requests url = "https://example.com/agent/ai-now/sessions/string/auto-approve" headers = { "Content-Type": "application/json" } data = "{}" response = requests.post(url, headers=headers, data=data) ``` -------------------------------- ### Get Community Recent Memories (Java) Source: https://mem.nowledge.co/docs/api/library/community/community_id/recent-memories/get Example using Java's HttpClient to make the GET request. This is suitable for Java-based applications. ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; public class GetRecentMemories { public static void main(String[] args) { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://127.0.0.1:14242/library/community/0/recent-memories")) .header("Accept", "application/json") .GET() .build(); try { HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } catch (IOException | InterruptedException e) { e.printStackTrace(); } } } ``` -------------------------------- ### Get Community Members (Python) Source: https://mem.nowledge.co/docs/api/graph/community-members/community_id/get Python script to retrieve community members. This example uses the 'requests' library to make the GET request. ```python import requests url = "http://127.0.0.1:14242/graph/community-members/string" response = requests.get(url) result = response.json() # result: dict ``` -------------------------------- ### Install Mem Background Service (System) Source: https://mem.nowledge.co/docs/server-deployment Installs the Mem background service as a systemd service. Recommended for servers. Replace `` with the desired user for the service. ```bash sudo nmem service install --service-user ``` -------------------------------- ### Get Community Members (Go) Source: https://mem.nowledge.co/docs/api/graph/community-members/community_id/get Go program to get community members. This example demonstrates making the API call and handling the response. ```go package main import ( "fmt" "net/http" "net/url" "os" "github.com/……” ) func main() { // TODO: Unused parameters _ = os.Args[0] query := http.Client{} var response *http.Response var err error values := url.Values{} response, err = query.Get("http://127.0.0.1:14242/graph/community-members/string") if err != nil { panic(err) } defer response.Body.Close() data, err := io.ReadAll(response.Body) if err != nil { panic(err) } fmt.Printf("%s\n", data) } ``` -------------------------------- ### C# Example Source: https://mem.nowledge.co/docs/api/agent/ai-now/sessions/session_id/auto-approve/post Example of how to send a POST request to the auto-approve endpoint using C#. ```csharp using System.Net.Http; using System.Text; var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/agent/ai-now/sessions/string/auto-approve"), Content = new StringContent("{}", Encoding.UTF8, "application/json") }; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); ``` -------------------------------- ### Install Browse Now Agent Skill Package Source: https://mem.nowledge.co/docs/browse-now Install the reusable skill package to enable supported agents to learn when and how to use browse-now for authenticated or interactive browser work. ```bash npx skills add nowledge-co/community/nowledge-mem-browse-now-npx-skills ``` -------------------------------- ### Set Graph Memory Limit on Server Install Source: https://mem.nowledge.co/docs/troubleshooting On headless or server installs, set the environment variable for graph memory before starting the Mem server. ```bash export KNOWLEDGE_KUZU_BUFFER_POOL_SIZE=512MB ``` -------------------------------- ### Get User Profile Response Body Source: https://mem.nowledge.co/docs/api/settings/profile/get Example JSON response body for a successful GET /settings/profile request, showing user profile fields. ```json { "name": "", "aliases": "", "context": "", "preferred_language": "en", "custom_instructions": "" } ``` -------------------------------- ### Download and Install Proma Plugin Files Source: https://mem.nowledge.co/docs/integrations/proma This script clones the community repository, copies necessary Python hooks and skills, and sets execute permissions for the Proma integration with Nowledge Mem. ```shell rm -rf /tmp/nowledge-community git clone https://github.com/nowledge-co/community.git /tmp/nowledge-community mkdir -p ~/.proma/scripts ~/.proma/agent-workspaces/default/skills cp /tmp/nowledge-community/nowledge-mem-proma-plugin/hooks/save-to-nmem.py ~/.proma/scripts/ cp /tmp/nowledge-community/nowledge-mem-proma-plugin/hooks/read-working-memory.py ~/.proma/scripts/ chmod +x ~/.proma/scripts/save-to-nmem.py ~/.proma/scripts/read-working-memory.py cp -R /tmp/nowledge-community/nowledge-mem-proma-plugin/skills/{read-working-memory,search-memory,distill-memory,save-thread,status} ~/.proma/agent-workspaces/default/skills/ ``` -------------------------------- ### Check CLI Status and Help Source: https://mem.nowledge.co/docs/browse-now Verify that the browse-now CLI is installed and accessible, and view its available options. ```bash browse-now status browse-now --help ``` -------------------------------- ### Get Community Recent Memories (Go) Source: https://mem.nowledge.co/docs/api/library/community/community_id/recent-memories/get Example using Go's net/http package to make the GET request. This is suitable for server-side integrations. ```go package main import ( "fmt" "log" "net/http" "io/ioutil" ) func main() { url := "http://127.0.0.1:14242/library/community/0/recent-memories" resp, err := http.Get(url) if err != nil { log.Fatalf("Error making request: %v", err) } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { log.Fatalf("Unexpected status code: %d", resp.StatusCode) } body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatalf("Error reading response body: %v", err) } fmt.Println(string(body)) } ``` -------------------------------- ### Get Working Memory (Python) Source: https://mem.nowledge.co/docs/api/agent/working-memory/get Python example for fetching agent's working memory. This code makes a GET request to the specified endpoint. ```python import requests response = requests.get("http://127.0.0.1:14242/agent/working-memory") print(response.json()) ``` -------------------------------- ### Add Project Guidance with AGENTS.md Source: https://mem.nowledge.co/docs/integrations/copilot-cli Clone the community repository and copy the `AGENTS.md` file to your project root for proactive searching and distillation. ```bash git clone https://github.com/nowledge-co/community.git /tmp/nowledge-community cp /tmp/nowledge-community/nowledge-mem-copilot-cli-plugin/AGENTS.md ./AGENTS.md rm -rf /tmp/nowledge-community ``` -------------------------------- ### Install Mem CLI Source: https://mem.nowledge.co/docs/server-deployment Install the standalone Mem CLI on remote machines using pip or uv. ```bash pip install nmem-cli # or uv pip install nmem-cli ``` -------------------------------- ### Get Feed Events (Go) Source: https://mem.nowledge.co/docs/api/agent/feed/events/get Example of fetching feed events using Go. This demonstrates making a GET request and handling the JSON response. ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { resp, err := http.Get("http://127.0.0.1:14242/agent/feed/events") if err != nil { fmt.Println("Error making request:", err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response body:", err) return } fmt.Println(string(body)) } ``` -------------------------------- ### Agent Pattern Examples Source: https://mem.nowledge.co/docs/api/fs Illustrates how agents can use the FS API to navigate and retrieve information, treating search results as entry points. ```shell recall "what did we decide about auth?" --in /memories ``` ```shell cat /memories/by-id/.memory.md ``` ```shell ls /memories/by-label/auth ``` ```shell stat /wiki/entities/PostgreSQL--.entity.md ``` -------------------------------- ### Fs Find API cURL Example Source: https://mem.nowledge.co/docs/api/fs/find/get Example of how to call the Fs Find API using cURL. This demonstrates a basic GET request to the endpoint. ```shell curl -X GET "http://127.0.0.1:14242/fs/find" ```