diff --git a/src/InterviewCoach.AppHost/AppHost.cs b/src/InterviewCoach.AppHost/AppHost.cs index fe66f60..b5da0cb 100644 --- a/src/InterviewCoach.AppHost/AppHost.cs +++ b/src/InterviewCoach.AppHost/AppHost.cs @@ -2,10 +2,34 @@ var config = builder.Configuration; +var mcpMarkItDown = builder.AddContainer(ResourceConstants.McpMarkItDown, "mcp/markitdown", "latest") + .WithHttpEndpoint(targetPort: 3001) + .WithArgs("--http", "--host", "0.0.0.0", "--port", "3001"); + +// Azure Cosmos DB (NoSQL). Uses the local emulator in run mode and provisions a managed +// account when published. Aspire creates the database and container as resources, so no +// runtime resource creation is required (see the EnsureCreatedAsync note in the MCP server). +var cosmos = builder.AddAzureCosmosDB(ResourceConstants.Cosmos); +if (builder.ExecutionContext.IsRunMode) +{ + cosmos.RunAsPreviewEmulator(emulator => emulator.WithDataExplorer()); +} + +var cosmosDb = cosmos.AddCosmosDatabase(ResourceConstants.CosmosDatabase); +cosmosDb.AddContainer(ResourceConstants.CosmosContainer, "/id"); + +var mcpInterviewData = builder.AddProject(ResourceConstants.McpInterviewData) + .WithReference(cosmosDb) + .WaitFor(cosmosDb); + var agent = builder.AddProject(ResourceConstants.Agent) .WithExternalHttpEndpoints() + .WithLlmReference(config, args) .WithEnvironment("AZURE_TENANT_ID", config["AZURE_TENANT_ID"] ?? string.Empty) -; + .WithReference(mcpMarkItDown.GetEndpoint("http")) + .WithReference(mcpInterviewData) + .WaitFor(mcpMarkItDown) + .WaitFor(mcpInterviewData); var webUI = builder.AddProject(ResourceConstants.WebUI) .WithExternalHttpEndpoints() diff --git a/src/InterviewCoach.AppHost/appsettings.json b/src/InterviewCoach.AppHost/appsettings.json index 70567b4..7588450 100644 --- a/src/InterviewCoach.AppHost/appsettings.json +++ b/src/InterviewCoach.AppHost/appsettings.json @@ -7,7 +7,7 @@ "Microsoft.EntityFrameworkCore": "Warning" } }, - "AgentMode": "Single", + "AgentMode": "HandOff", "LlmProvider": "MicrosoftFoundry", "MicrosoftFoundry": { "DeploymentName": "gpt-5-mini",