Delete History • AI Agent SDK
delete_history: Delete a specific message from chat history by index.
delete_history
Method
</div>
Delete a specific message from chat history by index.
Supports negative indexing (-1 for last message, etc.).
Signature
def delete_history(index: int) -> boolParameters
ParamField
intMessage index (0-based, supports negative indexing)
Returns
ResponseField
boolTrue if deleted, False if index out of range
Source
View on GitHubpraisonaiagents/agent/agent.py at line 4234