Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ jobs:
# Team membership will be verified for issue_comment events only
if: |
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/ok-to-test')) ||
github.event_name == 'pull_request' ||
github.event_name == 'workflow_dispatch'
steps:
- name: Simple check to verify user is authorized
Expand Down Expand Up @@ -106,8 +104,8 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |

uv run pytest -m integration -v tests/integration/quickstarts/test_01_*.py tests/integration/quickstarts/test_02_*.py
# Run all integration tests in parallel (one file per quickstart directory)
uv run pytest -m integration -v tests/integration/quickstarts
# TODO: In future, run all integration tests in parallel (one file per quickstart directory)
# -n auto uses all available CPUs, or specify -n 4 for fixed number
# pytest -m integration -v -n auto tests/integration/quickstarts/

Expand Down
8 changes: 7 additions & 1 deletion dapr_agents/agents/orchestrators/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,13 @@ async def _broadcast() -> None:
logger.exception("Failed to publish broadcast message.")

def _select_random_speaker_activity(self, ctx: wf.WorkflowActivityContext) -> str:
"""Pick a random agent from the registry, avoiding the most recent speaker when possible."""
"""
Pick a random agent from the registry, avoiding the most recent speaker when possible.

TODO: This method selects from all registered agents in the team, including
orchestrators. In the future, we may want to add health checks or availability
checks to ensure selected agents are actually running and ready to receive triggers.
"""
try:
agents_metadata = self.list_team_agents(
include_self=False, team=self.effective_team()
Expand Down
4 changes: 4 additions & 0 deletions dapr_agents/agents/orchestrators/roundrobin.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ def _select_next_speaker_activity(
) -> str:
"""
Deterministic round-robin selection based on turn number.

TODO: This method selects from all registered agents in the team, including
orchestrators. In the future, we may want to add health checks or availability
checks to ensure selected agents are actually running and ready to receive triggers.
"""
turn = int(payload.get("turn", 1))
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: agentregistrystore_llm
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: keyPrefix
value: none
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: agentregistrystore_random
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: keyPrefix
value: none
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: agentregistrystore_roundrobin
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: keyPrefix
value: none
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import logging
import os

from dotenv import load_dotenv

Expand Down Expand Up @@ -35,7 +36,9 @@ async def main() -> None:
"""
# Shared infra (registry)
registry = AgentRegistryConfig(
store=StateStoreService(store_name="agentregistrystore"),
store=StateStoreService(
store_name=os.getenv("REGISTRY_STATE_STORE", "agentregistrystore")
),
team_name="fellowship",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import logging
import os

from dotenv import load_dotenv

Expand Down Expand Up @@ -35,7 +36,9 @@ async def main() -> None:
"""
# Shared infra (registry)
registry = AgentRegistryConfig(
store=StateStoreService(store_name="agentregistrystore"),
store=StateStoreService(
store_name=os.getenv("REGISTRY_STATE_STORE", "agentregistrystore")
),
team_name="fellowship",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import logging
import os

from dotenv import load_dotenv

Expand Down Expand Up @@ -35,7 +36,9 @@ async def main() -> None:
"""
# Shared infra (registry)
registry = AgentRegistryConfig(
store=StateStoreService(store_name="agentregistrystore"),
store=StateStoreService(
store_name=os.getenv("REGISTRY_STATE_STORE", "agentregistrystore")
),
team_name="fellowship",
)

Expand Down
5 changes: 4 additions & 1 deletion quickstarts/05-multi-agent-workflows/services/sam/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import logging
import os

from dotenv import load_dotenv

Expand Down Expand Up @@ -40,7 +41,9 @@ async def main() -> None:
"""
# Shared infra (registry)
registry = AgentRegistryConfig(
store=StateStoreService(store_name="agentregistrystore"),
store=StateStoreService(
store_name=os.getenv("REGISTRY_STATE_STORE", "agentregistrystore")
),
team_name="fellowship",
)

Expand Down
Loading