Advanced Portal Designer Documentation
Index

Agent Setup

This page explains how to configure Agent Mode with your preferred AI provider.

Accessing Agent Setup

  1. Open the Advanced Portal Designer menu page (search for it in Tell Me) and click Setup
  2. Scroll to the agent-related fields in the Setup card (Use Coding Agent, Agent AI Provider, Provider Endpoint, Provider Key, Provider Model)
  3. Fill in the provider settings

Configuration Fields

Field Description
Use Coding Agent Enable/disable Agent Mode
Agent AI Provider Select the AI provider
Provider Endpoint API endpoint URL
Provider Key API key for authentication
Provider Model Specific model to use (optional)

Provider Configuration

Azure OpenAI

Azure OpenAI provides enterprise-grade AI through Microsoft Azure.

Prerequisites:

  • Azure subscription
  • Azure OpenAI resource deployed
  • Model deployment (GPT-4 or later recommended)

Configuration:

Field Value
Agent AI Provider Azure Open AI
Provider Endpoint https://{resource-name}.openai.azure.com/openai/deployments/{deployment-name}/chat/completions?api-version=2024-02-15-preview
Provider Key Your Azure OpenAI API key
Provider Model (leave blank - specified in endpoint)

Finding Your Settings:

  1. Go to Azure Portal
  2. Open your Azure OpenAI resource
  3. Navigate to Keys and Endpoint
  4. Copy Key 1 or Key 2
  5. Navigate to Deployments
  6. Note your deployment name for the endpoint URL

Example Endpoint:

https://mycompany-openai.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-02-15-preview

ChatGPT OpenAI

Direct access to OpenAI's ChatGPT API.

Prerequisites:

  • OpenAI account
  • API key from platform.openai.com

Configuration:

Field Value
Agent AI Provider ChatGPT Open AI
Provider Endpoint https://api.openai.com/v1/chat/completions
Provider Key Your OpenAI API key (sk-...)
Provider Model A current OpenAI chat-completion model ID

Getting Your API Key:

  1. Go to platform.openai.com
  2. Sign in or create account
  3. Navigate to API Keys
  4. Click Create new secret key
  5. Copy the key (only shown once!)

OpenAI publishes the current list of available model IDs at platform.openai.com/docs/models. Pick a current model from that list rather than copying a specific ID from here.

Anthropic (Claude)

Anthropic's Claude models, known for strong reasoning and large context.

Prerequisites:

  • Anthropic account
  • API key from console.anthropic.com

Configuration:

Field Value
Agent AI Provider Anthropic (Claude)
Provider Endpoint https://api.anthropic.com/v1/messages
Provider Key Your Anthropic API key
Provider Model A current Anthropic model identifier

Getting Your API Key:

  1. Go to console.anthropic.com
  2. Sign in or create account
  3. Navigate to API Keys
  4. Create a new key
  5. Copy the key

Anthropic publishes the current list of available model IDs at docs.anthropic.com/en/docs/about-claude/models. Use that list to pick a current model ID rather than relying on a specific version string here, which will go stale as Anthropic ships new releases.

LM Studio

Run AI models locally using LM Studio for offline or privacy-focused scenarios.

Prerequisites:

  • LM Studio installed
  • Model downloaded in LM Studio
  • Local server running

Configuration:

Field Value
Agent AI Provider LM Studio
Provider Endpoint http://localhost:1234/v1/chat/completions
Provider Key (leave blank or use lm-studio)
Provider Model Model name from LM Studio

Setting Up LM Studio:

  1. Download LM Studio from lmstudio.ai
  2. Install and open LM Studio
  3. Download a model (recommended: Llama 3, Mistral, or similar)
  4. Start the local server in LM Studio
  5. Note the server URL (default: http://localhost:1234)

Recommended Models for Portal Development:

  • Llama 3 70B or larger
  • Mistral Large
  • DeepSeek Coder

Verifying Configuration

Test the Connection

  1. Open Agent Development page
  2. The agent control should initialize
  3. Send a simple message like "Hello"
  4. Verify you receive a response

Check Available Tools

  1. On Agent Development page
  2. Click Tools Available action
  3. Review the list of available tools
  4. All APD tools should be listed

HttpClient Requirements

Agent Mode requires HTTP calls to external AI providers.

Important: Ensure Allow HttpClient Requests is enabled:

  1. Go to Extension Management
  2. Find Advanced Portal Designer
  3. Click Configure
  4. Enable Allow HttpClient Requests

If this is disabled, you'll see an error:

"Allow HttpClient Requests" is turned off for this extension

Troubleshooting

"Missing API key" Error

  • Verify Provider Key is entered
  • Check for extra spaces
  • Ensure key is valid and not expired

Connection Timeout

  • Check endpoint URL format
  • Verify network connectivity
  • Check firewall settings

Rate Limiting (429 Error)

  • Wait a few moments and retry
  • Consider upgrading API plan
  • Reduce request frequency

Invalid Endpoint

  • Verify URL format matches provider requirements
  • Check for typos
  • Include required query parameters (for Azure)

Cost Considerations

AI providers charge based on token usage:

Provider Pricing Model
Azure OpenAI Per 1K tokens (varies by model)
OpenAI Per 1K tokens (varies by model)
Anthropic Per 1K tokens (varies by model)
LM Studio Free (local compute)

Tips for Cost Management:

  • Use smaller models for simple tasks
  • Review token usage in provider dashboard
  • Set usage limits in provider settings

Security Best Practices

API Key Security

  • Never share API keys
  • Use separate keys for dev/prod
  • Rotate keys periodically
  • Monitor usage for anomalies

Data Considerations

  • AI providers may process portal structure data
  • No customer data is sent to AI
  • Review provider privacy policies