Tech
Hooks: Steer Your Agent Before the LLM Call
Small feature, outsized leverage: Dapr Agents lets you register hooks around the agent loop where the before_llm_call being the one I use the most.
from dapr_agents import DurableAgent
def add_live_context ( ctx ):
ctx . messages . append ( web_search ( ctx . task )) # fresh context, every call
agent = DurableAgent (
name = " researcher " ,
hooks = { " before_llm_call " : add_live_context },
)
Everything ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to