diff --git a/README.md b/README.md index 48e26ee2..bb85bfa4 100644 --- a/README.md +++ b/README.md @@ -133,16 +133,15 @@ source .1env You may customize the agent's behaviour by setting these environment variables. -| Name | Type | Sample Value | Description | -| ---- | ---- | ------------ | ----------- | - -| `TOOLS_TO_PACKAGE_HASH` | `dict` | `"{"openai-gpt-3.5-turbo-instruct":"bafybeigz5brshryms5awq5zscxsxibjymdofm55dw5o6ud7gtwmodm3vmq","openai-gpt-3.5-turbo":"bafybeigz5brshryms5awq5zscxsxibjymdofm55dw5o6ud7gtwmodm3vmq","openai-gpt-4":"bafybeigz5brshryms5awq5zscxsxibjymdofm55dw5o6ud7gtwmodm3vmq"}"` | Tracks services for each tool packages. | -| `API_KEYS` | `dict` | `"{"openai":"dummy_api_key", "google_api_key":"dummy_api_key"}"` | Tracks API keys for each services. | -|`SERVICE_REGISTRY_ADDRESS`|`str` |`"0x9338b5153AE39BB89f50468E608eD9d764B755fD"` | Smart contract which registers the services. | -|`AGENT_REGISTRY_ADDRESS` |`str` |`"0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA"` | Smart contract which registers the agents. | -|`MECH_MARKETPLACE_ADDRESS`|`str` |`"0x4554fE75c1f5576c1d7F765B2A036c199Adae329"` | Marketplace for posting and delivering requests served by agent mechs. | -|`MECH_TO_SUBSCRIPTION` |`dict`|`"{"0x77af31De935740567Cf4fF1986D04B2c964A786a":{"tokenAddress":"0x0000000000000000000000000000000000000000","tokenId":"1"}}"`| Tracks mech's subscription details. | -|`MECH_TO_CONFIG` |`dict`|`"{"0xFf82123dFB52ab75C417195c5fDB87630145ae81":{"use_dynamic_pricing":false,"is_marketplace_mech":false}}"` | Tracks mech's config. | +| Name | Type | Sample Value | Description | +| -------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `TOOLS_TO_PACKAGE_HASH` | `dict` | `{"openai-gpt-3.5-turbo-instruct":"bafybeigz5brshryms5awq5zscxsxibjymdofm55dw5o6ud7gtwmodm3vmq","openai-gpt-3.5-turbo":"bafybeigz5brshryms5awq5zscxsxibjymdofm55dw5o6ud7gtwmodm3vmq","openai-gpt-4":"bafybeigz5brshryms5awq5zscxsxibjymdofm55dw5o6ud7gtwmodm3vmq"}` | Tracks services for each tool packages. | +| `API_KEYS` | `dict` | `{"openai":["dummy_api_key"], "google_api_key":["dummy_api_key"]}` | Tracks API keys for each service. | +| `SERVICE_REGISTRY_ADDRESS` | `str` | `"0x9338b5153AE39BB89f50468E608eD9d764B755fD"` | Smart contract which registers the services. | +| `AGENT_REGISTRY_ADDRESS` | `str` | `"0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA"` | Smart contract which registers the agents. | +| `MECH_MARKETPLACE_ADDRESS` | `str` | `"0x4554fE75c1f5576c1d7F765B2A036c199Adae329"` | Marketplace for posting and delivering requests served by agent mechs. | +| `MECH_TO_SUBSCRIPTION` | `dict` | `{"0x77af31De935740567Cf4fF1986D04B2c964A786a":{"tokenAddress":"0x0000000000000000000000000000000000000000","tokenId":"1"}}` | Tracks mech's subscription details. | +| `MECH_TO_CONFIG` | `dict` | `{"0xFf82123dFB52ab75C417195c5fDB87630145ae81":{"use_dynamic_pricing":false,"is_marketplace_mech":false}}` | Tracks mech's config. | The rest of the common environment variables are present in the [service.yaml](https://github.com/valory-xyz/mech/blob/main/packages/valory/services/mech/service.yaml), which are customizable too. diff --git a/docs/index.md b/docs/index.md index f0dfd5c3..8a6e2807 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,7 +7,7 @@ Mechs address a critical need in the agent ecosystem: the ability to outsource c ## How it works -A Mech service consists of a library of tools. These can range from something as simple as an API call to highly complex business logic. Some examples of tools can be found on [the `valory/customs` folder](https://github.com/valory-xyz/mech/tree/main/packages/valory/customs) of the first operational Mech service. +A Mech service consists of a library of tools. These can range from something as simple as an API call to highly complex business logic. Some examples of tools can be found on [the `valory/customs` folder](../packages/valory/customs/) of the first operational Mech service. For instance, if an agent service needs to perform a task requiring access to an API, instead of each operator having to manage their own keys, the service can make use of a Mech tool. Agents then only need to make a request to a Mech, which gets returned in the form of a deliver event. The agent can then use the deliver event to accomplish what it set out to do. Both the request and deliver events are executed on-chain and the associated data is stored on IPFS making them easily retrievable by agents or anyone else. diff --git a/packages/valory/customs/__init__.py b/packages/valory/customs/__init__.py new file mode 100644 index 00000000..63af233e --- /dev/null +++ b/packages/valory/customs/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------------