Building a Conversational Plugin
End-to-end reference architecture for a multi-step conversational plugin.
This guide walks through the full architecture of a realistic conversational plugin — from connector to testing. It’s not a step-by-step tutorial; it’s a reference architecture showing how every piece fits together.
The example: an Expense Report Manager that lets employees look up their pending expense reports, add a new expense line item to a report, and submit a report for approval — all through a single conversational plugin backed by SAP Concur.
The YAML and configurations here are pseudocode — realistic enough to teach the patterns, but not copy-pasteable into Agent Studio. Adapt them to your actual system’s API.
In practice, most of these components are configured through the Agent Studio UI — not written as code. We’re showing code representations here because it’s the clearest way to illustrate the full configuration in a document. When you build, you’ll fill in these same fields through the visual editor.
Architecture Overview
Here’s what you’re building and how the pieces connect:
Component count: 1 connector, 3 HTTP actions, 2 compound actions, 1 custom data type with dynamic resolver, 1 conversational process with 5 slots and 3 branches.
Step 1: Connector
The connector is the authentication layer. Every HTTP action inherits from it.
One connector per system. If your Concur instance uses one set of credentials for all expense APIs, you need one connector. Only create a second if a different module requires different credentials.
Step 2: HTTP Actions
Three actions, each doing one thing:
Fetch Expense Reports
Used by the dynamic resolver to retrieve the user’s reports.
Response shape (what the API returns):
Create Expense Entry
Adds a new line item to a report.
Submit Report
Changes the report’s workflow status to submitted.
Step 3: Custom Data Type + Dynamic Resolver
This is what lets the user say “my March travel expenses” and have the system resolve it to a specific report object.
Custom Data Type
Dynamic Resolver (attached to the data type)
When the user says “my March expenses,” the resolver calls the HTTP action, gets back a list of reports, and presents them for the user to pick from. The selected report object (with all fields) is stored in the slot.
A data type can have multiple resolver strategies. For example, you could add a “search by report ID” resolver for users who say “report 764428.” The AI agent picks the best resolver based on context. See Resolver Strategies.
Step 4: Compound Actions
Compound actions keep intermediate data out of the Reasoning Engine’s context window. Only the return data goes back. This is why you use them instead of chaining action activities.
Add Expense to Report
Submit Expense Report
Step 5: Conversational Process
This is where you define the user-facing flow — what slots to collect, what actions to run, and what decisions to make.
Slots
Decision Policy + Activities
After collecting expense_report and action_choice, a decision policy routes to the right branch:
Input and output mappers are configured on action activities — not on the plugin or the HTTP action. This is where you map slot values and metadata to your action’s input arguments. See Activities.
Step 6: Plugin
The plugin ties everything together with triggers and launch configuration.
Step 7: Testing
- Test your HTTP actions individually using the Test button — verify they return the expected response shape.
- Test your compound actions using the Test button — enter sample input args and check logs.
- Test the full plugin through the AI assistant:
- “Check my expense reports” → should show your pending reports
- Pick a report → “Add an expense” → fill amount, vendor, category → confirm
- “Submit my March report” → confirm → should submit
For detailed testing guidance, see Testing & Error Handling.
Key Takeaways
Variations
Multiple systems: If you also need to sync expenses to an ERP, add a second connector and chain the ERP call inside the compound action after the Concur call.
Approval flow: To add manager approval before submission, use mw.create_generic_approval_request in the compound action. See Built-in Actions.
SDA for analytics: If users ask “how much did I spend this quarter?”, the report list response may be large enough to trigger Structured Data Analysis. Use friendly field names in your output mapper.