Skip to content
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Agent 365 CLI
# Microsoft Agent 365 CLI

A command-line tool for deploying and managing Agent 365 applications on Azure.
A command-line tool for deploying and managing Microsoft Agent 365 applications on Azure.

## Supported Platforms
- ✅ .NET Applications
- ✅ Node.js Applications
- ✅ **Python Applications** (Auto-detects via `pyproject.toml`, handles Agent 365 dependencies, converts .env to Azure App Settings)
- ✅ **Python Applications** (Auto-detects via `pyproject.toml`, handles Microsoft Agent 365 dependencies, converts .env to Azure App Settings)

## Quick Start

Expand Down Expand Up @@ -103,7 +103,7 @@ a365 create-instance enable-notifications
```bash
a365 deploy # Full build and deploy
a365 deploy app # Deploy application binaries to the configured Azure App Service
a365 deploy mcp # Update Agent365 Tool permissions
a365 deploy mcp # Update Microsoft Agent 365 Tool permissions
a365 deploy --restart # Skip build, deploy existing publish folder (quick iteration)
a365 deploy --inspect # Pause before deployment to verify package contents
a365 deploy --restart --inspect # Combine flags for quick redeploy with inspection
Expand All @@ -113,7 +113,7 @@ a365 cleanup
**Deploy Options Explained:**
- **Default** (`a365 deploy`): Full build pipeline - platform detection, environment validation, build, manifest creation, packaging, and deployment
- **app**: Deploy application binaries to the configured Azure App Service
- **mcp**: Update Agent365 Tool permissions
- **mcp**: Update Microsoft Agent 365 Tool permissions
- **`--restart`**: Skip all build steps and start from compressing the existing `publish/` folder. Perfect for quick iteration when you've manually modified files in the publish directory (e.g., tweaking `requirements.txt`, `.deployment`, or other config files)
- **`--inspect`**: Pause before deployment to review the publish folder and ZIP contents. Useful for verifying package structure before uploading to Azure
- **`--verbose`**: Enable detailed logging for all build and deployment steps
Expand Down
5 changes: 3 additions & 2 deletions docs/commands/deploy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Agent365 CLI – Deploy Command Guide
# Microsoft Agent 365 CLI – Deploy Command Guide

> **Command**: `a365 deploy`
> **Purpose**: Deploy your application to Azure App Service **and** update Agent365 Tool (MCP) permissions in one run. Subcommands let you run either phase independently.
> **Purpose**: Deploy your application to Azure App Service **and** update Microsoft Agent 365 Tool (MCP) permissions in one run. Subcommands let you run either phase independently.
---

## TL;DR
Expand Down Expand Up @@ -190,3 +190,4 @@ Use Log Stream in the Azure Portal for runtime stdout/stderr.
- [`a365 config init`](./config-init.md) — initialize configuration

---

9 changes: 5 additions & 4 deletions src/DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Microsoft.Agents.A365.DevTools.Cli - Developer Guide

This guide is for contributors and maintainers of the Agent 365 CLI codebase. For end-user installation and usage, see [README.md](./README.md).
This guide is for contributors and maintainers of the Microsoft Agent 365 CLI codebase. For end-user installation and usage, see [README.md](./README.md).

---

## Project Overview

The Agent 365 CLI (`a365`) is a .NET tool that automates the deployment and management of Agent 365 applications on Azure. It handles:
The Microsoft Agent 365 CLI (`a365`) is a .NET tool that automates the deployment and management of Microsoft Agent 365 applications on Azure. It handles:

- **Multiplatform deployment** (.NET, Node.js, Python) with automatic platform detection
- Agent blueprint and identity creation
Expand Down Expand Up @@ -552,8 +552,8 @@ a365 deploy --restart --inspect

```bash
# Clone repository
git clone https://github.com/microsoft/Agent365.git
cd Agent365/utils/scripts/developer
git clone https://github.com/microsoft/Agent365-devTools.git
cd Agent365-devTools/utils/scripts/developer

# Restore dependencies
cd Microsoft.Agents.A365.DevTools.Cli
Expand Down Expand Up @@ -1267,3 +1267,4 @@ Command name detection is automatic - the CLI analyzes command-line arguments to

