Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Virtual-Protocol/virtuals-python
/ functions
Functions
96 in github.com/Virtual-Protocol/virtuals-python
⨍
Functions
96
◇
Types & classes
22
↓ 5 callers
Method
_interpolate_template
Interpolate a template string with given values
src/virtuals_sdk/twitter_agent/agent.py:85
↓ 5 callers
Method
create_api_url
Helper function to create full API URL with token
src/virtuals_sdk/twitter_agent/functions/telegram.py:37
↓ 5 callers
Function
post
API call to post data
src/virtuals_sdk/game/utils.py:22
↓ 4 callers
Method
create_api_url
Helper function to create full API URL with token
src/virtuals_sdk/twitter_agent/functions/discord.py:37
↓ 4 callers
Method
get_function_def
(self)
src/virtuals_sdk/game/custom_types.py:35
↓ 2 callers
Method
add_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 callers
Function
create_agent
API call to create an agent instance (worker or agent with task generator)
src/virtuals_sdk/game/utils.py:51
↓ 2 callers
Method
execute
Execute the function using arguments from GAME action.
src/virtuals_sdk/game/custom_types.py:43
↓ 2 callers
Function
get_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 callers
Method
react
React to a tweet
src/virtuals_sdk/twitter_agent/agent.py:243
↓ 2 callers
Method
run
(self)
src/virtuals_sdk/game/agent.py:245
↓ 2 callers
Method
toJson
(self)
src/virtuals_sdk/twitter_agent/agent.py:55
↓ 1 callers
Method
_create_add_reaction
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:96
↓ 1 callers
Method
_create_channel
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:197
↓ 1 callers
Method
_create_delete_message
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:224
↓ 1 callers
Method
_create_delete_message
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:163
↓ 1 callers
Method
_create_get_cast_reactions
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:280
↓ 1 callers
Method
_create_get_trending_casts
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:256
↓ 1 callers
Method
_create_get_user_casts
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:300
↓ 1 callers
Method
_create_like_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:147
↓ 1 callers
Method
_create_pin_message
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:184
↓ 1 callers
Method
_create_pin_message
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:133
↓ 1 callers
Method
_create_poll
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:138
↓ 1 callers
Method
_create_post_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:62
↓ 1 callers
Method
_create_post_to_channel
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:226
↓ 1 callers
Method
_create_recast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:123
↓ 1 callers
Method
_create_reply_to_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:93
↓ 1 callers
Method
_create_search_casts
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:323
↓ 1 callers
Method
_create_search_users
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:353
↓ 1 callers
Method
_create_send_media
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:93
↓ 1 callers
Method
_create_send_message
(self)
src/virtuals_sdk/twitter_agent/functions/telegram.py:58
↓ 1 callers
Method
_create_send_message
(self)
src/virtuals_sdk/twitter_agent/functions/discord.py:60
↓ 1 callers
Method
_create_unlike_cast
(self)
src/virtuals_sdk/twitter_agent/functions/farcaster.py:172
↓ 1 callers
Method
_get_action
( self, function_result: Optional[FunctionResult] = None )
src/virtuals_sdk/game/agent.py:140
↓ 1 callers
Method
_get_action
Gets the agent action from the GAME API
src/virtuals_sdk/game/worker.py:85
↓ 1 callers
Method
_prepare_request
Prepare the request configuration with interpolated values
src/virtuals_sdk/twitter_agent/agent.py:91
↓ 1 callers
Method
_validate_args
Validate and convert positional arguments to named arguments
src/virtuals_sdk/twitter_agent/agent.py:65
↓ 1 callers
Method
compile
Compile the workers for the agent - i.e. set up task generator
src/virtuals_sdk/game/agent.py:88
↓ 1 callers
Function
create_workers
API call to create workers and worker description for the task generator
src/virtuals_sdk/game/utils.py:75
↓ 1 callers
Method
deploy
Simulate the agent configuration
src/virtuals_sdk/twitter_agent/sdk.py:93
↓ 1 callers
Method
functions
Get all default functions
src/virtuals_sdk/twitter_agent/sdk.py:11
↓ 1 callers
Function
get_access_token
API call to get access token
src/virtuals_sdk/game/utils.py:5
↓ 1 callers
Method
get_worker_config
Get worker config from worker dict
src/virtuals_sdk/game/agent.py:124
↓ 1 callers
Method
list_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 callers
Method
set_task
Sets the task for the agent
src/virtuals_sdk/game/worker.py:65
↓ 1 callers
Method
simulate
Simulate the agent configuration
src/virtuals_sdk/twitter_agent/sdk.py:28
↓ 1 callers
Method
simulate_twitter
Simulate the agent configuration for Twitter
src/virtuals_sdk/twitter_agent/agent.py:230
↓ 1 callers
Method
step
(self)
src/virtuals_sdk/game/agent.py:182
↓ 1 callers
Method
step
Execute the next step in the task - requires a task ID (i.e. task ID)
src/virtuals_sdk/game/worker.py:123
↓ 1 callers
Method
use_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
Method
add_worker
Add worker to worker dict for the agent
src/virtuals_sdk/game/agent.py:119
Method
available_functions
Get list of available function names.
src/virtuals_sdk/twitter_agent/functions/farcaster.py:52
Method
available_functions
Get list of available function names.
src/virtuals_sdk/twitter_agent/functions/telegram.py:33
Method
available_functions
Get list of available function names.
src/virtuals_sdk/twitter_agent/functions/discord.py:33
Method
deploy_twitter
Deploy the agent configuration
src/virtuals_sdk/twitter_agent/agent.py:260
Method
export
Export the agent configuration as JSON string
src/virtuals_sdk/twitter_agent/agent.py:274
Function
get_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
Method
get_description
(self)
src/virtuals_sdk/twitter_agent/agent.py:199
Method
get_function
Get a specific function by name.
src/virtuals_sdk/twitter_agent/functions/farcaster.py:56
Method
get_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
Method
get_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
Method
get_goal
(self)
src/virtuals_sdk/twitter_agent/agent.py:196
Method
get_worker
Initialize a working interactable standalone worker
src/virtuals_sdk/game/agent.py:128
Function
get_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
Method
get_world_info
(self)
src/virtuals_sdk/twitter_agent/agent.py:202
Method
react
Simulate the agent configuration
src/virtuals_sdk/twitter_agent/sdk.py:52
Method
reset
(self)
src/virtuals_sdk/game/agent.py:13
Method
reset
Reset the agent session
src/virtuals_sdk/game/agent.py:115
Method
run
Gets the agent to complete the task on its own autonomously
src/virtuals_sdk/game/worker.py:161
Method
set_description
(self, description: str)
src/virtuals_sdk/twitter_agent/agent.py:180
Method
set_goal
(self, goal: str)
src/virtuals_sdk/twitter_agent/agent.py:176
Method
set_main_heartbeat
(self, main_heartbeat: int)
src/virtuals_sdk/twitter_agent/agent.py:188
Method
set_reaction_heartbeat
(self, reaction_heartbeat: int)
src/virtuals_sdk/twitter_agent/agent.py:192
Method
set_world_info
(self, world_info: str)
src/virtuals_sdk/twitter_agent/agent.py:184
Function
sit_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
Function
sit_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
Function
take_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
Function
take_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
Function
throw_fruit
Function to throw fruits.
examples/game/test_agent.py:112
Function
throw_furniture
Function to throw furniture.
examples/game/test_agent.py:125
Function
throw_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
Function
throw_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