1. Registry
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. api
  6. api/agents
  7. Definition
Viewing docs for Pulumi Cloud v1.7.0
published on Tuesday, Nov 3, 2026 by Pulumi
pulumiservice logo pulumiservice logo
Viewing docs for Pulumi Cloud v1.7.0
published on Tuesday, Nov 3, 2026 by Pulumi

    Creates a Custom Agent definition for the organization from the supplied configuration (name, optional RBAC role, integrations, and instructions). Requires agent_definitions:create, granted to organization admins by default. Returns the created definition including its generated id. Returns 404 if a supplied role does not exist in the organization.

    Create Definition Resource

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

    Constructor syntax

    new Definition(name: string, args: DefinitionArgs, opts?: CustomResourceOptions);
    @overload
    def Definition(resource_name: str,
                   args: DefinitionArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Definition(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   org_name: Optional[str] = None,
                   approval_mode: Optional[str] = None,
                   avatar: Optional[str] = None,
                   custom_instructions: Optional[str] = None,
                   definition_id: Optional[str] = None,
                   display_name: Optional[str] = None,
                   enabled_integrations: Optional[Sequence[Any]] = None,
                   name: Optional[str] = None,
                   permission_mode: Optional[str] = None,
                   purpose: Optional[str] = None,
                   role_id: Optional[str] = None)
    func NewDefinition(ctx *Context, name string, args DefinitionArgs, opts ...ResourceOption) (*Definition, error)
    public Definition(string name, DefinitionArgs args, CustomResourceOptions? opts = null)
    public Definition(String name, DefinitionArgs args)
    public Definition(String name, DefinitionArgs args, CustomResourceOptions options)
    
    type: pulumiservice:api/agents:Definition
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "pulumiservice_api_agents_definition" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DefinitionArgs
    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 DefinitionArgs
    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 DefinitionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DefinitionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DefinitionArgs
    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 definitionResource = new PulumiService.Api.Agents.Definition("definitionResource", new()
    {
        OrgName = "string",
        ApprovalMode = "string",
        Avatar = "string",
        CustomInstructions = "string",
        DefinitionID = "string",
        DisplayName = "string",
        EnabledIntegrations = new[]
        {
            "any",
        },
        Name = "string",
        PermissionMode = "string",
        Purpose = "string",
        RoleId = "string",
    });
    
    example, err := agents.NewDefinition(ctx, "definitionResource", &agents.DefinitionArgs{
    	OrgName:            pulumi.String("string"),
    	ApprovalMode:       pulumi.String("string"),
    	Avatar:             pulumi.String("string"),
    	CustomInstructions: pulumi.String("string"),
    	DefinitionID:       pulumi.String("string"),
    	DisplayName:        pulumi.String("string"),
    	EnabledIntegrations: pulumi.Array{
    		pulumi.Any("any"),
    	},
    	Name:           pulumi.String("string"),
    	PermissionMode: pulumi.String("string"),
    	Purpose:        pulumi.String("string"),
    	RoleId:         pulumi.String("string"),
    })
    
    resource "pulumiservice_api_agents_definition" "definitionResource" {
      lifecycle {
        create_before_destroy = true
      }
      org_name             = "string"
      approval_mode        = "string"
      avatar               = "string"
      custom_instructions  = "string"
      definition_id        = "string"
      display_name         = "string"
      enabled_integrations = ["any"]
      name                 = "string"
      permission_mode      = "string"
      purpose              = "string"
      role_id              = "string"
    }
    
    var definitionResource = new Definition("definitionResource", DefinitionArgs.builder()
        .orgName("string")
        .approvalMode("string")
        .avatar("string")
        .customInstructions("string")
        .definitionID("string")
        .displayName("string")
        .enabledIntegrations("any")
        .name("string")
        .permissionMode("string")
        .purpose("string")
        .roleId("string")
        .build());
    
    definition_resource = pulumiservice.api.agents.Definition("definitionResource",
        org_name="string",
        approval_mode="string",
        avatar="string",
        custom_instructions="string",
        definition_id="string",
        display_name="string",
        enabled_integrations=["any"],
        name="string",
        permission_mode="string",
        purpose="string",
        role_id="string")
    
    const definitionResource = new pulumiservice.api.agents.Definition("definitionResource", {
        orgName: "string",
        approvalMode: "string",
        avatar: "string",
        customInstructions: "string",
        definitionID: "string",
        displayName: "string",
        enabledIntegrations: ["any"],
        name: "string",
        permissionMode: "string",
        purpose: "string",
        roleId: "string",
    });
    
    type: pulumiservice:api/agents:Definition
    properties:
        approvalMode: string
        avatar: string
        customInstructions: string
        definitionID: string
        displayName: string
        enabledIntegrations:
            - any
        name: string
        orgName: string
        permissionMode: string
        purpose: string
        roleId: string
    

    Definition 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 Definition resource accepts the following input properties:

    OrgName string
    The organization name
    ApprovalMode string
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    Avatar string
    A presentation token the console maps to an icon. Not an uploaded asset.
    CustomInstructions string
    Instructions that shape how the agent behaves in the team's environment.
    DefinitionID string
    The agent definition identifier
    DisplayName string
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    EnabledIntegrations List<object>
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    Name string
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    PermissionMode string
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    Purpose string
    A one-line description of what this agent is for, shown under its name in the roster.
    RoleId string
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.
    OrgName string
    The organization name
    ApprovalMode string
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    Avatar string
    A presentation token the console maps to an icon. Not an uploaded asset.
    CustomInstructions string
    Instructions that shape how the agent behaves in the team's environment.
    DefinitionID string
    The agent definition identifier
    DisplayName string
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    EnabledIntegrations []interface{}
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    Name string
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    PermissionMode string
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    Purpose string
    A one-line description of what this agent is for, shown under its name in the roster.
    RoleId string
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.
    org_name string
    The organization name
    approval_mode string
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    avatar string
    A presentation token the console maps to an icon. Not an uploaded asset.
    custom_instructions string
    Instructions that shape how the agent behaves in the team's environment.
    definition_id string
    The agent definition identifier
    display_name string
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    enabled_integrations list(any)
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    name string
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    permission_mode string
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    purpose string
    A one-line description of what this agent is for, shown under its name in the roster.
    role_id string
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.
    orgName String
    The organization name
    approvalMode String
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    avatar String
    A presentation token the console maps to an icon. Not an uploaded asset.
    customInstructions String
    Instructions that shape how the agent behaves in the team's environment.
    definitionID String
    The agent definition identifier
    displayName String
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    enabledIntegrations List<Object>
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    name String
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    permissionMode String
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    purpose String
    A one-line description of what this agent is for, shown under its name in the roster.
    roleId String
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.
    orgName string
    The organization name
    approvalMode string
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    avatar string
    A presentation token the console maps to an icon. Not an uploaded asset.
    customInstructions string
    Instructions that shape how the agent behaves in the team's environment.
    definitionID string
    The agent definition identifier
    displayName string
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    enabledIntegrations any[]
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    name string
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    permissionMode string
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    purpose string
    A one-line description of what this agent is for, shown under its name in the roster.
    roleId string
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.
    org_name str
    The organization name
    approval_mode str
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    avatar str
    A presentation token the console maps to an icon. Not an uploaded asset.
    custom_instructions str
    Instructions that shape how the agent behaves in the team's environment.
    definition_id str
    The agent definition identifier
    display_name str
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    enabled_integrations Sequence[Any]
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    name str
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    permission_mode str
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    purpose str
    A one-line description of what this agent is for, shown under its name in the roster.
    role_id str
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.
    orgName String
    The organization name
    approvalMode String
    The approval posture the agent's runs inherit. When omitted, runs are auto-approved, matching scheduled automations. 'manual' makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones -- such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.
    avatar String
    A presentation token the console maps to an icon. Not an uploaded asset.
    customInstructions String
    Instructions that shape how the agent behaves in the team's environment.
    definitionID String
    The agent definition identifier
    displayName String
    The human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.
    enabledIntegrations List<Any>
    The integrations to enable for the agent's tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
    name String
    The agent's name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional -- when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.
    permissionMode String
    Deprecated. Custom Agent authority is controlled by roleId and this field is ignored.
    purpose String
    A one-line description of what this agent is for, shown under its name in the roster.
    roleId String
    The RBAC role id the agent's tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature's read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    PausedAt string
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    PausedBy string
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    PausedReason string
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    TaskCounts object
    Run counts for this agent, shown on its roster card.
    Id string
    The provider-assigned unique ID for this managed resource.
    PausedAt string
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    PausedBy string
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    PausedReason string
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    TaskCounts interface{}
    Run counts for this agent, shown on its roster card.
    id string
    The provider-assigned unique ID for this managed resource.
    paused_at string
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    paused_by string
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    paused_reason string
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    task_counts any
    Run counts for this agent, shown on its roster card.
    id String
    The provider-assigned unique ID for this managed resource.
    pausedAt String
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    pausedBy String
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    pausedReason String
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    taskCounts Object
    Run counts for this agent, shown on its roster card.
    id string
    The provider-assigned unique ID for this managed resource.
    pausedAt string
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    pausedBy string
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    pausedReason string
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    taskCounts any
    Run counts for this agent, shown on its roster card.
    id str
    The provider-assigned unique ID for this managed resource.
    paused_at str
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    paused_by str
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    paused_reason str
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    task_counts Any
    Run counts for this agent, shown on its roster card.
    id String
    The provider-assigned unique ID for this managed resource.
    pausedAt String
    When the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source -- console, schedule, or trigger -- until it is resumed; runs already in flight continue.
    pausedBy String
    Who paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.
    pausedReason String
    Why the agent was paused. Null when it is not paused, or when no reason was given.
    taskCounts Any
    Run counts for this agent, shown on its roster card.

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo pulumiservice logo
    Viewing docs for Pulumi Cloud v1.7.0
    published on Tuesday, Nov 3, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial