You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Agent block is a fundamental component in Sim Studio that allows you to create powerful AI agents using various LLM providers. These agents can process inputs based on customizable system prompts and utilize integrated tools to enhance their capabilities.
11
+
The Agent block serves as the interface between your workflow and Large Language Models (LLMs). It executes inference requests against various AI providers, processes natural language inputs according to defined instructions, and generates structured or unstructured outputs for downstream consumption.
12
12
13
13
<ThemeImage
14
14
lightSrc="/static/light/agent-light.png"
15
15
darkSrc="/static/dark/agent-dark.png"
16
-
alt="Agent Block"
17
-
width={300}
16
+
alt="Agent Block Configuration"
17
+
width={350}
18
18
height={175}
19
19
/>
20
20
21
-
<Callouttype="info">
22
-
Agent blocks serve as interfaces to Large Language Models, enabling your workflow to leverage
23
-
state-of-the-art AI capabilities.
24
-
</Callout>
25
-
26
21
## Overview
27
22
28
-
The Agent block serves as an interface to Large Language Models (LLMs), enabling you to create agents that can:
23
+
The Agent block enables you to:
29
24
30
25
<Steps>
31
26
<Step>
32
-
<strong>Respond to user inputs</strong>: Generate natural language responses based on provided
33
-
inputs
27
+
<strong>Process natural language</strong>: Analyze user input and generate contextual responses
34
28
</Step>
35
29
<Step>
36
-
<strong>Follow instructions</strong>: Adhere to specific instructions defined in the system
37
-
prompt
30
+
<strong>Execute AI-powered tasks</strong>: Perform content analysis, generation, and decision-making
38
31
</Step>
39
32
<Step>
40
-
<strong>Use specialized tools</strong>: Interact with integrated tools to extend capabilities
33
+
<strong>Call external tools</strong>: Access APIs, databases, and services during processing
41
34
</Step>
42
35
<Step>
43
-
<strong>Structure output</strong>: Generate responses in structured formats when needed
36
+
<strong>Generate structured output</strong>: Return JSON data that matches your schema requirements
44
37
</Step>
45
-
</Steps>
38
+
</Steps>
46
39
47
40
## Configuration Options
48
41
49
42
### System Prompt
50
43
51
-
The system prompt defines the agent's behavior, capabilities, and limitations. It's the primary way to instruct the agent on how to respond to inputs.
44
+
The system prompt establishes the agent's operational parameters and behavioral constraints. This configuration defines the agent's role, response methodology, and processing boundaries for all incoming requests.
52
45
53
46
```markdown
54
47
You are a helpful assistant that specializes in financial analysis.
@@ -58,22 +51,25 @@ When responding to questions about investments, include risk disclaimers.
58
51
59
52
### User Prompt
60
53
61
-
The user prompt or context is the specific input or question that the agent should respond to. This can be:
54
+
The user prompt represents the primary input data for inference processing. This parameter accepts natural language text or structured data that the agent will analyze and respond to. Input sources include:
62
55
63
-
-Directly provided in the block configuration
64
-
-Connected from another block's output
65
-
-Dynamically generated during workflow execution
56
+
-**Static Configuration**: Direct text input specified in the block configuration
57
+
-**Dynamic Input**: Data passed from upstream blocks through connection interfaces
58
+
-**Runtime Generation**: Programmatically generated content during workflow execution
66
59
67
60
### Model Selection
68
61
69
-
Choose from a variety of LLM providers:
62
+
The Agent block supports multiple LLM providers through a unified inference interface. Available models include:
@@ -104,103 +100,204 @@ Your API key for the selected LLM provider. This is securely stored and used for
104
100
105
101
### Tools
106
102
107
-
Integrate specialized tools to enhance the agent's capabilities. You can add tools to your agent by:
108
-
109
-
1. Clicking the Tools section in the Agent configuration
110
-
2. Selecting from the tools dropdown menu
111
-
3. Choosing an existing tool or creating a new one
103
+
Tools extend the agent's capabilities through external API integrations and service connections. The tool system enables function calling, allowing the agent to execute operations beyond text generation.
112
104
113
-
<ThemeImage
114
-
lightSrc="/static/light/tooldropdown-light.png"
115
-
darkSrc="/static/dark/tooldropdown-dark.png"
116
-
alt="Tools Dropdown"
117
-
width={150}
118
-
height={125}
119
-
/>
105
+
**Tool Integration Process**:
106
+
1. Access the Tools configuration section within the Agent block
107
+
2. Select from 60+ pre-built integrations or define custom functions
108
+
3. Configure authentication parameters and operational constraints
Define a structured format for the agent's response when needed, using JSON or other formats.
132
+
The Response Format parameter enforces structured output generation through JSON Schema validation. This ensures consistent, machine-readable responses that conform to predefined data structures:
133
+
134
+
```json
135
+
{
136
+
"name": "user_analysis",
137
+
"schema": {
138
+
"type": "object",
139
+
"properties": {
140
+
"sentiment": {
141
+
"type": "string",
142
+
"enum": ["positive", "negative", "neutral"]
143
+
},
144
+
"confidence": {
145
+
"type": "number",
146
+
"minimum": 0,
147
+
"maximum": 1
148
+
}
149
+
},
150
+
"required": ["sentiment", "confidence"]
151
+
}
152
+
}
153
+
```
154
+
155
+
This configuration constrains the model's output to comply with the specified schema, preventing free-form text responses and ensuring structured data generation.
156
+
157
+
### Accessing Results
158
+
159
+
After an agent completes, you can access its outputs:
160
+
161
+
-**`<agent.content>`**: The agent's response text or structured data
<li>Agent with GPT-4o performs technical analysis</li>
282
+
<li>Agent with Claude analyzes sentiment and tone</li>
283
+
<li>Function block combines results for final report</li>
284
+
</ol>
285
+
</div>
286
+
287
+
### Tool-Powered Research Assistant
288
+
289
+
<divclassName="mb-4 rounded-md border p-4">
290
+
<h4className="font-medium">Scenario: Research assistant with web search and document access</h4>
291
+
<olclassName="list-decimal pl-5 text-sm">
292
+
<li>User query received via input</li>
293
+
<li>Agent searches web using Google Search tool</li>
294
+
<li>Agent accesses Notion database for internal docs</li>
295
+
<li>Agent compiles comprehensive research report</li>
296
+
</ol>
297
+
</div>
200
298
201
299
## Best Practices
202
300
203
301
-**Be specific in system prompts**: Clearly define the agent's role, tone, and limitations. The more specific your instructions are, the better the agent will be able to fulfill its intended purpose.
204
302
-**Choose the right temperature setting**: Use lower temperature settings (0-0.3) when accuracy is important, or increase temperature (0.7-2.0) for more creative or varied responses
205
-
- **Combine with Evaluator blocks**: Use Evaluator blocks to assess agent responses and ensure quality. This allows you to create feedback loops and implement quality control measures.
206
-
- **Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent.
303
+
-**Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent. For tasks with little overlap, use another Agent block for the best results.
0 commit comments