add • AI Agent SDK

add: Add a new entry to the store.

add

Method

</div>

This is a method of the LearnProtocol class in the protocols module.

Add a new entry to the store.

Signature

python
def add(content: str, metadata: Optional[Dict[str, Any]]) -> Dict[str, Any]

Parameters

ParamField str

The content to store

ParamField Optional

Optional metadata dictionary

Returns

ResponseField Dict[str, Any]

Dictionary with entry details including ‘id’

Used By

Source

View on GitHub

praisonaiagents/memory/learn/protocols.py at line 44