MCPcopy Create free account
hub / github.com/Virtual-Protocol/virtuals-python / simulate

Method simulate

src/virtuals_sdk/twitter_agent/sdk.py:28–50  ·  view source on GitHub ↗

Simulate the agent configuration

(self, session_id: str,  goal: str, description: str, world_info: str, functions: list, custom_functions: list)

Source from the content-addressed store, hash-verified

26 return functions
27
28 def simulate(self, session_id: str, goal: str, description: str, world_info: str, functions: list, custom_functions: list):
29 """
30 Simulate the agent configuration
31 """
32 response = requests.post(
33 f"{self.api_url}/simulate",
34 json={
35 "data": {
36 "sessionId": session_id,
37 "goal": goal,
38 "description": description,
39 "worldInfo": world_info,
40 "functions": functions,
41 "customFunctions": [x.toJson() for x in custom_functions]
42 }
43 },
44 headers={"x-api-key": self.api_key}
45 )
46
47 if (response.status_code != 200):
48 raise Exception(response.json())
49
50 return response.json()["data"]
51
52 def react(self, session_id: str, platform: str, goal: str,
53 description: str, world_info: str, functions: list, custom_functions: list,

Callers 1

simulate_twitterMethod · 0.80

Calls 1

toJsonMethod · 0.80

Tested by

no test coverage detected