---


Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static Command CreateAppSubcommand(
DeploymentService deploymentService,
IAzureValidator azureValidator)
{
var command = new Command("app", "Deploy Agent365 application binaries to the configured Azure App Service");
var command = new Command("app", "Deploy Microsoft Agent 365 application binaries to the configured Azure App Service");

var configOption = new Option<FileInfo>(
new[] { "--config", "-c" },
Expand Down Expand Up @@ -205,7 +205,7 @@ private static Command CreateMcpSubcommand(
return;
}

logger.LogInformation("Starting deploy Agent 365 Tool Permissions...");
logger.LogInformation("Starting deploy Microsoft Agent 365 Tool Permissions...");
logger.LogInformation(""); // Empty line for readability

try
Expand All @@ -218,7 +218,7 @@ private static Command CreateMcpSubcommand(
}
catch (Exception ex)
{
logger.LogError(ex, "Agent 365 Tool Permissions deploy/update failed: {Message}", ex.Message);
logger.LogError(ex, "Microsoft Agent 365 Tool Permissions deploy/update failed: {Message}", ex.Message);
throw;
}
}, configOption, verboseOption, dryRunOption);
Expand Down Expand Up @@ -298,7 +298,7 @@ private static async Task<bool> DeployApplicationAsync(
}

/// <summary>
/// Convert Agent 365Config to DeploymentConfiguration
/// Convert Microsoft Agent 365 Config to DeploymentConfiguration
/// </summary>
private static DeploymentConfiguration ConvertToDeploymentConfig(Agent365Config config)
{
Expand Down Expand Up @@ -356,7 +356,7 @@ await EnsureAdminConsentForAgenticAppAsync(
logger
);

logger.LogInformation("Deploy Agent 365 Tool Permissions completed successfully!");
logger.LogInformation("Deploy Microsoft Agent 365 Tool Permissions completed successfully!");
}

private static async Task EnsureMcpOauth2PermissionGrantsAsync(
Expand Down Expand Up @@ -471,3 +471,4 @@ private static void HandleDeploymentException(Exception ex, ILogger logger)
}
}
}

