Configuration Reference
Field-level settings for agents, safety controls, and runtime behavior.
Complete guide to deploying and configuring your first AI agent.
[!TIP] Fastest path: run
cci flow run dev_org --org devwith CumulusCI.
Manual path: clone repo, deploy with SF CLI, create Named Credential, create LLM Config, create Agent, add capabilities, add chat component.
Configuration Reference
Field-level settings for agents, safety controls, and runtime behavior.
Developer Guide
Build custom actions and context providers.
Troubleshooting
Diagnose setup and runtime issues quickly.
[!TIP] Start with a Sandbox org for initial setup and testing.
Before you begin, ensure you have:
CumulusCI provides the fastest way to get started with a fully configured scratch org.
# Clone the repositorygit clone https://github.com/iamsonal/aiAgentStudio.gitcd aiAgentStudio
# Run the dev_org flowcci flow run dev_org --org devThis single command performs all of the following:
| Step | What it does |
|---|---|
| Deploy Framework | Deploys all Apex classes, LWCs, objects, and metadata from force-app |
| Deploy Seed Data | Deploys utility classes from seed-data folder |
| Assign Permission Sets | Assigns AIAgentStudioConfigurator and AIAgentStudioEndUser |
| Enable Knowledge | Enables Knowledge user and assigns KnowledgeDemo permission set |
| Create Sample Data | Runs AgentTestDataFactory.createComprehensiveShowcase() to create sample agents and test data |
| Setup Connected App | Configures a Connected App for API access |
After the flow completes, open your scratch org:
cci org browser devYou’ll have working sample agents ready to test. Explore the seed-data folder and AgentTestDataFactory class to see what gets created.
For existing orgs or when you need more control over the deployment:
# Clone the repositorygit clone https://github.com/iamsonal/aiAgentStudio.gitcd aiAgentStudio
# Authenticate to your orgsf org login web -a your-org-alias
# Deploy the frameworksf project deploy start -d force-app/main/default -o your-org-alias[!CAUTION] Never commit API keys to source control. Named Credentials keep secrets out of metadata.
Named Credentials securely store your AI provider API keys.
OpenAI APIOpenAI_APIhttps://api.openai.comAuthorizationBearer YOUR_API_KEYClaude APIClaude_APIhttps://api.anthropic.comx-api-keyYOUR_API_KEYGemini APIGemini_APIhttps://generativelanguage.googleapis.comLLM Configurations define how to connect to your AI provider.
| Field | Value | Description |
|---|---|---|
| Developer Name | OpenAI_GPT4o | Unique identifier |
| Named Credential | OpenAI_API | Your named credential |
| Provider Adapter Class | OpenAIProviderAdapter | Provider-specific adapter |
| Default Model | gpt-4o-mini | Model to use |
| Temperature | 0.7 | Creativity (0-1) |
| Max Tokens | 4096 | Maximum response length |
| Is Active | ✓ | Enable this configuration |
| Provider | Adapter Class | Models |
|---|---|---|
| OpenAI | OpenAIProviderAdapter | gpt-4o, gpt-4o-mini |
Additional provider adapters are available in the addon package. You can also create your own by extending BaseProviderAdapter.
| Field | Value |
|---|---|
| Name | Sales Assistant |
| Developer Name | Sales_Assistant |
| Agent Type | Conversational |
| LLM Configuration | OpenAI_GPT4o |
| Is Active | ✓ |
| Field | Value | Description |
|---|---|---|
| Memory Strategy | BufferWindow | How to manage history |
| History Turn Limit | 10 | Conversations to remember |
Identity Prompt (Who the agent is):
You are a helpful Salesforce assistant for the sales team.You help users find accounts, contacts, and opportunities.You are professional, concise, and always confirm before making changes.Instructions Prompt (How to behave):
- Always greet users warmly- Ask clarifying questions when requests are ambiguous- Confirm before creating or updating records- Provide summaries of search results- If you can't help, explain why and suggest alternatives[!NOTE] Capabilities are the tools your agent can use. Start with read-only capabilities, then add write capabilities.
Capabilities define what actions your agent can perform.
| Field | Value |
|---|---|
| Capability Name | search_contacts |
| Description | Search for contacts by name, email, or account. Use this when users ask to find contact information. |
| Implementation Type | Standard |
| Standard Action Type | GetRecordDetails |
| AI Agent Definition | Sales Assistant |
{ "objectApiName": "Contact"}{ "type": "object", "properties": { "firstName": { "type": "string", "description": "Contact's first name" }, "lastName": { "type": "string", "description": "Contact's last name" }, "email": { "type": "string", "description": "Contact's email address" }, "accountName": { "type": "string", "description": "Name of the contact's account" } }}| Field | Value |
|---|---|
| Capability Name | create_task |
| Description | Create a follow-up task. Use when users want to schedule reminders or to-dos. |
| Implementation Type | Standard |
| Standard Action Type | CreateRecord |
| Requires Approval | ✓ |
Backend Configuration:
{ "objectApiName": "Task"}Parameters:
{ "type": "object", "required": ["Subject"], "properties": { "Subject": { "type": "string", "description": "Task subject/title" }, "Description": { "type": "string", "description": "Task details" }, "ActivityDate": { "type": "string", "description": "Due date in YYYY-MM-DD format" }, "Priority": { "type": "string", "enum": ["High", "Normal", "Low"], "description": "Task priority" } }}Sales_AssistantOpen the page with your chat component and try these conversations:
You: Hi there!Agent: Hello! I'm your Sales Assistant. How can I help you today?
You: Find contacts at Acme CorpAgent: [Searches and returns contacts]
You: Create a task to follow up with John Smith next weekAgent: I'll create a follow-up task for John Smith. Here are the details: - Subject: Follow up with John Smith - Due Date: [next week] Should I proceed?
You: YesAgent: ✓ Task created successfully!Now that you have a working agent, explore: