Teachability
Teachability is designed to be composable with other agent capabilities.
To make any conversable agent teachable, instantiate both the agent and the Teachability class, then pass the agent to teachability.add_to_agent(agent).
Note that teachable agents in a group chat must be given unique path_to_db_dir values.
When adding Teachability to an agent, the following are modified:
- The agent’s system message is appended with a note about the agent’s new ability.
- A hook is added to the agent’s
process_last_received_message hookable method,
and the hook potentially modifies the last of the received messages to include earlier teachings related to the message.Added teachings do not propagate into the stored message history.
If new user teachings are detected, they are added to new memos in the vector database.
Parameters:
Instance Methods
add_to_agent
prepopulate_db
process_last_received_message
Uses TextAnalyzerAgent to make decisions about memo storage and retrieval. Parameters: