Skip to content

Conversation

@Cyb3rWard0g
Copy link
Collaborator

No description provided.

Copy link
Contributor

@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.

overall really liking where this is going 🙌 - few comments so far high level for ya :) any chance you could add some tests?

- appID: LLMOrchestratorApp
appDirPath: ./services/workflow-llm/
command: ["python3", "app.py"]

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

appLogDestination: console
daprdLogDestination: console

apps:
Copy link
Contributor

Choose a reason for hiding this comment

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

add gandalf? shall we just combine this quickstart with the 05 one instead of adding a new quickstart?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I was just trying to keep it separate to not mess with the other ones for now 😅.

appLogDestination: console
daprdLogDestination: console

apps:
Copy link
Contributor

Choose a reason for hiding this comment

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

add gandalf?

Comment on lines +94 to +98
profile_config=frodo_profile,
pubsub_config=frodo_pubsub,
state_config=frodo_state,
registry_config=registry_config,
memory_config=frodo_memory,
Copy link
Contributor

@sicoyle sicoyle Oct 30, 2025

Choose a reason for hiding this comment

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

I'm not sure we need the _config suffixes here on the field names

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh you mean on the attributes of the class? I was thinking about the same thing too. What do you think? I think it would be cleaner ;) I am fine with renaming those without the suffix.

"Emphasize practicality over poetry.",
"Stay loyal and supportive, especially under pressure.",
],
modules=("supplies", "campcraft"),
Copy link
Contributor

Choose a reason for hiding this comment

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

oooooo - what are modules for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was testing this. I implemented it, but forgot to add more documentation :( . Modules are a plugin/extensibility system for dynamically adding prompt sections to agents. They work through a registry pattern that allows you to compose agent prompts from reusable, configurable components.

How Modules Work

The modules system has three key components:

  1. PROMPT_MODULE_REGISTRY - A global dictionary mapping module names to factory functions
  2. register_prompt_module() - Function to register new modules globally
  3. Module resolution logic - Processes modules when building agent prompts

When an agent is created with modules, the system:

  1. Checks if there's a module_override for that module name
  2. If not, looks up the factory function in the registry
  3. Calls the factory to generate a PromptSection
  4. Injects these sections into the agent's system prompt

Current State: Fully Implemented

  • PromptSection is defined in dapr_agents/agents/configs.py
  • AgentProfileConfig has both modules and module_overrides fields
  • The processing logic in prompting.py handles module resolution

Usage Example

Here's how to use modules in your agent configuration:

from dapr_agents.agents.configs import (
    AgentProfileConfig,
    PromptSection,  # Add this import
)

sam_profile = AgentProfileConfig(
    name="Samwise Gamgee",
    role="Logistics, Provisions & Morale",
    goal="Keep the party supplied, rested, and on schedule...",
    instructions=[
        "Track food, water, camp gear, and rest cadence; flag shortages early.",
        # ... more instructions
    ],
    style_guidelines=[
        "Warm, plain-spoken, and grounded.",
        # ... more guidelines
    ],
    # Declare which modules you want
    modules=("supplies", "campcraft"),
    # Provide inline implementations (no global registration needed)
    module_overrides={
        "supplies": PromptSection(
            title="Supply Management",
            lines=[
                "Track current inventory of food, water, and camp gear.",
                "Monitor daily consumption rates and estimate days remaining.",
                "Flag low supplies before they become critical (2-day threshold).",
                "Suggest resupply opportunities at settlements or natural resources.",
            ]
        ),
        "campcraft": PromptSection(
            title="Campsite Selection Protocol",
            lines=[
                "Evaluate proximity to water (within 100m), natural concealment, and defensibility.",
                "Consider current weather conditions and terrain protection.",
                "Identify at least two emergency escape routes from the camp location.",
                "Balance safety requirements with rest quality and party morale needs.",
            ]
        ),
    }
)

Without modules, Sam's system prompt contains:

  • Name: "Samwise Gamgee"
  • Role: "Logistics, Provisions & Morale"
  • Goal: (goal text)
  • Primary Instructions: (instruction list)
  • Communication Style: (style guidelines)

With the modules above, Sam's system prompt gets additional sections:

Supply Management:
- Track current inventory of food, water, and camp gear.
- Monitor daily consumption rates and estimate days remaining.
- Flag low supplies before they become critical (2-day threshold).
- Suggest resupply opportunities at settlements or natural resources.

Campsite Selection Protocol:
- Evaluate proximity to water (within 100m), natural concealment, and defensibility.
- Consider current weather conditions and terrain protection.
- Identify at least two emergency escape routes from the camp location.
- Balance safety requirements with rest quality and party morale needs.

sicoyle and others added 3 commits October 31, 2025 16:26
@sicoyle sicoyle changed the base branch from cyb3rward0g/new-message-router to main October 31, 2025 21:34
Cyb3rWard0g and others added 10 commits October 31, 2025 17:29
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
…s abstractions

Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
…tors

Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
…rs to Host Workflow Execution

Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
… quickstarts to test Agents

Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
…g, AgentExecutionConfig, AgentPubSubConfig)

Signed-off-by: Roberto Rodriguez <[email protected]>
…a prompting_helper and execution_config

Signed-off-by: Roberto Rodriguez <[email protected]>
…ures for new config API

Signed-off-by: Roberto Rodriguez <[email protected]>
…ecute_tool_calls, tool_executor

Signed-off-by: Roberto Rodriguez <[email protected]>
…nd use AgentWorkflowEntry

Signed-off-by: Roberto Rodriguez <[email protected]>
… construct_messages signatures

Signed-off-by: Roberto Rodriguez <[email protected]>
…use AgentWorkflowEntry

Signed-off-by: Roberto Rodriguez <[email protected]>
@Cyb3rWard0g Cyb3rWard0g merged commit e3a151d into main Nov 1, 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.

3 participants