9 changes: 5 additions & 4 deletions src/Microsoft.Agents.A365.DevTools.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static async Task<int> Main(string[] args)
}
catch (Exceptions.Agent365Exception ex)
{
// Structured Agent365 exception - display user-friendly error message
// Structured Microsoft Agent 365 exception - display user-friendly error message
// No stack trace for user errors (validation, config, auth issues)
HandleAgent365Exception(ex);
return ex.ExitCode;
Expand All @@ -112,7 +112,7 @@ static async Task<int> Main(string[] args)
Console.ForegroundColor = ConsoleColor.Red;
Console.Error.WriteLine();
Console.Error.WriteLine("Unexpected error occurred. This may be a bug in the CLI.");
Console.Error.WriteLine("Please report this issue at: https://github.com/microsoft/Agent365/issues");
Console.Error.WriteLine("Please report this issue at: https://github.com/microsoft/Agent365-devTools/issues");
Console.Error.WriteLine();
Console.ResetColor();
return 1;
Expand All @@ -139,7 +139,7 @@ private static void HandleAgent365Exception(Exceptions.Agent365Exception ex)
if (!ex.IsUserError)
{
Console.Error.WriteLine("If this error persists, please report it at:");
Console.Error.WriteLine("https://github.com/microsoft/Agent365/issues");
Console.Error.WriteLine("https://github.com/microsoft/Agent365-devTools/issues");
Console.Error.WriteLine();
}

Expand Down Expand Up @@ -170,7 +170,7 @@ private static void ConfigureServices(IServiceCollection services)
services.AddSingleton<CommandExecutor>();
services.AddSingleton<AuthenticationService>();

// Add Agent365 Tooling Service with environment detection
// Add Microsoft Agent 365 Tooling Service with environment detection
services.AddSingleton<IAgent365ToolingService>(provider =>
{
var configService = provider.GetRequiredService<IConfigService>();
Expand Down Expand Up @@ -252,3 +252,4 @@ private static string DetectCommandName(string[] args)
.Replace("_", "-");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Microsoft.Agents.A365.DevTools.Cli.Services;

/// <summary>
/// Service for interacting with Agent365 Tooling API endpoints for MCP server management in Dataverse
/// Service for interacting with Microsoft Agent 365 Tooling API endpoints for MCP server management in Dataverse
/// Handles authentication, HTTP communication, and response deserialization
/// </summary>
public class Agent365ToolingService : IAgent365ToolingService
Expand All @@ -34,7 +34,7 @@ public Agent365ToolingService(

/// <summary>
/// Common helper method to handle HTTP response validation and logging.
/// Handles double-serialized JSON responses from the Agent365 API.
/// Handles double-serialized JSON responses from the Microsoft Agent 365 API.
/// </summary>
/// <param name="response">The HTTP response message</param>
/// <param name="operationName">Name of the operation for logging purposes</param>
Expand All @@ -59,7 +59,7 @@ public Agent365ToolingService(
_logger.LogInformation("Received response from {Operation} endpoint", operationName);
_logger.LogDebug("Response content: {ResponseContent}", responseContent);

// Check if response content indicates failure (Agent365 API pattern)
// Check if response content indicates failure (Microsoft Agent 365 API pattern)
// The API may return double-serialized JSON, so we use JsonDeserializationHelper
if (!string.IsNullOrWhiteSpace(responseContent))
{
Expand Down Expand Up @@ -126,10 +126,10 @@ private void LogRequest(string method, string url, string? payload = null)
}

/// <summary>
/// Builds base URL for Agent365 Tools API based on environment
/// Builds base URL for Microsoft Agent 365 Tools API based on environment
/// </summary>
/// <param name="environment">Environment name (test, preprod, prod)</param>
/// <returns>Base URL for the Agent365 Tools API</returns>
/// <returns>Base URL for the Microsoft Agent 365 Tools API</returns>
private string BuildAgent365ToolsBaseUrl(string environment)
{
// Get from ConfigConstants to leverage existing URL construction logic
Expand Down Expand Up @@ -604,3 +604,4 @@ public async Task<bool> BlockServerAsync(
}
}
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.IO.Compression;
using Microsoft.Agents.A365.DevTools.Cli.Models;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -267,7 +267,7 @@ private async Task OfferPublishInspectionAsync(string publishPath, string zipPat
_logger.LogInformation("Key files to verify:");
_logger.LogInformation(" - .deployment (should contain: SCM_DO_BUILD_DURING_DEPLOYMENT=true)");
_logger.LogInformation(" - requirements.txt (should have: --find-links=dist)");
_logger.LogInformation(" - dist/*.whl (local Agent365 packages)");
_logger.LogInformation(" - dist/*.whl (local Microsoft Agent 365 packages)");
_logger.LogInformation("");

Console.Write("Proceed with deployment? [Y/n]: ");
Expand All @@ -285,3 +285,4 @@ private async Task OfferPublishInspectionAsync(string publishPath, string zipPat
await Task.CompletedTask;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Microsoft.Agents.A365.DevTools.Cli.Services;

/// <summary>
/// Service for interacting with Agent365 Tooling API endpoints for MCP server management in Dataverse
/// Service for interacting with Microsoft Agent 365 Tooling API endpoints for MCP server management in Dataverse
/// </summary>
public interface IAgent365ToolingService
{
Expand Down Expand Up @@ -72,3 +72,4 @@ Task<bool> BlockServerAsync(
string serverName,
CancellationToken cancellationToken = default);
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Microsoft.Agents.A365.DevTools.Cli.Services;

/// <summary>
/// Service for loading, saving, and validating Agent365 configuration.
/// Service for loading, saving, and validating Microsoft Agent 365 configuration.
///
/// DESIGN PATTERN: Handles merge (load) and split (save) of two-file config model
/// - LoadAsync: Merges a365.config.json + a365.generated.config.json to single Agent365Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ public async Task<OryxManifest> CreateManifestAsync(string projectDir, string pu

private string DetectStartCommand(string projectDir, string publishPath)
{
// First, check for Agent365-specific entry points with smart content analysis
// First, check for Microsoft Agent 365-specific entry points with smart content analysis
var agentEntryPoints = new[] { "start_with_generic_host.py", "host_agent_server.py" };
var detectedAgentEntry = DetectBestAgentEntry(publishPath, agentEntryPoints);
if (!string.IsNullOrEmpty(detectedAgentEntry))
{
_logger.LogInformation("Detected Agent365 entry point: {File}, using command: python {File}", detectedAgentEntry, detectedAgentEntry);
_logger.LogInformation("Detected Microsoft Agent 365 entry point: {File}, using command: python {File}", detectedAgentEntry, detectedAgentEntry);
return $"python {detectedAgentEntry}";
}

Expand Down Expand Up @@ -332,7 +332,7 @@ private string DetectBestAgentEntry(string publishPath, string[] agentFiles)
var hasMain = content.Contains("if __name__ == \"__main__\":") || content.Contains("def main(");
var priority = CalculateAgentEntryPriority(file, content);
foundFiles.Add((file, priority, hasMain));
_logger.LogDebug("Found Agent365 entry candidate: {File} (priority: {Priority}, hasMain: {HasMain})", file, priority, hasMain);
_logger.LogDebug("Found Microsoft Agent 365 entry candidate: {File} (priority: {Priority}, hasMain: {HasMain})", file, priority, hasMain);
}
}

Expand All @@ -346,7 +346,7 @@ private string DetectBestAgentEntry(string publishPath, string[] agentFiles)
.ThenBy(f => f.file)
.First();

_logger.LogInformation("Selected best Agent365 entry point: {File} (priority: {Priority}, hasMain: {HasMain})",
_logger.LogInformation("Selected best Microsoft Agent 365 entry point: {File} (priority: {Priority}, hasMain: {HasMain})",
best.file, best.priority, best.hasMain);

return best.file;
Expand Down
Loading