Cloud Foundry sample application that provides chat interface for interacting with Goose AI agent with Tanzu AI Services
search cancel

Cloud Foundry sample application that provides chat interface for interacting with Goose AI agent with Tanzu AI Services

book

Article ID: 443368

calendar_today

Updated On:

Products

VMware Tanzu Platform - Cloud Foundry

Issue/Introduction

How to create a full-stack web application in Cloud Foundry for providing a chat interface for interacting with Goose AI agent

Customer is using Tanzu AI Services and would like to integrate with chat interface.

Sample application: https://github.com/cpage-pivotal/goose-agent-chat

Environment

Tanzu AI Services

Resolution

Download the sample goose-agent-chat web application.

This getting started guide details how to successfully integrate application with Tanzu AI Services.

Follow the needed steps to configure application and AI service configuration - 

Configuring LLM Providers

There are two ways to configure which LLM model to use:

  1. Tanzu GenAI Service Binding (recommended for Cloud Foundry) - Bind a GenAI service from Tanzu Marketplace, and models are automatically discovered
  2. Manual Configuration - Set provider and model in .goose-config.yml with API keys

Note: GenAI service bindings take precedence over manual configuration. See Tanzu Marketplace Integration for details.

Here's a sample manifest for using sample app with the (Tanzu AI) Agent Buildpack (if 10.4.x) -

applications:
- name: my-agent
  memory: 1024M
  buildpacks:
  - agent_buildpack
  services:
  - your-llm

Binding a GenAI Service and Restage app

# Create a GenAI service instance from Tanzu Marketplace
cf create-service genai standard my-genai-service

# Bind to your application
cf bind-service goose-agent-chat my-genai-service

# Restage to pick up the binding
cf restage goose-agent-chat

Reference Tanzu AI Service Docs: Deploy an AI Agent.