Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
049db6d
chore: remove no longer existing export
CasperGN Jan 27, 2026
8e83237
chore: remove llm_activity & agent_activity decorators and rename rou…
CasperGN Jan 27, 2026
bfd6c74
fix: update quickstarts & remove tests after llm_activity deletion
CasperGN Jan 27, 2026
f3f7937
docs: update readmes with removal of llm_activity
CasperGN Jan 27, 2026
9803958
fix: remove agent_activity and use call_child_workflow pattern instead
CasperGN Jan 27, 2026
c4dda19
feat: break out 09 into separate agents to remove agent_activity
CasperGN Jan 27, 2026
32a2861
chore(format): ruff
CasperGN Jan 27, 2026
8657d1f
chore(format): ruff
CasperGN Jan 27, 2026
bfb50cc
chore(format): ruff
CasperGN Jan 27, 2026
0e26b9d
feat: add multiple agent files and simplify 09 to just a single example
CasperGN Jan 27, 2026
fd37005
docs: update readmes with removal of agent_activity
CasperGN Jan 27, 2026
c299fe6
fix: rename with .py
CasperGN Jan 27, 2026
bcd0ab4
chore(format): ruff
CasperGN Jan 27, 2026
9085d53
fix: rename components to align with default expectation
CasperGN Jan 27, 2026
cf07c8e
chore: add keyboard interrupt
CasperGN Jan 27, 2026
2617d6b
fix: name ref to components
CasperGN Jan 27, 2026
8b2b3da
fix: use multiapp for 09
CasperGN Jan 27, 2026
9edbaef
fix(test): correct call to publish cmd
CasperGN Jan 27, 2026
ca7e7eb
fix: ensure we catch closure exception if agent is not instrumented
CasperGN Jan 27, 2026
0af01f8
test: remove test for phoenix otel - it's pointless
CasperGN Jan 27, 2026
f3c2b33
fix: call multi workflow
CasperGN Jan 27, 2026
18b2bf8
chore: remove quickstart as it's effectively a dupe of 01, 10 quickstart
CasperGN Jan 27, 2026
cd4dc7e
fix: call multi workflow
CasperGN Jan 27, 2026
802101a
chore: rename folder for easier e2e test
CasperGN Jan 27, 2026
7d0276b
chore: add try except block
CasperGN Jan 27, 2026
2dca48d
test: ensure temp files and api key substitution
CasperGN Jan 27, 2026
2bb716f
Merge branch 'main' into chore(code)--clean-up-deprecated-code
CasperGN Jan 29, 2026
ddf11d3
chore: rename runtime config yaml
CasperGN Jan 30, 2026
0e5707e
fix(test): update e2e test for 01 to use components
CasperGN Jan 30, 2026
0cc5e2f
fix(test): ensure appDirPath is updated for tmp yaml file
CasperGN Jan 30, 2026
798e2b0
Merge branch 'main' into chore(code)--clean-up-deprecated-code
sicoyle Jan 30, 2026
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
1 change: 0 additions & 1 deletion dapr_agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"OpenAIEmbeddingClient",
"AgentTool",
"tool",
"AgenticWorkflow",
"LLMOrchestrator",
"RandomOrchestrator",
"RoundRobinOrchestrator",
Expand Down
2 changes: 1 addition & 1 deletion dapr_agents/agents/orchestrators/llm/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
BroadcastMessage,
TriggerAction,
)
from dapr_agents.workflow.decorators.routers import message_router
from dapr_agents.workflow.decorators.decorators import message_router
from dapr_agents.workflow.decorators import workflow_entry
from dapr_agents.agents.orchestrators.llm.prompts import (
NEXT_STEP_PROMPT,
Expand Down
2 changes: 1 addition & 1 deletion dapr_agents/agents/orchestrators/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
BroadcastMessage,
TriggerAction,
)
from dapr_agents.workflow.decorators.routers import message_router
from dapr_agents.workflow.decorators.decorators import message_router
from dapr_agents.workflow.decorators import workflow_entry
from dapr_agents.workflow.utils.pubsub import broadcast_message, send_message_to_agent

Expand Down
2 changes: 1 addition & 1 deletion dapr_agents/agents/orchestrators/roundrobin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
BroadcastMessage,
TriggerAction,
)
from dapr_agents.workflow.decorators.routers import message_router
from dapr_agents.workflow.decorators.decorators import message_router
from dapr_agents.workflow.decorators import workflow_entry
from dapr_agents.workflow.utils.pubsub import broadcast_message, send_message_to_agent

