Skip to content

Python: [Bug]: DevUI discovery omits configured context providers #8989

Description

@dhairyajangir

Description

DevUI omits configured context providers from an agent's details. Current Agent instances expose a context_providers list, but extract_agent_metadata() still reads the singular context_provider attribute. Both in-memory registration and directory discovery use this helper, so their EntityInfo.context_provider field remains None even when providers are configured.

Expected: an agent configured with InMemoryHistoryProvider() should expose ["InMemoryHistoryProvider"] in the existing metadata field. Multiple providers should be listed in their configured order.

Code Sample

from unittest.mock import Mock

from agent_framework import Agent, InMemoryHistoryProvider
from agent_framework_devui._utils import extract_agent_metadata

# The client is never called; no credentials or remote service are needed.
agent = Agent(
    client=Mock(model=None),
    context_providers=[InMemoryHistoryProvider()],
)
print([type(provider).__name__ for provider in agent.context_providers])
# ['InMemoryHistoryProvider']
print(extract_agent_metadata(agent)["context_provider"])
# Actual: None
# Expected: ['InMemoryHistoryProvider']

Error Messages / Stack Traces

No exception is raised. The discovery metadata silently omits the providers, so the frontend's Context Provider card is absent.

Package Versions

Reproduced on main commit e9857bd75a21843803431a2e7dfa41ee9b017ac7, using editable agent-framework-core 1.20.0 and agent-framework-devui 1.0.0b261002.

Python Version

Python 3.12.14 on Linux.

Additional Context

I am working on a focused fix to read the current provider list while keeping the existing context_provider response field and legacy singular fallback. Regression tests exercise zero, one, and multiple providers through EntityDiscovery.create_entity_info_from_object().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

devuiUsage: [Issues, PRs], Target: DevUIpythonUsage: [Issues, PRs], Target: PythonreproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflow

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions