Open
Description
Context
The current setup for creating an agent includes both core agent logic and infrastructure configuration in one place:
travel_planner = AssistantAgent(
name="TravelBuddy",
role="Travel Planner",
goal="Help users find flights and remember preferences",
instructions=[
"Find flights to destinations",
"Remember user preferences",
"Provide clear flight info"
],
tools=[search_flights],
message_bus_name="messagepubsub",
state_store_name="workflowstatestore",
state_key="workflow_state",
agents_registry_store_name="workflowstatestore",
agents_registry_key="agents_registry",
service_port=8001,
daprGrpcPort=50001
)
travel_planner.as_service(port=8001)
Expected behaviour
This mixes business logic (agent’s purpose, tools, instructions) with low-level plumbing details (state store keys, ports, Dapr config).
Moving these to a config file with sensible defaults would improve separation of concerns, readability, and reusability.
I should be able to specify most of the following as env variables or have good defaults based on naming convention
message_bus_name="messagepubsub",
state_store_name="workflowstatestore",
state_key="workflow_state",
agents_registry_store_name="workflowstatestore",
agents_registry_key="agents_registry",
service_port=8001,
daprGrpcPort=50001