Expand Down
4 changes: 0 additions & 4 deletions dapr_agents/workflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
from .decorators import (
message_router,
http_router,
llm_activity,
agent_activity,
workflow_entry,
)

__all__ = [
"message_router",
"http_router",
"llm_activity",
"agent_activity",
"workflow_entry",
]
5 changes: 1 addition & 4 deletions dapr_agents/workflow/decorators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from .routers import message_router, http_router
from .activities import llm_activity, agent_activity, workflow_entry
from .decorators import message_router, http_router, workflow_entry

__all__ = [
"message_router",
"http_router",
"llm_activity",
"agent_activity",
"workflow_entry",
]
216 changes: 0 additions & 216 deletions dapr_agents/workflow/decorators/activities.py

This file was deleted.

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

import logging
from copy import deepcopy
from typing import Any, Callable, List, Literal, Optional, Type, get_type_hints
from typing import Any, Callable, List, Literal, Optional, Type, TypeVar, get_type_hints

from dapr_agents.workflow.utils.core import is_supported_model
from dapr_agents.workflow.utils.routers import extract_message_models
Expand All @@ -11,6 +11,29 @@

HttpMethod = Literal["GET", "POST", "PUT", "PATCH", "DELETE"]

R = TypeVar("R")


def workflow_entry(func: Callable[..., R]) -> Callable[..., R]:
"""
Mark a method/function as the workflow entrypoint for an Agent.

This decorator does not wrap the function; it simply annotates the callable
with `_is_workflow_entry = True` so AgentRunner can discover it on the agent
instance via reflection.

Usage:
class MyAgent:
@workflow_entry
def my_workflow(self, ctx: DaprWorkflowContext, wf_input: dict) -> str:
...

Returns:
The same callable (unmodified), with an identifying attribute.
"""
setattr(func, "_is_workflow_entry", True) # type: ignore[attr-defined]
return func


def message_router(
func: Optional[Callable[..., Any]] = None,
Expand Down
12 changes: 10 additions & 2 deletions dapr_agents/workflow/runners/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,11 @@ def shutdown(
# First verify we're managing it
with self._lock:
if agent in self._managed_agents:
agent.instrumentor.uninstrument()
try:
agent.instrumentor.uninstrument()
except AttributeError:
# this happens if the agent has no instrumentor
pass
agent.stop() # This is safe as they'll return None if not started
self._managed_agents.remove(agent)
if len(self._managed_agents) == 0:
Expand All @@ -624,7 +628,11 @@ def shutdown(
with self._lock:
agents = list(self._managed_agents)
for ag in agents:
agent.instrumentor.uninstrument()
try:
agent.instrumentor.uninstrument()
except AttributeError:
# this happens if the agent has no instrumentor
pass
ag.stop()
self._close_wf_client()
self._close_dapr_client()
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def main() -> None:
# Configure the agent to use Dapr State Store for conversation history.
memory=AgentMemoryConfig(
store=ConversationDaprStateMemory(
store_name="conversation-statestore",
store_name="agent-memory",
session_id=Path(__file__).stem,
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def main() -> None:
# Configure the agent to use Dapr State Store for conversation history.
memory=AgentMemoryConfig(
store=ConversationDaprStateMemory(
store_name="conversation-statestore",
store_name="agent-memory",
session_id=Path(__file__).stem,
)
),
# This is where the execution state is stored
state=AgentStateConfig(
store=StateStoreService(store_name="workflow-statestore"),
store=StateStoreService(store_name="agent-workflow"),
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ async def main() -> None:
# Configure the agent to use Dapr State Store for conversation history.
memory=AgentMemoryConfig(
store=ConversationDaprStateMemory(
store_name="conversation-statestore",
store_name="agent-memory",
session_id=Path(__file__).stem,
)
),
# This is where the execution state is stored
state=AgentStateConfig(
store=StateStoreService(store_name="workflow-statestore"),
store=StateStoreService(store_name="agent-workflow"),
),
# This is where the agent listens for incoming tasks.
pubsub=AgentPubSubConfig(
pubsub_name="message-pubsub",
pubsub_name="agent-pubsub",
agent_topic="weather.requests",
broadcast_topic="agents.broadcast",
),
Expand Down
Loading