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
You can simulate one step of the agentic loop on Twitter/X with your new configurations and see the outputs. This is similar to the simulate button on the [Agent Sandbox](https://game-lite.virtuals.io/). Hence, when running
118
+
You can simulate one step of the agentic loop on Twitter/X with your new configurations and see the outputs. This is similar to the simulate button on the [Agent Sandbox](https://game-lite.virtuals.io/).
119
119
120
120
```python
121
121
# Simulate one step of the full agentic loop on Twitter/X from the HLP -> LLP -> action (NOTE: supported for Twitter/X only now)
To more realistically simulate deployment, you can also run through the simulate function with the same session id for a number of steps.
123
125
124
-
# To more realistically simulate deployment you can
126
+
```python
127
+
sid ="456"
128
+
num_steps =10
129
+
for i inrange(num_steps):
130
+
response = agent.simulate_twitter(session_id=sid)
125
131
```
126
132
127
133
```python
128
134
# Simulate response to a certain event
129
135
response = agent.react(
130
136
session_id="567", # string identifier that you decide
131
-
task_description="",
132
-
context="",
133
-
platform="",
137
+
tweet_id="xxxx",
138
+
platform="twitter",
134
139
)
135
140
```
136
141
@@ -150,7 +155,7 @@ We are releasing this simpler setup as a more generalised/platform agnostic fram
150
155
<aside>
151
156
🖥️ Low-Level Planner (LLP) as a Task-based Agent
152
157
153
-

158
+

154
159
155
160
</aside>
156
161
@@ -160,15 +165,14 @@ After configuring the agent’s character card or description and setting up the
160
165
# React/respond to a certain event
161
166
response = agent.react(
162
167
session_id="567", # string identifier that you decide
163
-
task_description="",
164
-
context="Hi how are you?",
168
+
task_description="Be friendly and help people who talk to you. Do not be rude.",
169
+
event="Hi how are you?",
165
170
platform="TELEGRAM",
166
171
)
167
172
```
168
173
169
174
<aside>
170
175
⚠️ Remember that the `platform` tag determines what functions are available to the agent. The agent will have access to functions that have the same `platform` tag. All the default available functions listed on `agent.list_available_default_twitter_functions()` and set via `agent.use_default_twitter_functions()` have the `platform` tag of “twitter”.
171
-
172
176
</aside>
173
177
174
178
## Arguments Definition
@@ -188,3 +192,30 @@ Task description serves as the prompt for the agent to respond. Since the reacti
188
192
- User message
189
193
- Conversation history
190
194
- Instructions
195
+
196
+
197
+
## Importing Functions and Sharing Functions
198
+
With this SDK and function structure, importing and sharing functions is also possible.
199
+
200
+
```python
201
+
from virtuals_sdk.functions.telegram import TelegramClient
202
+
203
+
# define your token so that it can attach it to create the correspodning functions
0 commit comments