Skip to content

Commit

Permalink
deploy: 1ecfc7b
Browse files Browse the repository at this point in the history
  • Loading branch information
ASL-r committed Jul 10, 2024
1 parent dabd431 commit a96a3ec
Show file tree
Hide file tree
Showing 26 changed files with 105 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3fa6a9273d17e476b9c853cf984a8669
config: 97ceb09d98dbafff4c5641cc1eda049e
tags: 645f666f9bcd5a90fca523b33c5a78b7
12 changes: 6 additions & 6 deletions _sources/customize/client_configuration.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Client Configuration
#######################

When integrating a new client into the IoA platform, it is essential to configure the client's settings to ensure seamless communication and functionality within the existing system. This configuration process, known as client configuration, is necessary because each client may have unique requirements, data formats, and interaction protocols that must be aligned with the IoA platform's standards. Proper client configuration allows for the customization of parameters such as server, tool agent, and comm, ensuring that the new client can effectively interact with other components of the platform. Before introduce the configuration of parameters,
When integrating a new client into the IoA platform, it is essential to configure the client's settings to ensure seamless communication and functionality within the existing system. This configuration process, known as client configuration, is necessary because each client may have unique requirements, data formats, and interaction protocols that must be aligned with the IoA platform's standards. Proper client configuration allows for the customization of parameters related to server, agent, and communication approach, ensuring that the new client can effectively interact with other components of the platform. Before introduce the configuration of parameters,
it is necessary to create a folder and file for the client configuration.

* Create a folder named your_case_name under the :code:`configs/client_configs/cases` directory for your cases. For example: :code:`configs/client_configs/cases/example`
Expand All @@ -17,8 +17,8 @@ The server section is responsible for setting up the basic server configurations
.. code-block:: yaml
server:
port: SERVER_PORT (e.g. setting 7788 port in your server)
hostname: SERVER_IP (e.g. ioa-server)
port: SERVER_PORT (e.g. default 7788)
hostname: SERVER_IP (e.g. default ioa-server)
|
Expand All @@ -28,7 +28,7 @@ The tool_agent section defines the configuration for the tool agent itself and r

.. code-block:: yaml
tool_agent: s
tool_agent:
agent_type: ReAct
agent_name: tool agent name
desc: |-
Expand All @@ -45,12 +45,12 @@ The tool_agent section defines the configuration for the tool agent itself and r
Comm
==========================
The communication agent used for communicating and interacting with other agents and also for assigning tasks to the tool_agent.
The communication service client used for communicating and interacting with other clients and also for assigning tasks to the tool_agent.

