add • AI Agent SDK

add: Add memory to MongoDB.

add

Method

</div>

This is a method of the MongoDBMemory class in the knowledge module.

Add memory to MongoDB.

Signature

python
def add(messages: Any, user_id: Any, agent_id: Any, run_id: Any, metadata: Any) -> Any

Parameters

ParamField Any

No description available.

ParamField Any

No description available.

ParamField Any

No description available.

ParamField Any

No description available.

ParamField Any

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • datetime.utcnow
  • insert_one
  • logging.error

Used By

Source

View on GitHub

praisonaiagents/knowledge/knowledge.py at line 171