A full-stack web application providing a chat interface for interacting with Goose AI agent. Built with Spring Boot and Angular, featuring real-time streaming responses and Material Design 3 UI.
π Getting Started Guide β Learn how to configure LLM providers, add MCP servers, set up skills, and deploy to Cloud Foundry with Tanzu Marketplace integration.
- Multi-turn Conversations: Maintains conversation context across messages
- Real-time Streaming: SSE-based streaming of responses
- Material Design 3: Modern, responsive UI using Angular Material
- Multi-Provider Support: Works with Anthropic, OpenAI, Google, Databricks, and Ollama
- MCP OAuth2 Authentication: Connect to OAuth-protected MCP servers with user consent flow
- Authentication: Always-on access code auth with optional SSO when a CF identity provider is bound
- Cloud Foundry Ready: Deployable with the Goose buildpack
- Java 21+
- Maven 3.8+
- Node.js 22+ (managed by Maven during build)
- Goose CLI (installed via buildpack or locally)
- An API key for your chosen LLM provider
# Set your preferred provider's API key
export ANTHROPIC_API_KEY=your-api-key
# Or for OpenAI:
# export OPENAI_API_KEY=your-api-key
# Set the path to Goose CLI (if not in PATH)
export GOOSE_CLI_PATH=/path/to/goose# Build the application (includes Angular frontend)
./mvnw clean package
# Run the application
./mvnw spring-boot:runOpen http://localhost:8080 in your browser.
For faster frontend development with hot reload:
# Terminal 1: Start the Spring Boot backend
./mvnw spring-boot:run
# Terminal 2: Start Angular dev server
cd src/main/frontend
npm install
npm startThe Angular dev server runs on http://localhost:4200 and proxies API requests to the Spring Boot backend.
ANTHROPIC_API_KEY: your-api-key# Build the application
./mvnw clean package -DskipTests
# Deploy to Cloud Foundry
cf push --vars-file vars.yamlββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cloud Foundry Container β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Spring Boot Application (JAR) β β
β β β β
β β βββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββ β β
β β β Angular SPA β β REST Controllers β β β
β β β /static/* βββββββΆβ GooseChatController β β β
β β β Material Design 3 β HTTP β ChatHealthController β β β
β β β β β DiagnosticsController β β β
β β βββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββ β β
β β β β β
β β βΌ β β
β β ββββββββββββββββββββββββββ β β
β β β GooseExecutor β β β
β β β (goose-cf-wrapper) β β β
β β β - Session management β β β
β β β - ProcessBuilder β β β
β β ββββββββββββββββββββββββββ β β
β β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Goose Buildpack (Supply) βΌ β β
β β /home/vcap/deps/{idx}/bin/goose βββββββββββββββββββββββββββββββββββββ β
β β Environment: GOOSE_CLI_PATH, provider config β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β LLM Provider API β
β (Anthropic, OpenAI, β
β Google, Databricks) β
βββββββββββββββββββββββββββ
| Endpoint | Method | Description |
|---|---|---|
/auth/login |
POST | Form login with username + password (access code) |
/auth/status |
GET | Returns current authentication state and user info |
/auth/provider |
GET | Detects available SSO provider (used by login page) |
/logout |
POST | End the current session |
/api/chat/health |
GET | Check Goose availability and version |
/api/chat/sessions |
POST | Create a new conversation session |
/api/chat/sessions/{id}/messages |
POST | Send message (returns SSE stream) |
/api/chat/sessions/{id}/status |
GET | Check session status |
/api/chat/sessions/{id} |
DELETE | Close a session |
/api/diagnostics/env |
GET | View relevant environment variables |
/oauth/initiate/{serverName} |
POST | Initiate OAuth flow for an MCP server |
/oauth/callback |
GET | OAuth callback handler |
/oauth/status/{serverName} |
GET | Check OAuth authentication status |
/oauth/disconnect/{serverName} |
POST | Revoke OAuth tokens for an MCP server |
/oauth/client-metadata.json |
GET | Client ID Metadata Document for dynamic registration |
All requests require authentication. There are two login methods:
- Access code (always available) β a shared secret configured via the
APP_AUTH_SECRETenvironment variable. Users enter this code on the login page. - SSO (auto-detected) β when a Cloud Foundry SSO tile (
p-identity) is bound to the app, a "Sign in with SSO" button appears on the login page automatically. No feature flag is needed.
- Spring Security is configured with form login. An in-memory user (
user) is created with the password set toAPP_AUTH_SECRET. - On page load, the login page fetches
/auth/providerto check whether an OAuth2 client registration exists. If one is detected (viajava-cfenv-boot-pivotal-sso), the SSO button is shown. - Both login methods result in a valid Spring Security session and redirect to the app.
The access code defaults to changeme. To override it, set the APP_AUTH_SECRET environment variable.
Locally:
export APP_AUTH_SECRET=my-secret-code
./mvnw spring-boot:runCloud Foundry:
Add the variable to your manifest.yml:
applications:
- name: goose-agent-chat
# ... other config ...
env:
APP_AUTH_SECRET: ((APP_AUTH_SECRET))Then provide the value via a vars file or CredHub:
# vars.yaml
APP_AUTH_SECRET: my-secret-codecf push --vars-file vars.yamlAlternatively, set it directly after deployment:
cf set-env goose-agent-chat APP_AUTH_SECRET my-secret-code
cf restage goose-agent-chatSSO activates automatically when a p-identity service instance is bound to the app. No application properties need to change.
# Create an SSO service instance (plan name may vary by foundation)
cf create-service p-identity <plan> my-sso
# Bind it to the app
cf bind-service goose-agent-chat my-sso
# Restage to pick up the new binding
cf restage goose-agent-chatOnce bound, the login page will show both the access code field and a "Sign in with SSO" button. The java-cfenv-boot-pivotal-sso library detects the binding and auto-configures Spring Security's OAuth2 client registration.
| Property | Default | Description |
|---|---|---|
goose.enabled |
true |
Enable/disable Goose integration |
app.auth.secret |
changeme |
Shared access code for login (set via APP_AUTH_SECRET env var) |
| Variable | Description |
|---|---|
APP_AUTH_SECRET |
Shared access code for login |
GOOSE_CLI_PATH |
Path to Goose CLI binary |
ANTHROPIC_API_KEY |
Anthropic API key |
OPENAI_API_KEY |
OpenAI API key |
GOOGLE_API_KEY |
Google AI API key |
DATABRICKS_HOST |
Databricks workspace URL |
DATABRICKS_TOKEN |
Databricks access token |
GOOSE_PROVIDER__TYPE |
Default provider (anthropic, openai, etc.) |
GOOSE_PROVIDER__MODEL |
Default model |
MIT License