Skip to content

Conversation history is not being passed between calls with the same thread. #13

Description

@kaareseras

With the code below I call the dataagent twice with the same thread name. but the data agent is unavare of the privious call:

🔐 Starting authentication...
A browser window will open for you to sign in to your Microsoft account.
🔄 Refreshing authentication token...
✅ Token obtained, expires at: Mon Dec 8 13:43:23 2025
✅ Authentication successful!

Asking: What is the temp in my spa
⏳ Status: queued
⏳ Status: in_progress
✅ Final status: completed
Answer: The current temperature in your spa is 39°C, based on the latest available data.

Asking: *What did I ask about before?
⏳ Status: queued
✅ Final status: completed
Answer: I don’t have access to previous conversation history in this session, so I can’t see what you asked about before. If you let me know your earlier question or topic, I can help you continue from there!

`
import os
import uuid

from dotenv import load_dotenv

from fabric_data_agent_client import FabricDataAgentClient

--------- Config & client setup ----------

load_dotenv() # reads TENANT_ID and DATA_AGENT_URL from .env

TENANT_ID = os.getenv("TENANT_ID")
DATA_AGENT_URL = os.getenv("DATA_AGENT_URL")

def get_client():
# On first use, this will open a browser window for interactive login.
return FabricDataAgentClient(
tenant_id=TENANT_ID,
data_agent_url=DATA_AGENT_URL,
)

client = get_client()

thread_name = "data_session" # fixed thread name for testing

answer = client.ask(
"What is the temp in my spa",
thread_name=thread_name, # keep context
)
print("Answer:", answer)

answer = client.ask(
"*What did I ask about before?",
thread_name=thread_name, # keep context
)
print("Answer:", answer)

--------- End ----------

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions