Azure / Azure/agent-openai-python-banking-assistant

[User Story] - Provide Support for "Per User" persistent threads

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
2
Forks
5
PR merge metrics
No merged PRs in 30d

Description

**Description**
Provide support for persistent thread per user. User should be able to look at their last conversations and delete them as well. We can take inspiration about how this is already implemented in [azure-search-openai-demo](https://github.com/Azure-Samples/azure-search-openai-demo/blob/4d933cc02b20eaa9f9233360c89f4d0fffd60caf/docs/deploy_features.md#enabling-persistent-chat-history-with-azure-cosmos-db)

**Current Behavior**
Current thread messages are stored in memory. They get lost after each server restart.

**Acceptance Criteria**

- [ ] A new thread with a new message is created on cosmosdb every time a new chat is started with user message.
- [ ] Subsequent user messages plus agent response are stored in the thread. This will include sub-agents response as well as tool call request and results
- [ ] User can look at a Conversation History Panel in the UI and restart and old conversation
- [ ] User can select a previous conversation from the History Panel and delete it

**Design Considerations**
Use agent framework to implement a CosmosDB ChatMessageStoreProtocol. As example we can look at the current Redis [built-in implementation](https://github.com/microsoft/agent-framework/blob/main/python/packages/redis/agent_framework_redis/_chat_message_store.py). This can probably be a contribution back to agent-framework.
We might reuse most of the code already created iin azure-search-openai-demo:
- [backend](https://github.com/Azure-Samples/azure-search-openai-demo/tree/4d933cc02b20eaa9f9233360c89f4d0fffd60caf/app/backend/chat_history)
- [frontend](https://github.com/Azure-Samples/azure-search-openai-demo/tree/4d933cc02b20eaa9f9233360c89f4d0fffd60caf/app/frontend/src/components/HistoryPanel)

**Depends On**
#11

**Main Affected Modules and/or Classes**
new modules will be added.

**References**
- https://github.com/Azure-Samples/azure-search-openai-demo

---
*Migrated from: https://github.com/Azure-Samples/agent-openai-python-banking-assistant/issues/18*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.