Skip to content

feat: bubble out appid into metadata#313

Merged
sicoyle merged 6 commits intodapr:mainfrom
CasperGN:feat/bubble-appid-metadata
Dec 18, 2025
Merged

feat: bubble out appid into metadata#313
sicoyle merged 6 commits intodapr:mainfrom
CasperGN:feat/bubble-appid-metadata

Conversation

@CasperGN
Copy link
Contributor

Description

The PR introduces automatically registering the agents appid into the metadata for simpler distinguishing multi-agent registrations to their respective appid's.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR closes: N/A

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Created/updated tests
  • Tested this change against all the quickstarts
  • Extended the documentation

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

Signed-off-by: Casper Nielsen <casper@diagrid.io>
@CasperGN CasperGN requested review from a team as code owners December 18, 2025 07:13
sicoyle
sicoyle previously approved these changes Dec 18, 2025
Copy link
Collaborator

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, glad this was an seamless add in 🎉

@sicoyle
Copy link
Collaborator

sicoyle commented Dec 18, 2025

anyway you can fix this warning by chance?

50 [    INFO] dapr_agents.memory.daprstatestore: ConversationDaprStateMemory initialized with session ID: TestDurableAgent-session
2025-12-18 14:58:50 [    INFO] dapr_agents.tool.executor: Tool Executor initialized with 0 tool(s).
2025-12-18 14:58:50 [ WARNING] dapr_agents.agents.components: Conflict during registry mutation (attempt 1/10) for 'agents:default': Object of type MagicMock is not JSON serializable
2025-12-18 14:58:50 [    INFO] dapr_agents.agents.components: {'TestDurableAgent': {'name': 'TestDurableAgent', 'orchestrator': False, 'role': 'Test Durable Assistant', 'goal': 'Help with testing', 'instructions': ['Be helpful'], 'pubsub': {'agent_name': 'TestDurableAgent', 'name': 'testpubsub', 'agent_topic': 'TestDurableAgent'}, 'memory': {'type': 'ConversationDaprStateMemory', 'statestore': 'teststatestore', 'session_id': 'TestDurableAgent-session'}, 'llm': {'client': 'Mock', 'provider': 'MockOpenAIProvider', 'api': 'MockOpenAIAPI', 'model': 'gpt-4o-mock', 'prompt_template': 'ChatPromptTemplate'}, 'max_iterations': 10, 'agent': {'type': 'DurableAgent', 'appid': <MagicMock name='mock.application_id' id='140213714977936'>, 'statestore': 'teststatestore'}, 'registered_at': '2025-12-18T14:58:50.192375+00:00', 'registry': {'statestore': 'testregistry'}}}
2025-12-18 14:58:51 [ WARNING] dapr_agents.agents.components: Conflict during registry mutation (attempt 2/10) for 'agents:default': Object of type MagicMock is not JSON serializable

@CasperGN
Copy link
Contributor Author

50 [ INFO] dapr_agents.memory.daprstatestore: ConversationDaprStateMemory initialized with session ID: TestDurableAgent-session
2025-12-18 14:58:50 [ INFO] dapr_agents.tool.executor: Tool Executor initialized with 0 tool(s).
2025-12-18 14:58:50 [ WARNING] dapr_agents.agents.components: Conflict during registry mutation (attempt 1/10) for 'agents:default': Object of type MagicMock is not JSON serializable
2025-12-18 14:58:50 [ INFO] dapr_agents.agents.components: {'TestDurableAgent': {'name': 'TestDurableAgent', 'orchestrator': False, 'role': 'Test Durable Assistant', 'goal': 'Help with testing', 'instructions': ['Be helpful'], 'pubsub': {'agent_name': 'TestDurableAgent', 'name': 'testpubsub', 'agent_topic': 'TestDurableAgent'}, 'memory': {'type': 'ConversationDaprStateMemory', 'statestore': 'teststatestore', 'session_id': 'TestDurableAgent-session'}, 'llm': {'client': 'Mock', 'provider': 'MockOpenAIProvider', 'api': 'MockOpenAIAPI', 'model': 'gpt-4o-mock', 'prompt_template': 'ChatPromptTemplate'}, 'max_iterations': 10, 'agent': {'type': 'DurableAgent', 'appid': , 'statestore': 'teststatestore'}, 'registered_at': '2025-12-18T14:58:50.192375+00:00', 'registry': {'statestore': 'testregistry'}}}
2025-12-18 14:58:51 [ WARNING] dapr_agents.agents.components: Conflict during registry mutation (attempt 2/10) for 'agents:default': Object of type MagicMock is not JSON serializable

@sicoyle I found it. Added return of .application_id from the MockDaprClient's .get_metadata().

@sicoyle sicoyle merged commit 09f7a6f into dapr:main Dec 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants