Decision Frameworks
You’ll hit the same six decision points over and over when building in Agent Studio. This page gives you a tree for each one. Follow the branches, pick the right tool, move on.
Action Type Selection
Every plugin needs at least one action. Here’s how to pick the right type.
Quick Reference
Script actions cannot make HTTP requests — internet access is blocked at the infrastructure level. Use HTTP actions to call external APIs, then pass the response data into a script action via input_args if you need complex transforms on the result.
Conversation Process vs Compound Action
This decision starts with how your plugin gets triggered, not what it does.
- Conversational trigger (user sends a message) → you have a user session. Conversation processes are available.
- System trigger (webhook or schedule) → no user session. Ambient agents run compound actions only. Conversation processes are not an option because there’s no user to interact with.
A plugin uses one trigger type: either conversational triggers or system triggers. If you need both, create two separate plugins. See connecting ambient agents to conversational agents for the handoff pattern.
The Default Conversational Pattern
Most conversational plugins follow the same shape: one conversation process wrapping one compound action.
The conversation process handles user interaction (slots, confirmation). The compound action handles integration logic (API calls, transforms, sequencing). Clean separation.
When a Conversation Process Needs Multiple Action Activities
If your conversation process genuinely needs two separate action groups — for example, a lookup followed by a create — separate them with a slot barrier:
The required_slots on the second activity forces the reasoning engine to pause and collect input. That’s the slot barrier that satisfies the Golden Rule.
Slot Type Selection
Picking the wrong slot type is one of the most common mistakes. It works in testing but breaks in production when real users give unexpected input.
Common Mistakes
Every resolver adds an LLM call. A boolean slot is resolved without one. If you’re building a two-option choice (approve/reject, yes/no, enable/disable), always use boolean over a static resolver.
LLM vs DSL
The fourth commandment: LLM for language, DSL for logic. If the task is deterministic — same input always produces same output — use DSL. If it requires understanding natural language, use an LLM action.
The Test
Ask yourself: “If I gave this exact input to 100 different people, would they all produce the exact same output?”
- Yes → DSL. It’s deterministic.
- No → LLM. It requires judgment.
LLM Action Defaults
When you do use an LLM action:
- Model:
gpt-4o-mini(fast, cheap, good enough for most tasks) - Temperature:
0.3for deterministic tasks (classification, extraction),0.7for creative tasks (generation) - Always set
"additionalProperties": falsein the response schema to prevent hallucinated fields - See the LLM Actions reference for the full list of available models and configuration options
Data Mappers & DSL vs Python
DSL functions ($LOWERCASE, $CONCAT, $FORMAT_TIME, etc.) and data mappers (MAP(), FILTER(), LOOKUP(), CONDITIONAL()) work together inside output mappers and input mappers. They handle most data transformations without needing a separate action. But they have limits.
Capability Comparison
Decision Rules
- Can you express it inline in a mapper? → Use DSL/data mappers. No extra action, no latency cost.
- Is it a simple field extraction, lookup, or list transform? → Data mappers handle it declaratively.
- Nested 3+ data mapper operations, or need regex/error handling/complex math? → Switch to a script action.
Example: Inline DSL vs Python Script Action
DSL runs inline in your mapper — no extra action, no latency cost:
The same transforms in Python require a separate script action and add latency:
Example: When Data Mappers Get Strained
Simple data mappers are readable and fast:
But chaining sort, filter, map, and conditional logic is where the nesting gets deep fast:
A script action is cleaner once you hit this level of nesting:
If your mapper chains SORT(), FILTER(), MAP(), and CONDITIONAL() four or five levels deep — stop. Write a script action.
Compound Actions vs Python
Compound actions have their own control flow: for loops, switch conditionals, and parallel execution. These handle orchestration-level logic — iterating over items, branching between different actions, running steps concurrently. Script actions handle fine-grained data manipulation within a single step.
The Key Distinction
- Compound actions orchestrate — they decide which actions run and in what order.
- Script actions transform — they manipulate data within a single step.
You’ll often use both: a compound action orchestrates the flow, and a script action handles a tricky transform at one step.
Example: Compound Action for Loop
Send a notification to each user in a list:
You can’t do this in a script action — scripts can’t call other actions. This is compound action territory.
Example: Compound Action switch
Route to different actions based on a condition:
When to Use Python Instead
Use a script action when the problem is data manipulation, not action orchestration:
This needs try/except, date parsing, and conditional filtering within a single list — that’s a script action’s job. A compound action for loop can iterate and call actions, but it can’t do inline error handling or complex transforms.
Quick Reference: All Six Decisions
The single most important architecture principle — never chain actions without a slot barrier.
Full reference for compound actions: steps, return, for loops, switch, parallel, and output mapping.
Deeper comparison with examples and the full decision process.
How to configure LLM actions for summarization, classification, extraction, and generation.