Getting Started
This guide will walk you through the setup of the OpenAI Agents Manager plugin step by step.
Overview: What to Expect
You'll be ready in 5 simple steps:
- ✅ Install and activate plugin
- ✅ Create OpenAI API key
- ✅ Enter API key in Shopware
- ✅ Create first agent
- ✅ Test agent
Time required: Approx. 15-20 minutes
Step 1: Install Plugin
Installation via Shopware Store
- Log in to the Shopware backend
- Navigate to Extensions → My extensions
- Search for "OpenAI Agents Manager" or "5 Elements"
- Click Install
- After installation, click Activate
Installation via Console
Alternatively, you can install the plugin via command line:
# Install plugin
bin/console plugin:install FelOAIAssistantsManager --activate
# Clear cache
bin/console cache:clear
After activation, a new menu item "5E OAI Agent Manager" appears in the left navigation of your Shopware backend.
Step 2: Create OpenAI API Key
To use the plugin, you need an API key from OpenAI.
2.1 Create OpenAI Account (if not already done)
- Visit platform.openai.com
- Click Sign Up
- Create an account or sign in with Google/Microsoft
- Verify your email address
2.2 Add Payment Method
OpenAI works on a pay-as-you-go basis. You only pay for what you use.
- Go to platform.openai.com/settings/organization/billing
- Click Add payment method
- Add a credit card
- (Optional) Set a monthly budget (e.g., €20)
For a small to medium shop, €10-20 per month is often sufficient. Thanks to token caching (50-90% savings), costs are very manageable!
2.3 Create API Key
- Navigate to platform.openai.com/api-keys
- Click + Create new secret key
- Enter a name (e.g., "Shopware Production")
- Select permissions: All
- Click Create secret key
The API key is only displayed once! Copy it immediately and store it securely. If you lose it, you'll need to create a new one.
The key looks like this:
sk-proj-aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890...
Copy the complete key to your clipboard.
Step 3: Enter API Key in Shopware
Now we connect Shopware with your OpenAI account.
3.1 Open Plugin Configuration
- Go to Settings → System → Plugins in the Shopware backend
- Search for the plugin OpenAI Agents Manager
- Click the three dots (⋮) on the right
- Select Configure
3.2 Enter API Key
In the configuration window:
- Find the field "API Key for the Agent Manager"
- Paste your copied API key
- Click "Test API Key" (if available)
- Click Save
If everything worked, you'll see a success message. Your Shopware system can now communicate with OpenAI!
3.3 Additional Settings (Optional)
In the plugin configuration, you'll find additional options:
| Setting | Recommendation | Description |
|---|---|---|
| Enable thread logging | ✅ On | Saves all chat histories for tracking |
| Enable usage counter | ✅ On | Counts tool calls per agent |
| Search query logging | ✅ On | Logs agent search queries |
| Maximum attempts | 75 | Number of attempts before abort |
| Wait time between attempts | 2 seconds | Wait time in loop |
For the beginning, you can keep the default settings.
Step 4: Create First Agent
Now we'll create your first agent! We'll start with a simple Product Advisor.
4.1 Open Agent Overview
- Click 5E OAI Agent Manager in the left navigation
- You'll see the agent overview (still empty)
- Click + Create Agent

