This commit is contained in:
Shyju Krishnankutty
2026-01-13 19:38:26 -08:00
parent aea354b09c
commit 4340f37e97
17 changed files with 587 additions and 134 deletions
@@ -41,16 +41,16 @@ builder.AddEdge(agent2, reverse).WithOutputFrom(agent2);
var workflow = builder.WithName("MyTestWorkflow").Build();
// Configure the function app to host the AI agent.
// This will automatically generate HTTP API endpoints for the agent.
// Configure the function app to host AI agents and workflows in a unified way.
// This will automatically generate HTTP API endpoints for agents and workflows.
using IHost app = FunctionsApplication
.CreateBuilder(args)
.ConfigureFunctionsWebApplication()
.ConfigureDurableAgents(options => options.AddAIAgent(agent, timeToLive: TimeSpan.FromHours(1)))
.AddDurableWorkflows(options =>
//.ConfigureDurableAgents(op => op.AddAIAgent(agent, timeToLive: TimeSpan.FromHours(1)))
.ConfigureDurableOptions(options =>
{
// Configure durable workflow options here if needed.
options.AddWorkflow(workflow);
// Configure workflows - agents referenced in workflows are automatically registered!
options.Workflows.AddWorkflow(workflow);
})
.Build();
app.Run();