.. code-block:: yaml
comm:
name: The name of the communication agent.
name: The name of the client.
desc: A description of the communication agent's capabilities.
type: The type of the communication agent. (Thing Assistant or Human Assistant)
support_nested teams: Indicates whether the agent supports nested teams. (true or false)
Expand Down
2 changes: 1 addition & 1 deletion _sources/customize/docker-compose_setup.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Create your case-specific :code:`your_case.yml` file in the :code:`dockerfiles/c
image: Specifies the Docker image to use for this service (e.g. ioa-client:latest)
build:
context: ../../
dockerfile: Specifies the Dockerfile to use for building the image(e.g. dockerfiles/client.Dockerfile)
dockerfile: dockerfiles/client.Dockerfile
container_name: the name of the Docker container
env_file:
- .env
Expand Down
4 changes: 1 addition & 3 deletions _sources/customize/goal_submission.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Goal Submission
#######################
When all agents' Docker containers are successfully configured, sending a POST request to the local server to initiate a goal is necessary process, enabling the IoA to accomplish specific goals. Goal submission serves as a critical startup mechanism to validate the IoA's functionality by setting specific tasks or objectives. By defining these goals, you ensure that the IoA and its integrated agents are working correctly and can effectively perform their intended tasks. This process is essential for verifying the system's capabilities and identifying any potential issues before deploying the IoA in a production environment. Before launching goal, you need to create a Python script.
After you have set up the server and client, you can send your goal to IoA. Before launching goal, you need to create a Python script.

* Create :code:`test_your_case.py` in the :code:`scripts` directory. For example, :code:`scripts/test_paper_writing.py`

Expand All @@ -20,7 +20,5 @@ The full URL :code:`url: "http://127.0.0.1:5050/launch_goal"` is used to send a
"goal": goal,
"max_turns": 20,
"team_member_names": [agent_1, agent_2] "(if you have no spcific team members, set it to None)""
"team_up_depth": "The depth of the nested team-up. Defaults to None.
"is_collaborative_planning_enabled (bool, optional)": "Whether the collaborative planning is enabled. Defaults to False."
},
)
26 changes: 13 additions & 13 deletions _sources/customize/integrate_thirdparty_agent.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ Here is a brief guide for integrating third-party agents. If you want to integra
* **Build and Expose a Docker Container**:

* **Containerization**: Package the third-party agent within a Docker container. This ensures a consistent and isolated environment for the agent to run.
* **Expose an API Interface**: Utilize FastAPI or another suitable web framework to expose a run interface externally. The interface should have the following specification:

* **run(task_desc)**: Executes the task_desc task from scratch and returns the result as a string.


* **Develop an Adapter for Integration**:

* **Data Format Conversion**: Write an adapter to facilitate communication between the third-party agent and IoA. This involves converting data formats to ensure compatibility. For instance, convert memory information in IoA, which uses :code:`LLMResult` from :code:`/types/llm.py`, into a format that the third-party agent can process.
* **Interface Invocation**: The adapter acts as an intermediary, invoking the API provided by the Docker container created in the first step. This ensures seamless interaction between IoA and the third-party agent.
* **Expose an API Interface**: Utilize FastAPI or another suitable web framework to expose a run interface externally. The interface should have the following specification:

* **run(task_desc)**: Executes the task_desc task from scratch and returns the result as a string.

You can review the implemented logic for the specific example, Open Interpreter, located at :code:`im_client/agents/open_interpreter`. The detailed explanation of this example is given in the following section.

Expand All @@ -27,29 +25,33 @@ Open Interpreter Integration
===============================
* **Building an HTTP service for Open Interpreter**:

* The Open Interpreter, located in the :code:`im_client/agents/open_interpreter` directory, will be dockerized. This directory includes FastAPI POST endpoints, which will be exposed as an HTTP service when started with Uvicorn. When deployed with Docker, these endpoints can be accessed externally.
* The Open Interpreter, located in the :code:`im_client/agents/open_interpreter/open_interpreter_agent.py` script, will be dockerized. This script includes FastAPI POST endpoints, which will be exposed as an HTTP service when started with Uvicorn. When deployed with Docker, these endpoints can be accessed externally.

* **Creating Docker for Open Interpreter**:

* Next, create a Dockerfile in the :code:`dockerfiles/tool_agents` directory. This Dockerfile ensures that tool agents like Open Interpreter can be started with Docker, preventing potential environment conflicts with IoA.

* **Building Adapter for Open Interpreter**:

* The adapter for Open Interpreter, also located in :code:`im_client/agents/open_interpreter` , facilitates data format conversion between IoA and Open Interpreter. It forwards requests to the Open Interpreter Docker container. The adapter provides a run method that converts data formats and sends a POST request to the corresponding endpoint of the Open Interpreter Docker container.
* The adapter for Open Interpreter, also located in :code:`im_client/agents/open_interpreter/open_interpreter_agent.py`, facilitates bridges the gap between the protocol of IoA and Open Interpreter. It converts and forwards requests to the Open Interpreter Docker container.

* **Building configuration file for Open Interpreter**:

* An example configuration file for Open Interpreter is located in :code:`configs/client_configs/cases/example/open_interpreter.yaml`. For the explanation of configuration parameters refers to `Client Configuration Section <client_configuration.html>`_.

|
Open Interpreter Docker Startup
=======================================
* Environment Variable Configuration:

* In the :code:`open_instruction.yml`, set up the environment variable :code:`CUSTOM_CONFIG` to specify the configuration file for the tool agent. Define the tool agent-related parameters in the file referenced by :code:`CUSTOM_CONFIG`. For example, the configuration file for Open Interpreter is:
* In the :code:`dockerfiles/compose/open_interpreter.yaml`, set up the environment variable :code:`CUSTOM_CONFIG` to specify the configuration file for the tool agent. Define the tool agent-related parameters in the file referenced by :code:`CUSTOM_CONFIG`. For example, the configuration file for Open Interpreter is:

.. code-block:: yaml
CUSTOM_CONFIG=configs/cases/open_instruction/open_interpreter.yaml
CUSTOM_CONFIG=configs/cases/open_interpreter.yaml
* In the :code:`dockerfiles/compose/.env_template`, ensuer to set up the necessary environment variable such as :code:`OPENAI_API_KEY`, :code:`OPENAI_RESPONSE_LOG_PATH`.
* In the :code:`dockerfiles/compose/.env`, ensuer to set up the necessary environment variable such as :code:`OPENAI_API_KEY`, :code:`OPENAI_RESPONSE_LOG_PATH`.

* Building and Running the Docker Container:

Expand All @@ -58,14 +60,12 @@ Open Interpreter Docker Startup
.. code-block:: bash
docker build -f dockerfiles/tool_agents/open_interpreter.Dockerfile -t open_interpreter:latest .
* Before starting the server, ensure to comment out the autogpt section in the open_instruction.yml file.
* Then, start the server and multiple communication agents by running:

.. code-block:: bash
docker-compose -f dockerfiles/open_instruction.yml up
docker-compose -f dockerfiles/open_interpreter.yml up
Expand Down
9 changes: 9 additions & 0 deletions _sources/customize/tool_creation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Tool Creation
Tool creation is necessary when you do not have your own agent but want to provide a custom tool that a ReAct agent or another existing agent can utilize to solve problems. This need arises when you have specialized tools or functionalities that can enhance the capabilities of an agent without the need to develop a full-fledged new agent. By integrating these tools, the ReAct agent can leverage them to perform specific tasks, thereby extending its problem-solving abilities and making it more versatile and effective in handling a broader range of scenarios. Before introduce the configuration of tools, it is necessary to create a yaml file and corresponding tool's Python file for the tool configuration.

* Create and complete the corresponding tool's Python implementation in :code:`im_client/agents/tools`. For example, :code:`im_client/agents/tools/code_executor.py`

* Import and Add the completed tool to the :code:`TOOL_MAPPING` in the :code:`im_client/agents/tools/__init__.py`, ensuring the tool is called successfully. For example:

.. code-block:: python
from . import arxiv_tools
TOOL_MAPPING = {
"arxiv_search": arxiv_tools.arxiv_search
}
* Create a file named :code:`tools_name.yaml` to serve as the configuration file for calling the tool by the tool agent. The format of all tools within the YAML file should adhere to the OpenAI function call format. For example, :code:`im_client/agents/react/tools_code_executor.yaml`.

Expand Down
4 changes: 2 additions & 2 deletions case/IOT_1.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
</a>
<div class="content-icon-container">
<div class="view-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/case/IOT_1.rst?plain=true" title="View this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/source/case/IOT_1.rst?plain=true" title="View this page">
<svg><use href="#svg-eye"></use></svg>
<span class="visually-hidden">View this page</span>
</a>
</div><div class="edit-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/case/IOT_1.rst" title="Edit this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/source/case/IOT_1.rst" title="Edit this page">
<svg><use href="#svg-pencil"></use></svg>
<span class="visually-hidden">Edit this page</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions case/IOT_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
</a>
<div class="content-icon-container">
<div class="view-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/case/IOT_2.rst?plain=true" title="View this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/source/case/IOT_2.rst?plain=true" title="View this page">
<svg><use href="#svg-eye"></use></svg>
<span class="visually-hidden">View this page</span>
</a>
</div><div class="edit-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/case/IOT_2.rst" title="Edit this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/source/case/IOT_2.rst" title="Edit this page">
<svg><use href="#svg-pencil"></use></svg>
<span class="visually-hidden">Edit this page</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions case/gaia.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
</a>
<div class="content-icon-container">
<div class="view-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/case/gaia.rst?plain=true" title="View this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/source/case/gaia.rst?plain=true" title="View this page">
<svg><use href="#svg-eye"></use></svg>
<span class="visually-hidden">View this page</span>
</a>
</div><div class="edit-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/case/gaia.rst" title="Edit this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/source/case/gaia.rst" title="Edit this page">
<svg><use href="#svg-pencil"></use></svg>
<span class="visually-hidden">Edit this page</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions case/open_instruction.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
</a>
<div class="content-icon-container">
<div class="view-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/case/open_instruction.rst?plain=true" title="View this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/source/case/open_instruction.rst?plain=true" title="View this page">
<svg><use href="#svg-eye"></use></svg>
<span class="visually-hidden">View this page</span>
</a>
</div><div class="edit-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/case/open_instruction.rst" title="Edit this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/source/case/open_instruction.rst" title="Edit this page">
<svg><use href="#svg-pencil"></use></svg>
<span class="visually-hidden">Edit this page</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions case/paper_writing.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
</a>
<div class="content-icon-container">
<div class="view-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/case/paper_writing.rst?plain=true" title="View this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/blob/main/docs/source/case/paper_writing.rst?plain=true" title="View this page">
<svg><use href="#svg-eye"></use></svg>
<span class="visually-hidden">View this page</span>
</a>
</div><div class="edit-this-page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/case/paper_writing.rst" title="Edit this page">
<a class="muted-link" href="https://github.com/OpenBMB/IoA/edit/main/docs/source/case/paper_writing.rst" title="Edit this page">
<svg><use href="#svg-pencil"></use></svg>
<span class="visually-hidden">Edit this page</span>
</a>
Expand Down
Loading

0 comments on commit a96a3ec

Please sign in to comment.