Skip to content

Servers

https://api.memnetai.com/

Default


Common Sense API

POST
v1/common-sense

This interface is used to add common knowledge to the commonsense database

heat: 50 points

📌 Attention

Common sense is a high weight memory that humans gradually internalize through long-term experience accumulation. It is usually stable, persistent, and continues to play a role in cognition and decision-making.

This interface is used to supplement and manage common sense memory for memory, enabling agents to have a stable cognitive foundation during long-term operation.

In the development of intelligent agents, developers often set up personas for the agents. However, when a large amount of character information is directly stacked in the context of a large model in the form of prompt words, it can easily lead to attention dispersion, decreased effectiveness, and even trigger hallucination problems.

The knowledge base is one of the important means to solve this problem. For intelligent agents, the most core and critical human design information can be retained in the context of large models for a long time; And those equally important but not necessarily explicitly emphasized in each round of character design elements, such as character experiences, background settings, long-term preferences, etc., are more suitable for being precipitated as common sense memories and stored in a common sense database.

Due to the complete decoupling of the knowledge base from specific memory, it can not only serve as a long-term cognitive supplement to a certain memory, but also be shared among multiple memories, forming a reusable common memory resource.

Common sense memory has a highly flexible application space, which can be used to enhance the consistency and stability of intelligent agent personas, as well as to construct domain knowledge, behavioral constraints, and value preference systems. Developers can freely explore and combine different usage methods according to their own needs.

Parameters

Header Parameters

Authorization

API key token

Typestring
Example"Token <api-key>"

Request Body

application/json
JSON
{
"commonSenseDatabaseId": "string",
"commonSenseText": "string",
"asyncMode": 1
}

Responses

application/json
JSON
{
"code": "string",
"msg": "string",
"data": {
"tip": "string",
"usage": {
"consumedPoints": "string",
"consumedMemoryCount": "string",
"consumedRecallCount": "string",
"consumedThinkingCount": "string",
"consumedDreamCount": "string",
"consumedCommonMemoryWords": "string",
"hasRemainingQuota": true
},
"taskId": "string"
}
}

Playground

Headers
Body

Samples

cURL
JavaScript
PHP
Python

Powered by VitePress OpenAPI