Prerequisites
Before you begin, ensure you have:- Completed the Onboarding steps.
- Access to the Self-Service repository.
- Access to the Applications Live repository.
Step 1: Create a new repository
Use the Self-Service GitOps workflow to provision a new repository based on the starter-agent template.- Clone the Self-Service repository.
- Create a new branch (e.g.,
feat/my-first-agent). - Open
self-service.tfvarsand add your new repository definition under therepositoriesblock:
- Commit your changes and push the branch.
- Open a Pull Request (PR) and merge it after approval.
- Once the PR is merged, a new repository named
my-first-agentgets provisioned and the Repository Provisioning Workflow runs automatically to set up the repository with the template contents and CI/CD pipelines.
Repository successfully provisioned with starter-agent template!
Step 2: Build and publish Docker image
Now that your repository is provisioned, you need to build the application and publish a Docker image to Azure Container Registry (ACR).- Navigate to your newly provisioned repository on GitHub.
- Go to Actions tab.
- Select the Build and Publish workflow from the left sidebar.
- Click Run workflow and select the branch (typically
mainordevelop). - The workflow will:
- Build the application
- Create a Docker image
- Push the image to ACR with a tag (e.g.,
0.1.0.dev0-develop.2a7f4f6d)
Your application’s runnable image is now available on ACR!
Step 3: Deploy to Kubernetes runtime
Deploy your agent to the Kubernetes cluster using the Applications Live repository and ArgoCD.Create ArgoCD application
- Clone the Applications Live repository:
- Create a new branch for your changes:
- Create an ArgoCD Application manifest in the appropriate environment folder (e.g.,
runtimes/dev/applications/):
runtimes/dev/applications/my-first-agent.yaml
Create Helm values file
- Create a values file at
runtimes/dev/values/my-namespace/my-first-agent-v0.values.yaml:
runtimes/dev/values/my-namespace/my-first-agent-v0.values.yaml
- Commit and push your changes:
- Open a Pull Request and merge it after approval.
- Once merged, ArgoCD will automatically sync and deploy your application to the
my-namespacenamespace.
Your agentic application is now deployed on the Kubernetes cluster!
Test your deployed agent
Your agent is now accessible via the Istio VirtualService URL. Test it using the following curl command:Your agentic application is deployed on the cluster and accessible via API!
Step 4: Expose via APIM (secure access)
To securely access your agent’s API with authentication and policies, expose it through API Management (APIM).Create API repository
- Go back to the Self-Service repository and create a new branch.
- Add an API repository definition in
self-service.tfvars:
- Commit, push, and merge the PR.
- Once the
-apirepository is created, clone it and add the OpenAPI specification for your agent (e.g.,openapi.yaml) that describes your agent’s endpoints.
Configure APIM in applications live
Now configure the API, backend, product, and subscription in the Applications Live repository.1
Create API application
Create a file at
runtimes/dev/apim/apis/my-first-agent-api.yaml:runtimes/dev/apim/apis/my-first-agent-api.yaml
Update the
targetRevision with the actual chart version from your API repository’s build workflow.2
Add API to version sets
Add your API to
runtimes/dev/apim/apiVersionsets.yaml:3
Create backend
Add a backend entry in
runtimes/dev/apim/backends.yaml:The backend URL should match the VirtualService URL from Step 4 where you tested your agent.
4
Create product with policies
Add a product definition in
runtimes/dev/apim/products.yaml:5
Create subscription
Add a subscription in
runtimes/dev/apim/subscriptions.yaml:The subscription generates an API key that clients use to access your agent through APIM.
Deploy APIM configuration
Commit and push all the APIM configuration changes, then open a Pull Request and merge it. ArgoCD will automatically sync and apply the APIM configurations.Access your agent via APIM
Once the APIM configuration is deployed, you can access your agent securely using the subscription key:You have successfully created, deployed, and exposed your first agentic application with secure API access through APIM!
Next steps
- Local development: Learn how to run and test your agent locally in the Development Guide
- CI/CD workflows: Understand the automated workflows in CI/CD Overview
- BB AI SDK: Explore SDK features in BB AI SDK Documentation
- Starter kits: Check out other templates in Starter kits