MCPcopy Create free account

hub / github.com/Virtual-Protocol/virtuals-python / functions

Functions96 in github.com/Virtual-Protocol/virtuals-python

↓ 5 callersMethod_interpolate_template
Interpolate a template string with given values
src/virtuals_sdk/twitter_agent/agent.py:85
↓ 5 callersMethodcreate_api_url
Helper function to create full API URL with token
src/virtuals_sdk/twitter_agent/functions/telegram.py:37
↓ 5 callersFunctionpost
API call to post data
src/virtuals_sdk/game/utils.py:22
↓ 4 callersMethodcreate_api_url
Helper function to create full API URL with token
src/virtuals_sdk/twitter_agent/functions/discord.py:37
↓ 4 callersMethodget_function_def
(self)
src/virtuals_sdk/game/custom_types.py:35
↓ 2 callersMethodadd_custom_function
Add a custom function to the agent Custom functions are automatically added and enabled
src/virtuals_sdk/twitter_agent/agent.py:220
↓ 2 callersFunctioncreate_agent
API call to create an agent instance (worker or agent with task generator)
src/virtuals_sdk/game/utils.py:51
↓ 2 callersMethodexecute
Execute the function using arguments from GAME action.
src/virtuals_sdk/game/custom_types.py:43
↓ 2 callersFunctionget_state_fn
This function will get called at every step of the agent's execution to form the agent's state. It will take as input the function result fro
examples/game/test_worker.py:8
↓ 2 callersMethodreact
React to a tweet
src/virtuals_sdk/twitter_agent/agent.py:243
↓ 2 callersMethodrun
(self)
src/virtuals_sdk/game/agent.py:245
↓ 2 callersMethodtoJson
(self)
src/virtuals_sdk/twitter_agent/agent.py:55
↓ 1 callersMethod_create_add_reaction
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:96
↓ 1 callersMethod_create_channel
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:197
↓ 1 callersMethod_create_delete_message
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:224
↓ 1 callersMethod_create_delete_message
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:163
↓ 1 callersMethod_create_get_cast_reactions
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:280
↓ 1 callersMethod_create_get_trending_casts
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:256
↓ 1 callersMethod_create_get_user_casts
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:300
↓ 1 callersMethod_create_like_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:147
↓ 1 callersMethod_create_pin_message
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:184
↓ 1 callersMethod_create_pin_message
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:133
↓ 1 callersMethod_create_poll
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:138
↓ 1 callersMethod_create_post_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:62
↓ 1 callersMethod_create_post_to_channel
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:226
↓ 1 callersMethod_create_recast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:123
↓ 1 callersMethod_create_reply_to_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:93
↓ 1 callersMethod_create_search_casts
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:323
↓ 1 callersMethod_create_search_users
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:353
↓ 1 callersMethod_create_send_media
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:93
↓ 1 callersMethod_create_send_message
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:58
↓ 1 callersMethod_create_send_message
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:60
↓ 1 callersMethod_create_unlike_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:172
↓ 1 callersMethod_get_action
( self, function_result: Optional[FunctionResult] = None )
src/virtuals_sdk/game/agent.py:140
↓ 1 callersMethod_get_action
Gets the agent action from the GAME API
src/virtuals_sdk/game/worker.py:85
↓ 1 callersMethod_prepare_request
Prepare the request configuration with interpolated values
src/virtuals_sdk/twitter_agent/agent.py:91
↓ 1 callersMethod_validate_args
Validate and convert positional arguments to named arguments
src/virtuals_sdk/twitter_agent/agent.py:65
↓ 1 callersMethodcompile
Compile the workers for the agent - i.e. set up task generator
src/virtuals_sdk/game/agent.py:88
↓ 1 callersFunctioncreate_workers
API call to create workers and worker description for the task generator
src/virtuals_sdk/game/utils.py:75
↓ 1 callersMethoddeploy
Simulate the agent configuration
src/virtuals_sdk/twitter_agent/sdk.py:93
↓ 1 callersMethodfunctions
Get all default functions
src/virtuals_sdk/twitter_agent/sdk.py:11
↓ 1 callersFunctionget_access_token
API call to get access token
src/virtuals_sdk/game/utils.py:5
↓ 1 callersMethodget_worker_config
Get worker config from worker dict
src/virtuals_sdk/game/agent.py:124
↓ 1 callersMethodlist_available_default_twitter_functions
List all of the default functions (currently default functions are only available for Twitter/X platform) TODO: will be moved to anot
src/virtuals_sdk/twitter_agent/agent.py:205
↓ 1 callersMethodset_task
Sets the task for the agent
src/virtuals_sdk/game/worker.py:65
↓ 1 callersMethodsimulate
Simulate the agent configuration
src/virtuals_sdk/twitter_agent/sdk.py:28
↓ 1 callersMethodsimulate_twitter
Simulate the agent configuration for Twitter
src/virtuals_sdk/twitter_agent/agent.py:230
↓ 1 callersMethodstep
(self)
src/virtuals_sdk/game/agent.py:182
↓ 1 callersMethodstep
Execute the next step in the task - requires a task ID (i.e. task ID)
src/virtuals_sdk/game/worker.py:123
↓ 1 callersMethoduse_default_twitter_functions
Enable built-in functions by default
src/virtuals_sdk/twitter_agent/agent.py:213
Method__call__
Allow the function to be called directly with arguments
src/virtuals_sdk/twitter_agent/agent.py:120
Method__init__
(self)
src/virtuals_sdk/game/agent.py:9
Method__init__
(self, id: str, worker_description: str, get_state_fn: Call
src/virtuals_sdk/game/agent.py:19
Method__init__
(self, api_key: str, name: str, agent_goal: str,
src/virtuals_sdk/game/agent.py:47
Method__init__
( self, api_key: str, description: str, # description of the worker/character card (P
src/virtuals_sdk/game/worker.py:11
Method__init__
( self, api_key: str, goal: str = "", description: str = "", world_inf
src/virtuals_sdk/twitter_agent/agent.py:158
Method__init__
(self, api_key: str)
src/virtuals_sdk/twitter_agent/sdk.py:8
Method__init__
Initialize the Farcaster client. Args: api_key (str): Your Neynar API key signer_uuid (str): Default
src/virtuals_sdk/twitter_agent/functions/farcaster.py:10
Method__init__
Initialize the Telegram client with a bot token. Args: bot_token (str): Your Telegram bot token
src/virtuals_sdk/twitter_agent/functions/telegram.py:15
Method__init__
Initialize the Discord client with a bot token. Args: bot_token (str): Your Discord bot token
src/virtuals_sdk/twitter_agent/functions/discord.py:16
Method__post_init__
(self)
src/virtuals_sdk/twitter_agent/agent.py:17
Method__post_init__
(self)
src/virtuals_sdk/twitter_agent/agent.py:35
Method__post_init__
(self)
src/virtuals_sdk/twitter_agent/agent.py:52
Method_default_executable
Default executable that does nothing
src/virtuals_sdk/game/custom_types.py:39
Methodadd_worker
Add worker to worker dict for the agent
src/virtuals_sdk/game/agent.py:119
Methodavailable_functions
Get list of available function names.
src/virtuals_sdk/twitter_agent/functions/farcaster.py:52
Methodavailable_functions
Get list of available function names.
src/virtuals_sdk/twitter_agent/functions/telegram.py:33
Methodavailable_functions
Get list of available function names.
src/virtuals_sdk/twitter_agent/functions/discord.py:33
Methoddeploy_twitter
Deploy the agent configuration
src/virtuals_sdk/twitter_agent/agent.py:260
Methodexport
Export the agent configuration as JSON string
src/virtuals_sdk/twitter_agent/agent.py:274
Functionget_agent_state_fn
This function will get called at every step of the agent's execution to form the agent's state. It will take as input the function result fro
examples/game/test_agent.py:40
Methodget_description
(self)
src/virtuals_sdk/twitter_agent/agent.py:199
Methodget_function
Get a specific function by name.
src/virtuals_sdk/twitter_agent/functions/farcaster.py:56
Methodget_function
Get a specific function by name. Args: fn_name: Name of the function to retrieve Raises:
src/virtuals_sdk/twitter_agent/functions/telegram.py:41
Methodget_function
Get a specific function by name. Args: fn_name: Name of the function to retrieve Raises: ValueError
src/virtuals_sdk/twitter_agent/functions/discord.py:41
Methodget_goal
(self)
src/virtuals_sdk/twitter_agent/agent.py:196
Methodget_worker
Initialize a working interactable standalone worker
src/virtuals_sdk/game/agent.py:128
Functionget_worker_state_fn
This function will get called at every step of the workers execution to form the agent's state. It will take as input the function result fro
examples/game/test_agent.py:12
Methodget_world_info
(self)
src/virtuals_sdk/twitter_agent/agent.py:202
Methodreact
Simulate the agent configuration
src/virtuals_sdk/twitter_agent/sdk.py:52
Methodreset
(self)
src/virtuals_sdk/game/agent.py:13
Methodreset
Reset the agent session
src/virtuals_sdk/game/agent.py:115
Methodrun
Gets the agent to complete the task on its own autonomously
src/virtuals_sdk/game/worker.py:161
Methodset_description
(self, description: str)
src/virtuals_sdk/twitter_agent/agent.py:180
Methodset_goal
(self, goal: str)
src/virtuals_sdk/twitter_agent/agent.py:176
Methodset_main_heartbeat
(self, main_heartbeat: int)
src/virtuals_sdk/twitter_agent/agent.py:188
Methodset_reaction_heartbeat
(self, reaction_heartbeat: int)
src/virtuals_sdk/twitter_agent/agent.py:192
Methodset_world_info
(self, world_info: str)
src/virtuals_sdk/twitter_agent/agent.py:184
Functionsit_on_object
Function to sit on an object. Args: object: Name of the object to sit on **kwargs: Additional arguments that might be pa
examples/game/test_agent.py:94
Functionsit_on_object
Function to sit on an object. Args: object: Name of the object to sit on **kwargs: Additional arguments that might be pa
examples/game/test_worker.py:62
Functiontake_object
Function to take an object from the environment. Args: object: Name of the object to take **kwargs: Additional arguments
examples/game/test_agent.py:67
Functiontake_object
Function to take an object from the environment. Args: object: Name of the object to take **kwargs: Additional arguments
examples/game/test_worker.py:36
Functionthrow_fruit
Function to throw fruits.
examples/game/test_agent.py:112
Functionthrow_furniture
Function to throw furniture.
examples/game/test_agent.py:125
Functionthrow_object
Function to throw an object. Args: object: Name of the object to throw **kwargs: Additional arguments that might be pass
examples/game/test_agent.py:81
Functionthrow_object
Function to throw an object. Args: object: Name of the object to throw **kwargs: Additional arguments that might be pass
examples/game/test_worker.py:49