*** title: Designing Conversation Processes position: 2 deprecated: false hidden: false metadata: robots: index ------------- As an agent engineer, your responsibility is to design the best context for your AI agents. * **Functionality**: What operations are possible? * **ML Performance**: How accurately does the Reasoning Engine interpret and use your plugin? * **User Clarity**: How easy is it for users to understand what happened? * **Latency**: How fast does the plugin execute (both execution time and end-to-end user experience)? * **Maintainability**: How easy is it to modify or extend? This guide presents the **work backwards methodology**: start from your goal and trace dependencies back to their sources. For each architectural decision, you'll see the tradeoffs explicitly—what you gain, what you sacrifice, and when to choose each approach. # Work Backwards from the Goal For every plugin: 1. **Identify the core action** (the "goal" – the final API call) 2. **List all input arguments** (just list them first) 3. **Trace each input to its source:** * **Meta info** (current\_user, current\_date, etc.) * **User provides** (becomes a slot) * **Another action** (trace that action's inputs recursively) 4. **Repeat step 3** for any dependent actions until everything traces to meta info or slots 5. **Design slot collection** (this is where context engineering decisions happen) **You're done when:** All inputs are either meta info, slots, or outputs from actions whose inputs are meta info/slots. ```mermaid flowchart TB A[Core Action] --> B[List Input Arguments] B --> C[Trace Each Input] C --> D{Meta Info?} C --> E{User Provides?} C --> F{Another Action?} D --> G[Map from context] E --> H[Design Slot] F --> I[Trace dependencies] I --> C H --> M G --> M[All inputs traced] style A fill:#e8f5e9 style M fill:#c8e6c9 ``` **During slot collection design** (step 5), you make critical context engineering decisions. The next section explores these tradeoffs in depth. *** # Example 1: View Team PTO Requests ## Step 1: Identify the Core Action ``` Core Action: GET /v1/scheduling/employee_timeoff/multi_read ``` ## Step 2: List All Input Arguments First, list every input this action requires: | Input | Format | Required? | | -------------- | ------------- | --------- | | `employee_ids` | List\[String] | Yes | | `start_date` | YYYY-MM-DD | Yes | | `end_date` | YYYY-MM-DD | Yes | | `state` | String | No | ## Step 3: Trace Each Input to Its Source Now extend the table—where does each input come from? | Input | Format | Required? | Source | How to get it | | -------------- | ------------- | --------- | ------------------ | ------------------------------------ | | `employee_ids` | List\[String] | Yes | **Another Action** | Convert user emails → UKG system IDs | | `start_date` | YYYY-MM-DD | Yes | **User provides** | User specifies date range | | `end_date` | YYYY-MM-DD | Yes | **User provides** | User specifies date range | | `state` | String | No | **User provides** | Optional filter (default: "All") | **Key insight:** `employee_ids` comes from another action. That means we're not done—we need to trace that action's inputs. ## Step 4: Trace Dependent Action(s) The action that converts user emails to UKG employee IDs: ``` Action: Convert Users to UKG IDs API: POST /identity-graph/resolve ``` List its inputs, then trace them: | Input | Format | Required? | Source | How to get it | | ------- | ----------- | --------- | ----------------- | ------------------------------------------ | | `users` | List\[User] | Yes | **User provides** | User specifies which team members (emails) | Now everything traces to user-provided data! **Complete tracing result** for the core action:
| Input | Source | Chain |
|---|---|---|
| `employee_ids` | Another Action | Collected from an API that takes user email addresses.\ Will retrieve based on `target_persons` (below) |
| `target_persons` | User provides | Direct from user |
| `start_date` | User provides | Direct from user |
| `end_date` | User provides | Direct from user |
| `state` | User provides | Direct from user |