1. Registry
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. Agent
Viewing docs for Auth0 v3.57.0
published on Friday, Nov 13, 2026 by Pulumi
auth0 logo auth0 logo
Viewing docs for Auth0 v3.57.0
published on Friday, Nov 13, 2026 by Pulumi

    With this resource, you can manage an agent identity (EA only). Link an agent to an application with the agentId attribute of the auth0.Client resource. Deleting an agent does not delete the clients linked to it and does not clear their agentId, so reference the agent as auth0_agent.<name>.id to make Terraform unlink the client before the agent is deleted. The Management API credentials need the *:agents scopes. Tenants without the feature enabled respond with 403 notEnabled.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    // Available in Early Access (EA). Requires the tenant to be enabled for agents.
    const myAgent = new auth0.Agent("my_agent", {
        name: "My Agent",
        externalAgentId: "my-agent-001",
        metadata: JSON.stringify({
            team: "platform",
        }),
    });
    // Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
    // so the client is unlinked before the agent is deleted.
    const myAgentClient = new auth0.Client("my_agent_client", {
        name: "My Agent Client",
        appType: "non_interactive",
        agentId: myAgent.id,
    });
    
    import pulumi
    import json
    import pulumi_auth0 as auth0
    
    # Available in Early Access (EA). Requires the tenant to be enabled for agents.
    my_agent = auth0.Agent("my_agent",
        name="My Agent",
        external_agent_id="my-agent-001",
        metadata=json.dumps({
            "team": "platform",
        }))
    # Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
    # so the client is unlinked before the agent is deleted.
    my_agent_client = auth0.Client("my_agent_client",
        name="My Agent Client",
        app_type="non_interactive",
        agent_id=my_agent.id)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]string{
    			"team": "platform",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		// Available in Early Access (EA). Requires the tenant to be enabled for agents.
    		myAgent, err := auth0.NewAgent(ctx, "my_agent", &auth0.AgentArgs{
    			Name:            pulumi.String("My Agent"),
    			ExternalAgentId: pulumi.String("my-agent-001"),
    			Metadata:        pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		// Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
    		// so the client is unlinked before the agent is deleted.
    		_, err = auth0.NewClient(ctx, "my_agent_client", &auth0.ClientArgs{
    			Name:    pulumi.String("My Agent Client"),
    			AppType: pulumi.String("non_interactive"),
    			AgentId: myAgent.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        // Available in Early Access (EA). Requires the tenant to be enabled for agents.
        var myAgent = new Auth0.Agent("my_agent", new()
        {
            Name = "My Agent",
            ExternalAgentId = "my-agent-001",
            Metadata = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["team"] = "platform",
            }),
        });
    
        // Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
        // so the client is unlinked before the agent is deleted.
        var myAgentClient = new Auth0.Client("my_agent_client", new()
        {
            Name = "My Agent Client",
            AppType = "non_interactive",
            AgentId = myAgent.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.Agent;
    import com.pulumi.auth0.AgentArgs;
    import com.pulumi.auth0.Client;
    import com.pulumi.auth0.ClientArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Available in Early Access (EA). Requires the tenant to be enabled for agents.
            var myAgent = new Agent("myAgent", AgentArgs.builder()
                .name("My Agent")
                .externalAgentId("my-agent-001")
                .metadata(serializeJson(
                    jsonObject(
                        jsonProperty("team", "platform")
                    )))
                .build());
    
            // Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
            // so the client is unlinked before the agent is deleted.
            var myAgentClient = new Client("myAgentClient", ClientArgs.builder()
                .name("My Agent Client")
                .appType("non_interactive")
                .agentId(myAgent.id())
                .build());
    
        }
    }
    
    resources:
      # Available in Early Access (EA). Requires the tenant to be enabled for agents.
      myAgent:
        type: auth0:Agent
        name: my_agent
        properties:
          name: My Agent
          externalAgentId: my-agent-001
          metadata:
            fn::toJSON:
              team: platform
      # Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
      # so the client is unlinked before the agent is deleted.
      myAgentClient:
        type: auth0:Client
        name: my_agent_client
        properties:
          name: My Agent Client
          appType: non_interactive
          agentId: ${myAgent.id}
    
    terraform {
      required_providers {
        auth0 = {
          source = "pulumi/auth0"
        }
      }
    }
    
    # Available in Early Access (EA). Requires the tenant to be enabled for agents.
    resource "auth0_agent" "my_agent" {
      lifecycle {
        create_before_destroy = true
      }
      name              = "My Agent"
      external_agent_id = "my-agent-001"
      metadata = jsonencode({
        "team" = "platform"
      })
    }
    # Link the agent to an application. Reference the agent as `auth0_agent.<name>.id`
    # so the client is unlinked before the agent is deleted.
    resource "auth0_client" "my_agent_client" {
      lifecycle {
        create_before_destroy = true
      }
      name     = "My Agent Client"
      app_type = "non_interactive"
      agent_id = auth0_agent.my_agent.id
    }
    

    Create Agent Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Agent(name: string, args?: AgentArgs, opts?: CustomResourceOptions);
    @overload
    def Agent(resource_name: str,
              args: Optional[AgentArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Agent(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              external_agent_id: Optional[str] = None,
              metadata: Optional[str] = None,
              name: Optional[str] = None)
    func NewAgent(ctx *Context, name string, args *AgentArgs, opts ...ResourceOption) (*Agent, error)
    public Agent(string name, AgentArgs? args = null, CustomResourceOptions? opts = null)
    public Agent(String name, AgentArgs args)
    public Agent(String name, AgentArgs args, CustomResourceOptions options)
    
    type: auth0:Agent
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "auth0_agent" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AgentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AgentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AgentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var agentResource = new Auth0.Agent("agentResource", new()
    {
        ExternalAgentId = "string",
        Metadata = "string",
        Name = "string",
    });
    
    example, err := auth0.NewAgent(ctx, "agentResource", &auth0.AgentArgs{
    	ExternalAgentId: pulumi.String("string"),
    	Metadata:        pulumi.String("string"),
    	Name:            pulumi.String("string"),
    })
    
    resource "auth0_agent" "agentResource" {
      lifecycle {
        create_before_destroy = true
      }
      external_agent_id = "string"
      metadata          = "string"
      name              = "string"
    }
    
    var agentResource = new Agent("agentResource", AgentArgs.builder()
        .externalAgentId("string")
        .metadata("string")
        .name("string")
        .build());
    
    agent_resource = auth0.Agent("agentResource",
        external_agent_id="string",
        metadata="string",
        name="string")
    
    const agentResource = new auth0.Agent("agentResource", {
        externalAgentId: "string",
        metadata: "string",
        name: "string",
    });
    
    type: auth0:Agent
    properties:
        externalAgentId: string
        metadata: string
        name: string
    

    Agent Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Agent resource accepts the following input properties:

    ExternalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    Metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    Name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    ExternalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    Metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    Name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    external_agent_id string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    externalAgentId String
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata String
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name String
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    externalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    external_agent_id str
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata str
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name str
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    externalAgentId String
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata String
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name String
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Agent resource produces the following output properties:

    CreatedAt string
    The time the agent was created, in RFC 3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    The time the agent was last updated, in RFC 3339 format.
    CreatedAt string
    The time the agent was created, in RFC 3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    The time the agent was last updated, in RFC 3339 format.
    created_at string
    The time the agent was created, in RFC 3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    updated_at string
    The time the agent was last updated, in RFC 3339 format.
    createdAt String
    The time the agent was created, in RFC 3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    The time the agent was last updated, in RFC 3339 format.
    createdAt string
    The time the agent was created, in RFC 3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    The time the agent was last updated, in RFC 3339 format.
    created_at str
    The time the agent was created, in RFC 3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    The time the agent was last updated, in RFC 3339 format.
    createdAt String
    The time the agent was created, in RFC 3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    The time the agent was last updated, in RFC 3339 format.

    Look up Existing Agent Resource

    Get an existing Agent resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AgentState, opts?: CustomResourceOptions): Agent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            external_agent_id: Optional[str] = None,
            metadata: Optional[str] = None,
            name: Optional[str] = None,
            updated_at: Optional[str] = None) -> Agent
    func GetAgent(ctx *Context, name string, id IDInput, state *AgentState, opts ...ResourceOption) (*Agent, error)
    public static Agent Get(string name, Input<string> id, AgentState? state, CustomResourceOptions? opts = null)
    public static Agent get(String name, Output<String> id, AgentState state, CustomResourceOptions options)
    resources:  existingAgent:    type: auth0:Agent    get:      id: ${id}
    import {
      to = auth0_agent.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state AgentState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state AgentState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state AgentState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state AgentState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    The time the agent was created, in RFC 3339 format.
    ExternalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    Metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    Name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    UpdatedAt string
    The time the agent was last updated, in RFC 3339 format.
    CreatedAt string
    The time the agent was created, in RFC 3339 format.
    ExternalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    Metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    Name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    UpdatedAt string
    The time the agent was last updated, in RFC 3339 format.
    created_at string
    The time the agent was created, in RFC 3339 format.
    external_agent_id string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updated_at string
    The time the agent was last updated, in RFC 3339 format.
    createdAt String
    The time the agent was created, in RFC 3339 format.
    externalAgentId String
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata String
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name String
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updatedAt String
    The time the agent was last updated, in RFC 3339 format.
    createdAt string
    The time the agent was created, in RFC 3339 format.
    externalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updatedAt string
    The time the agent was last updated, in RFC 3339 format.
    created_at str
    The time the agent was created, in RFC 3339 format.
    external_agent_id str
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata str
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name str
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updated_at str
    The time the agent was last updated, in RFC 3339 format.
    createdAt String
    The time the agent was created, in RFC 3339 format.
    externalAgentId String
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    metadata String
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name String
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updatedAt String
    The time the agent was last updated, in RFC 3339 format.

    Import

    This resource can be imported using the agent ID.

    Example:

    $ pulumi import auth0:index/agent:Agent my_agent "agt_XXXXXXXXXXXXXXXXXXXXXX"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo auth0 logo
    Viewing docs for Auth0 v3.57.0
    published on Friday, Nov 13, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial