For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Started

Use these example prompts to create pipelines, services, environments, connectors, and other Harness resources with Harness AI.

Harness AI lets you generate Harness platform resources like pipelines, services, environments, connectors, and Cloud Cost Management (CCM) perspectives using natural language prompts. Use these example prompts to quickly create configurations inside Harness by copying and adjusting values for your environment.


What you will learn in this topic

By the end of this topic, you will be able to:


Before you begin

Before you use these example prompts, ensure you have the following:

  • Harness AI enabled: Harness AI must be active for your account. Go to Overview for more information on activating Harness AI.

  • Project access: Permission to create and manage resources (pipelines, services, environments, connectors) in your Harness project.

  • Connector names: Know the names of your configured connectors (Git, Docker, Kubernetes, cloud providers) to reference in prompts.


Use prompts

Learn how to customize and use these example prompts effectively.

For DevOps, pipeline, and platform automation use cases

  1. Navigate to your Harness project and open Harness AI.

  2. Copy an example prompt from this page and adjust values such as connector names, namespaces, repository names, and deployment strategies.

  3. Review the generated YAML configuration, save it, and run your pipeline.

RECOMMENDATION

Be specific in your prompt. Include details like deployment strategy, connector names, namespaces, and image tags for best results.

For Cloud Cost Management use cases

  1. Navigate to Harness AI in CCM.

  2. Copy an example prompt and adjust parameters for your cloud environment.

  3. Review the generated configuration before creating the perspective.


Example prompts for DevOps

Use these example prompts to create pipelines, services, environments, connectors, and other DevOps resources.

Create pipelines

Pipelines define how you build, test, and deploy applications. Harness AI can generate CI pipelines, CD pipelines, or hybrid flows with approvals and rollouts.

Use case: Combine security scanning into the CI/CD process for Python applications.

Use case: Enable GitHub PR validation and continuous delivery on merge events.

Use case: Generate a PR-triggered pipeline with conditional deployment.

Use case: Create a standard enterprise promotion pipeline with manual approvals and safer canary rollout.

Use case: Enable parallel testing across multiple Python versions plus Helm-based deployment.


Create services

Services define what you deploy, including application configuration, runtime, and artifacts. Harness AI can generate service definitions for Kubernetes, ECS, Lambda, and more.

Use case: Standardize Kubernetes services using Helm.

Use case: Build serverless microservices with runtime and configuration.

Use case: Create an ECS-based deployment with resource settings and logging integrations.


Create environments

Environments represent where applications run, such as dev, staging, and prod. Harness AI can generate environment definitions for you.

Use case: Create a non-prod environment to test services.

Use case: Create a production environment to deploy services.


Create secrets

Create secrets to store sensitive information like credentials and tokens.

Important security notes

  • When creating secrets, Harness creates the secret object without a value.

  • You must navigate to the created secret in the listing page to provide the value.

  • Harness does not send secret values to the AI model. Sensitive data is stripped before any AI request.

Use case: Create a reusable DockerHub token secret for image pulls.


Create connectors

Connectors integrate Harness with external systems such as Git, Docker, AWS, and Vault. Harness AI can help generate connector definitions.

Use case: Automate DockerHub connector creation tied to secrets.

Use case: Simplify Vault integration for secret management.

Use case: Enable IRSA-based AWS authentication via Harness delegate.


Create IaCM pipelines

Harness AI DevOps Agent can create Infrastructure as Code Management (IaCM) pipelines for provisioning and managing infrastructure using Terraform and other IaC tools.

Use case: Provision cloud infrastructure with Terraform via an IaCM pipeline.

Use case: Manage a Terraform workspace through a pipeline.

Use case: Create a Terraform plan and apply workflow.


Create multi-module pipelines

Harness AI supports creating pipelines with stages from multiple Harness modules, including CI, CD, IaCM, IDP, SCS, STO, DB DevOps, and Chaos Engineering.

Use case: Create an end-to-end pipeline with security scanning.

Use case: Create a pipeline with chaos engineering validation.

Use case: Create a database migration pipeline.

Use case: Create a supply chain security pipeline.


Reference pipeline templates

Templates allow you to standardize steps and stages across multiple pipelines. Harness AI can reference existing templates by name.

Referencing a stage template:

Referencing a pipeline template:


GitOps operations

Harness AI can manage 13 GitOps resource types, including agents, applications, clusters, repositories, ApplicationSets, and more. You can query status, trigger syncs, create and update resources, inspect events and logs, and generate pipeline snippets. Go to GitOps operations for more information on all supported resource types and operations.

Use case: List agents and check their health.

Use case: Check application sync status across your environment.

Use case: Create a new GitOps application.

Use case: Sync an application with pruning.

Use case: Bulk sync multiple applications.

Use case: Create an ApplicationSet with a list generator.

Use case: Inspect events and troubleshoot.

Use case: View pod logs for a workload.

Use case: Discover and run Kubernetes resource actions.

Use case: View the GitOps dashboard summary.

Use case: Link a cluster to an environment.


Limitations

Harness AI does not currently support generating the following DevOps resources:

  • Template creation and update


Example prompts for efficiency and cost

Use these example prompts to create Cloud Cost Management perspectives.

Create cloud cost perspectives

You can use Harness AI to create Cloud Cost Management perspectives to visualize and analyze cloud spending.

Use case: Create a perspective for application costs.

Use case: Create a perspective for environment costs.

Use case: Create a service or component cost perspective.

Use case: Create a team or department cost perspective to manage team spending.


Next steps

Last updated

Was this helpful?