Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/agentfabric/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

1.0.0b1
++++++
* Initial preview release for Azure Agent Fabric using API version ``2026-07-21-preview``.
* Add Agent Fabric, member, and Policy Group create, show, list, update, delete, and wait commands.
81 changes: 81 additions & 0 deletions src/agentfabric/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Azure CLI Agent Fabric Extension

This extension manages Azure Agent Fabric resources, their child members, and
independent Policy Group peer resources. It uses the `Microsoft.NetworkSecurity`
resource provider API version `2026-07-21-preview`.

## Resource hierarchy

```text
Microsoft.NetworkSecurity
├── agentFabrics/{fabricName} (independent top-level resource)
│ └── members/{memberName} (child of an Agent Fabric)
└── policyGroups/{policyGroupName} (independent top-level peer resource)
```

## Install

```bash
az extension add --name agentfabric
```

## Agent Fabrics

Root CRUD commands manage Agent Fabric resources.

```bash
az agentfabric create \
--resource-group myResourceGroup \
--name myFabric \
--location eastus \
--trust-domain contoso.agentfabric

az agentfabric update \
--resource-group myResourceGroup \
--name myFabric \
--tags environment=production

az agentfabric list --resource-group myResourceGroup
```

## Members

Members are children of an Agent Fabric, so member commands require the parent
Fabric name through `--fabric-name`.

```bash
az agentfabric member create \
--resource-group myResourceGroup \
--fabric-name myFabric \
--member-name myMember \
--location eastus \
--workload "{aci:{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup}}"

az agentfabric member show \
--resource-group myResourceGroup \
--fabric-name myFabric \
--member-name myMember
```

## Policy Groups

Policy Groups are independent resource-group-scoped
`Microsoft.NetworkSecurity` peer resources. They are not children of an Agent
Fabric, and their commands do not accept `--fabric-name`.

```bash
az agentfabric policy-group create \
--resource-group myResourceGroup \
--name myPolicyGroup \
--location eastus \
--display-name "My policy group" \
--priority 100

az agentfabric policy-group show \
--ids /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.NetworkSecurity/policyGroups/myPolicyGroup
```

Policy Group ARM IDs end with `/policyGroups/{name}`.

Long-running create, update, and delete operations support `--no-wait`. Use the
corresponding `wait` command to wait for provisioning to reach a target state.
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_agentmesh._help import helps # pylint: disable=unused-import
from azext_agentfabric._help import helps # pylint: disable=unused-import


class AgentmeshCommandsLoader(AzCommandsLoader):
class AgentfabricCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
custom_command_type = CliCommandType(
operations_tmpl='azext_agentmesh.custom#{}')
operations_tmpl='azext_agentfabric.custom#{}')
super().__init__(cli_ctx=cli_ctx,
custom_command_type=custom_command_type)

def load_command_table(self, args):
from azext_agentmesh.commands import load_command_table
from azext_agentfabric.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
Expand All @@ -35,8 +35,8 @@ def load_command_table(self, args):
return self.command_table

def load_arguments(self, command):
from azext_agentmesh._params import load_arguments
from azext_agentfabric._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = AgentmeshCommandsLoader
COMMAND_LOADER_CLS = AgentfabricCommandsLoader
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@

# pylint: skip-file
# flake8: noqa

Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@


