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

Method deploy

src/virtuals_sdk/twitter_agent/sdk.py:93–118  ·  view source on GitHub ↗

Simulate the agent configuration

(self, goal: str, description: str, world_info: str, functions: list, custom_functions: list, main_heartbeat: int, reaction_heartbeat: int)

Source from the content-addressed store, hash-verified

91 return response.json()["data"]
92
93 def deploy(self, goal: str, description: str, world_info: str, functions: list, custom_functions: list, main_heartbeat: int, reaction_heartbeat: int):
94 """
95 Simulate the agent configuration
96 """
97 response = requests.post(
98 f"{self.api_url}/deploy",
99 json={
100 "data": {
101 "goal": goal,
102 "description": description,
103 "worldInfo": world_info,
104 "functions": functions,
105 "customFunctions": custom_functions,
106 "gameState" : {
107 "mainHeartbeat" : main_heartbeat,
108 "reactionHeartbeat" : reaction_heartbeat,
109 }
110 }
111 },
112 headers={"x-api-key": self.api_key}
113 )
114
115 if (response.status_code != 200):
116 raise Exception(response.json())
117
118 return response.json()["data"]

Callers 1

deploy_twitterMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected