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

Method get_worker

src/virtuals_sdk/game/agent.py:128–138  ·  view source on GitHub ↗

Initialize a working interactable standalone worker

(self, worker_id: str)

Source from the content-addressed store, hash-verified

126 return self.workers[worker_id]
127
128 def get_worker(self, worker_id: str):
129 """Initialize a working interactable standalone worker"""
130 worker_config = self.get_worker_config(worker_id)
131 return Worker(
132 api_key=self._api_key,
133 # THIS DESCRIPTION IS THE AGENT DESCRIPTION/CHARACTER CARD - WORKER DESCRIPTION IS ONLY USED FOR THE TASK GENERATOR
134 description=self.agent_description,
135 instruction=worker_config.instruction,
136 get_state_fn=worker_config.get_state_fn,
137 action_space=worker_config.action_space,
138 )
139
140 def _get_action(
141 self,

Callers

nothing calls this directly

Calls 2

get_worker_configMethod · 0.95
WorkerClass · 0.90

Tested by

no test coverage detected