@register_command_group(
"agentmesh policy-group",
"agentfabric",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Agent Mesh policy groups.
"""Manage Agent Fabric and related Microsoft.NetworkSecurity resources. Root commands manage Agent Fabric resources.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


@register_command(
"agentmesh fabric create",
"agentfabric create",
)
class Create(AAZCommand):
"""Create an Agent Mesh fabric
"""Create an Agent Fabric resource.

:example: AgentFabrics_CreateOrUpdate
az agentmesh fabric create --resource-group rgnetworksecurity --name testAIFabric --default-policy-groups "[/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgnetworksecurity/providers/Microsoft.NetworkSecurity/policyGroups/testPolicyGroup]" --trust-domain contoso.agentfabric --tags "{}" --location eastus
az agentfabric create --resource-group rgnetworksecurity --name testAIFabric --default-policy-groups "[/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgnetworksecurity/providers/Microsoft.NetworkSecurity/policyGroups/testPolicyGroup]" --trust-domain contoso.agentfabric --tags "{}" --location eastus
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@


@register_command(
"agentmesh fabric delete",
"agentfabric delete",
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete an Agent Mesh fabric
"""Delete an Agent Fabric resource.

:example: AgentFabrics_Delete
az agentmesh fabric delete --resource-group rgnetworksecurity --name testAIFabric
az agentfabric delete --resource-group rgnetworksecurity --name testAIFabric
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@


@register_command(
"agentmesh fabric list",
"agentfabric list",
)
class List(AAZCommand):
"""List Agent Mesh fabrics
"""List Agent Fabric resources.

:example: AgentFabrics_ListBySubscription
az agentmesh fabric list
az agentfabric list

:example: AgentFabrics_ListByResourceGroup
az agentmesh fabric list --resource-group rgnetworksecurity
az agentfabric list --resource-group rgnetworksecurity
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


@register_command(
"agentmesh fabric show",
"agentfabric show",
)
class Show(AAZCommand):
"""Get an Agent Mesh fabric
"""Show an Agent Fabric resource.

:example: AgentFabrics_Get
az agentmesh fabric show --resource-group rgnetworksecurity --name testAIFabric
az agentfabric show --resource-group rgnetworksecurity --name testAIFabric
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


@register_command(
"agentmesh fabric update",
"agentfabric update",
)
class Update(AAZCommand):
"""Update an Agent Mesh fabric's tags
"""Update an Agent Fabric resource.

:example: AgentFabrics_Update
az agentmesh fabric update --resource-group rgnetworksecurity --name testAIFabric --tags "{env:production}"
az agentfabric update --resource-group rgnetworksecurity --name testAIFabric --tags "{env:production}"
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@register_command(
"agentmesh fabric wait",
"agentfabric wait",
)
class Wait(AAZWaitCommand):
"""Place the CLI in a waiting state until a condition is met.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@


@register_command_group(
"agentmesh",
"agentfabric member",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure Agent Mesh resources.
"""Manage members that are children of an Agent Fabric. The parent Fabric name is required.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@


@register_command(
"agentmesh fabric member create",
"agentfabric member create",
)
class Create(AAZCommand):
"""Create a member in an Agent Mesh fabric
"""Create a member resource as a child of an Agent Fabric. The parent Fabric name is required.

:example: Members_CreateOrUpdate
az agentmesh fabric member create --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember --location eastus --workload "{aci:{resource-id:/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgnetworksecurity/providers/Microsoft.ContainerInstance/containerGroups/testContainerGroup}}"
az agentfabric member create --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember --location eastus --workload "{aci:{resource-id:/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgnetworksecurity/providers/Microsoft.ContainerInstance/containerGroups/testContainerGroup}}"

:example: Members_CreateOrUpdate_AgentFabricSandbox
az agentmesh fabric member create --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name sandboxMember --location eastus --workload "{agent-fabric-sandbox:{image:{uri:'contoso.azurecr.io/agents/sandbox:1.0.0',digest:'sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',pull-policy:IfNotPresent},resources:{cpu:2,memory:4Gi,disk:20Gi},agent-identity:{tenant-id:72f988bf-86f1-41af-91ab-2d7cd011db47,agent-id:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee},endpoints:[{name:http,port:8080}],domain:sandbox-member.testaifabric.contoso.com}}"
az agentfabric member create --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name sandboxMember --location eastus --workload "{agent-fabric-sandbox:{image:{uri:'contoso.azurecr.io/agents/sandbox:1.0.0',digest:'sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',pull-policy:IfNotPresent},resources:{cpu:2,memory:4Gi,disk:20Gi},agent-identity:{tenant-id:72f988bf-86f1-41af-91ab-2d7cd011db47,agent-id:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee},endpoints:[{name:http,port:8080}],domain:sandbox-member.testaifabric.contoso.com}}"
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@


@register_command(
"agentmesh fabric member delete",
"agentfabric member delete",
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete a member from an Agent Mesh fabric
"""Delete a member resource that is a child of an Agent Fabric. The parent Fabric name is required.

:example: Members_Delete
az agentmesh fabric member delete --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember
az agentfabric member delete --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


@register_command(
"agentmesh fabric member list",
"agentfabric member list",
)
class List(AAZCommand):
"""List members in an Agent Mesh fabric
"""List member resources that are children of an Agent Fabric. The parent Fabric name is required.

:example: Members_ListByParent
az agentmesh fabric member list --resource-group rgnetworksecurity --fabric-name testAIFabric
az agentfabric member list --resource-group rgnetworksecurity --fabric-name testAIFabric
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


@register_command(
"agentmesh fabric member show",
"agentfabric member show",
)
class Show(AAZCommand):
"""Get a member in an Agent Mesh fabric
"""Show a member resource that is a child of an Agent Fabric. The parent Fabric name is required.

:example: Members_Get
az agentmesh fabric member show --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember
az agentfabric member show --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


@register_command(
"agentmesh fabric member update",
"agentfabric member update",
)
class Update(AAZCommand):
"""Update an Agent Mesh fabric member's tags
"""Update a member resource that is a child of an Agent Fabric. The parent Fabric name is required.

:example: Members_Update
az agentmesh fabric member update --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember --tags "{environment:production}"
az agentfabric member update --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember --tags "{environment:production}"
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@register_command(
"agentmesh fabric member wait",
"agentfabric member wait",
)
class Wait(AAZWaitCommand):
"""Place the CLI in a waiting state until a condition is met.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@


@register_command_group(
"agentmesh fabric",
"agentfabric policy-group",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Agent Mesh fabrics.
"""Manage independent resource-group-scoped Microsoft.NetworkSecurity Policy Group peer resources. Policy Groups are not children of an Agent Fabric.
"""
pass

Expand Down
Loading
Loading