diff --git a/README.md b/README.md index 18503e0..655e380 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Virtuals Python SDK Library -The Virtuals Python SDK is a library that allows you interact with the Virtuals Platform. +The Virtuals Python SDK is a library that allows you to interact with the Virtuals Platform. ## About G.A.M.E. GAME is a modular agentic framework which enables an agent to plan actions and make decisions autonomously based on information provided to it. @@ -14,10 +14,10 @@ The python SDK is made up of 3 main components (Agent, Worker, function), each w Agent (a.k.a. [high level planner](https://whitepaper.virtuals.io/developer-documents/game-framework/game-overview#high-level-planner-hlp-context)) - Takes in a Goal - - Drives the agents behaviour through the high level plan which influences the thinking and creation of tasks that would contribute towards this goal + - Drives the agents behaviour through the high-level plan which influences the thinking and creation of tasks that would contribute towards this goal - Takes in a Description - Combination of what was previously known as World Info + Agent Description - - This include a description of the "world" the agent lives in, and the personality and background of the agent + - This includes a description of the "world" the agent lives in, and the personality and background of the agent Worker (a.k.a. [low-level planner](https://whitepaper.virtuals.io/developer-documents/game-framework/game-overview#low-level-planner-llp-context)) - Takes in a Description @@ -59,4 +59,4 @@ Detailed documentation to better understand the configurable components and the ## Useful Resources - [TypeScript SDK](https://www.npmjs.com/package/@virtuals-protocol/game): The core logic of this SDK mirrors the logic of this python SDK if you prefer to develop your agents in TypeScript. -- [Twitter Agent](./src/virtuals_sdk/twitter_agent/README.md): The Virtuals Platform offers a out-of-the-box hosted agent that can be used to interact with the Twitter/X platform, powered by GAME. This agent comes with existing functions/actions that can be used to interact with the Twitter/X platform and can be immediately hosted/deployed as you configure it. This is similar to configuring your agent in the [Agent Sandbox](https://game-lite.virtuals.io/) on the [Virtuals Platform](https://app.virtuals.io/) but through a developer-friendly SDK interface. \ No newline at end of file +- [Twitter Agent](./src/virtuals_sdk/twitter_agent/README.md): The Virtuals Platform offers a out-of-the-box hosted agent that can be used to interact with the Twitter/X platform, powered by GAME. This agent comes with existing functions/actions that can be used to interact with the Twitter/X platform and can be immediately hosted/deployed as you configure it. This is similar to configuring your agent in the [Agent Sandbox](https://game-lite.virtuals.io/) on the [Virtuals Platform](https://app.virtuals.io/) but through a developer-friendly SDK interface. diff --git a/examples/game/test_agent.py b/examples/game/test_agent.py index d2429ea..ec46d40 100644 --- a/examples/game/test_agent.py +++ b/examples/game/test_agent.py @@ -5,7 +5,7 @@ game_api_key="" -# the get_worker_state_fn and the get_agent_state_fn can be the same function or diffferent +# the get_worker_state_fn and the get_agent_state_fn can be the same function or different # each worker can also have a different get_worker_state_fn and maintain their own state # or they can share the same get_worker_state_fn and maintain the same state @@ -14,7 +14,7 @@ def get_worker_state_fn(function_result: FunctionResult, current_state: dict) -> 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 from the previous step. """ - # dict containing info about the function result as implemented in the exectuable + # dict containing info about the function result as implemented in the executable info = function_result.info # example of fixed state (function result info is not used to change state) - the first state placed here is the initial state @@ -32,7 +32,7 @@ def get_worker_state_fn(function_result: FunctionResult, current_state: dict) -> # at the first step, initialise the state with just the init state new_state = init_state else: - # do something wiht the current state input and the function result info + # do something with the current state input and the function result info new_state = init_state # this is just an example where the state is static return new_state @@ -58,7 +58,7 @@ def get_agent_state_fn(function_result: FunctionResult, current_state: dict) -> # at the first step, initialise the state with just the init state new_state = init_state else: - # do something wiht the current state input and the function result info + # do something with the current state input and the function result info new_state = init_state # this is just an example where the state is static return new_state @@ -203,4 +203,4 @@ def throw_furniture(object: str, **kwargs) -> Tuple[FunctionResultStatus, str, d # # compile and run the agent - if you don't compile the agent, the things you added to the agent will not be saved chaos_agent.compile() -chaos_agent.run() \ No newline at end of file +chaos_agent.run() diff --git a/examples/game/test_worker.py b/examples/game/test_worker.py index d8dd772..773b328 100644 --- a/examples/game/test_worker.py +++ b/examples/game/test_worker.py @@ -10,7 +10,7 @@ def get_state_fn(function_result: FunctionResult, current_state: dict) -> dict: 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 from the previous step. """ - # dict containing info about the function result as implemented in the exectuable + # dict containing info about the function result as implemented in the executable info = function_result.info # example of fixed state (function result info is not used to change state) - the first state placed here is the initial state @@ -28,7 +28,7 @@ def get_state_fn(function_result: FunctionResult, current_state: dict) -> dict: # at the first step, initialise the state with just the init state new_state = init_state else: - # do something wiht the current state input and the function result info + # do something with the current state input and the function result info new_state = init_state # this is just an example where the state is static return new_state @@ -112,4 +112,4 @@ def sit_on_object(object: str, **kwargs) -> Tuple[FunctionResultStatus, str, dic # interact and instruct the worker to do something # worker.run("what would you do to the apple?") -worker.run("take over the world with the things you have around you!") \ No newline at end of file +worker.run("take over the world with the things you have around you!") diff --git a/src/virtuals_sdk/game/README.md b/src/virtuals_sdk/game/README.md index 86973da..cc50eff 100644 --- a/src/virtuals_sdk/game/README.md +++ b/src/virtuals_sdk/game/README.md @@ -4,7 +4,7 @@ This library enables the creation of AI agents, in which actions are defined by the creator/developer. These agents can be used: - Worker Mode: to autonomously execute tasks through interaction with the agent. User interaction and tasks is required for the agent to execute tasks. For example, "Bring me some fruits and then go sit on the chair". -- Agent Mode: to autonomously function in an open-ended manner by just providing a general goal. The agent independently and continously decides tasks for itself in an open-ended manner, and attempts to complete them. +- Agent Mode: to autonomously function in an open-ended manner by just providing a general goal. The agent independently and continuously decides tasks for itself in an open-ended manner, and attempts to complete them. ## Core Features @@ -29,7 +29,7 @@ Executable functions must return a tuple of: ### 2. State Management -Easy and flexible wayto define the state management, what the agent sees and how that changes. +Easy and flexible way to define the state management, what the agent sees and how that changes. ```python def get_state_fn(function_result: FunctionResult, current_state: dict) -> dict: @@ -56,7 +56,7 @@ Key features: - Processes function execution results to update state ### 3. Workers -Workers are simple interactiable agents that exectue the tasks defined by the user. They can be specialized agents with defined capabilities: +Workers are simple interactable agents that execute the tasks defined by the user. They can be specialized agents with defined capabilities: ```python worker = Worker( diff --git a/src/virtuals_sdk/twitter_agent/README.md b/src/virtuals_sdk/twitter_agent/README.md index 6c0d096..8a2ed62 100644 --- a/src/virtuals_sdk/twitter_agent/README.md +++ b/src/virtuals_sdk/twitter_agent/README.md @@ -124,7 +124,7 @@ agent.deploy_twitter() ``` ## Build on other platforms using GAME -`simulate_twitter` and `deploy_twitter` runs through the entire GAME stack from HLP → LLP→ action/function selected. However, these agent functionalities are currently for the Twitter/X platform. You may utilize Task-based Agent with Low-Level Planner and Reaction Module to develop applications that are powered by GAME. The Low Level Planner (LLP) of the agent (please see [documentation](https://www.notion.so/1592d2a429e98016b389ea26b53686a3?pvs=21) for more details on GAME and LLP) can separately act as a decision making engine based on a task description and event occurring. This agentic architecture is simpler but also sufficient for many applications. +`simulate_twitter` and `deploy_twitter` runs through the entire GAME stack from HLP → LLP→ action/function selected. However, these agent functionalities are currently for the Twitter/X platform. You may utilize Task-based Agent with Low-Level Planner and Reaction Module to develop applications that are powered by GAME. The Low-Level Planner (LLP) of the agent (please see [documentation](https://www.notion.so/1592d2a429e98016b389ea26b53686a3?pvs=21) for more details on GAME and LLP) can separately act as a decision making engine based on a task description and event occurring. This agentic architecture is simpler but also sufficient for many applications. We are releasing this simpler setup as a more generalised/platform agnostic framework (not specific to Twitter/X). The entire GAME stack along with the HLP will be opened up to be fully configurable and platform agnostic in the coming weeks. @@ -168,7 +168,7 @@ With this SDK and function structure, importing and sharing functions is also po ```python from virtuals_sdk.functions.telegram import TelegramClient -# define your token so that it can attach it to create the correspodning functions +# define your token so that it can attach it to create the corresponding functions tg_client = TelegramClient(bot_token="xxx") print(tg_client.available_functions) @@ -186,4 +186,4 @@ pin_message_fn("xxxxxxxx", "xx", "True") agent.add_custom_function(reply_message_fn) agent.add_custom_function(create_poll_fn) agent.add_custom_function(pin_message_fn) -``` \ No newline at end of file +```