4.2 Enter Agent Name
Enter an internal name for your agent:
Agent Name (for internal management):
Product Advisor Shop
This name is only displayed in the backend and serves to distinguish multiple agents.
4.3 Instructions - The MCP Interface for Shopware
The Instructions are pre-optimized system prompts that tell the agent how to use the available tools. Together with the tools, you get essentially an MCP (Model Context Protocol) - a structured interface to control your Shopware shop!
The plugin comes with optimized instructions that:
- ✅ Generate HTML-formatted responses (instead of Markdown)
- ✅ Intelligent product search with exact matching of categories and properties
- ✅ Use log system as knowledge database
- ✅ Handle multilingualism automatically
- ✅ Implement security protocol (Protocol 712 - no user URLs fetched)
Available Tools (activatable in the next step):
get_product_properties()- Retrieve categories, properties, manufacturersproduct_search()- Search products with filters (price, category, properties)get_meta_information()- Shop metadatasearch_logs()- Search knowledge databasefetch_url()- Secure URL queries- More tools for cart, orders, CMS pages, etc.
Workflow Example (from instructions):
User: "I'm looking for a jacket in blue between €50-100"
Agent thinks:
1. get_product_properties() → Fetches available categories & colors
2. product_search(
query: "Jacket",
categories: ["Clothing", "Outerwear"],
properties: ["Color:Blue"],
price_min: 50,
price_max: 100
)
3. Formats results as HTML list with links
The instructions are optimized but can be adjusted at any time if you want specific behavior. For starters, we recommend the standard version!
4.4 Select Model
Choose an AI model:
Recommended for beginners: gpt-4o-mini
- ✅ Very affordable (approx. 10x cheaper than GPT-4o)
- ✅ Fast responses (1-3 seconds)
- ✅ Sufficient for most applications
You can switch to a more powerful model later at any time.
The plugin contains optimized instructions for both model generations. GPT-5 models (gpt-5-mini, gpt-5) use advanced reasoning capabilities and more structured tool calls.
4.5 Activate Tools - The MCP Interface
Tools are the real power of the system! They give the agent structured access to Shopware functions.
Recommended for a Product Advisor agent:
Basic Tools (must activate):
- ✅
get_product_properties()- Required! Fetches categories, properties, manufacturers - ✅
product_search()- Product search with filters - ✅
get_chatbot_name()- Bot name for greetings
Extended Product Tools:
- ✅
get_product_details()- Detailed product info - ✅
get_categories()- Category tree - ✅
get_manufacturer()- Manufacturer information
Knowledge Database:
- ✅
search_logs()- Searches your FAQ/knowledge database - ✅
tags_for_logs()- Available tags for log search - ✅
get_meta_information()- Shop metadata
Optional Tools (depending on use case):
fetch_url()- Secure URL queries (only for trusted sources)add_to_cart()- Add products to cartget_cart()- Display cart- More CMS & content tools
The instructions are optimized to call get_product_properties() first before a product search. This way, the agent knows which categories and properties exist and can match exactly!
Model Context Protocol: The combination of Instructions + Tools gives the AI a structured, secure interface to the shop. It can:
- Retrieve data (get_product_properties, search_logs)
- Filter data (product_search with exact parameters)
- Process data (HTML-formatted responses)
But it cannot perform harmful actions (e.g., no arbitrary URL fetching - Protocol 712).
4.6 Adjust Settings
Temperature (Creativity): 0.7
- 0.1 = very predictable and consistent
- 1.5 = creative and variable
Reasoning Effort: medium
- Low = fast, simple
- Medium = balanced (recommended)
- High = thorough, slow
Leave the other settings on default.
4.7 Activate and Save Agent
- Set "Is Active" to ✅ On
- (Optional) Set "Is Default" to ✅ On (if this should be your main agent)
- Click Save
Your "Product Advisor" agent is now ready for use!
Step 5: Test Agent
Now let's test if everything works.
5.1 Open Backend Chat
- Click 5E OAI Agent Manager in the left navigation
- Click Chat in the menu
- The backend chat opens
5.2 Perform First Test
Try these test messages:
Test 1: Greeting
Hello!
Expectation: The agent greets you friendly
Test 2: Product Search
I'm looking for a jacket
Expectation: The agent asks for more details (color, size, budget)
Test 3: Specific Search (if you have jackets in the shop)
Show me black winter jackets under €100
Expectation: The agent searches and presents matching products
5.3 Analyze Conversation
Pay attention to:
- ✅ Does the agent respond quickly? (should take 1-5 seconds)
- ✅ Is the response friendly and helpful?
- ✅ Are tools called correctly?
- ✅ Are product recommendations relevant?
Troubleshooting: Common Problems
Problem: "Missing OpenAI API Key"
Solution:
- Go to Settings → System → Plugins
- Configure the plugin again
- Check if the API key was copied completely
Problem: Agent doesn't respond
Possible causes:
- ❌ Invalid API key → Create new key
- ❌ No OpenAI credits → Add credits
- ❌ Agent not activated → Set "Is Active" in agent settings
Problem: "Rate limit exceeded"
Solution: OpenAI has a request limit. Wait 1 minute and try again.
Problem: High costs
Solution:
- Use
gpt-4o-miniinstead of more expensive models - Deactivate unneeded tools
- Shorten instructions (but not too much!)
Next Steps
Congratulations! You have successfully:
- ✅ Installed the plugin
- ✅ Established the OpenAI connection
- ✅ Created your first agent
- ✅ Tested the agent
Now continue with:
➡️ Understanding Agent Configuration - Detailed explanation of all settings
➡️ Tools & Functions - Which tool for what?
➡️ Using Vector Stores - Upload your own documents
➡️ Best Practices - Tips for optimal agents