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

Function create_agent

src/virtuals_sdk/game/utils.py:51–72  ·  view source on GitHub ↗

API call to create an agent instance (worker or agent with task generator)

(
        base_url: str,
        api_key: str,
        name: str,
        description: str,
        goal: str)

Source from the content-addressed store, hash-verified

49
50
51def create_agent(
52 base_url: str,
53 api_key: str,
54 name: str,
55 description: str,
56 goal: str) -> str:
57 """
58 API call to create an agent instance (worker or agent with task generator)
59 """
60
61 create_agent_response = post(
62 base_url,
63 api_key,
64 endpoint="/v2/agents",
65 data={
66 "name": name,
67 "description": description,
68 "goal": goal,
69 }
70 )
71
72 return create_agent_response["id"]
73
74
75def create_workers(base_url: str,

Callers 2

__init__Method · 0.90
__init__Method · 0.90

Calls 1

postFunction · 0.85

Tested by

no test coverage detected