Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: README env table formatting #271

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
18 changes: 18 additions & 0 deletions packages/valory/customs/__init__.py
Original file line number Diff line number Diff line change
@@ -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.
#
# ------------------------------------------------------------------------------
Loading