You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ You can access the deployed service here: [Autonomous Agent Testing](https://age
26
26
3.**`agent-node`**: Agent responsible for executing various functions.
27
27
4.**`frontend`**: User interface for autonomous agent testing.
28
28
5.**`dbsync-api`**: Service for interacting with the dbsync database.
29
+
---
29
30
30
31
### Using Docker
31
32
@@ -51,7 +52,7 @@ Before running the entire service locally using Docker, create `.env` files from
51
52
52
53
##### DBSync
53
54
54
-
-**`DBSYNC_DATABASE_URL`**: URL for the dbsync database.
55
+
-**`DBSYNC_DATABASE_URL`**: URL for the `dbsync-api service`. Default running on `http://localhost:9000` on starting `dbsync-api` service.
55
56
56
57
##### Docker Network Name
57
58
@@ -89,6 +90,7 @@ To run in `Preprod` or `Preview` networks, update the following environment vari
89
90
##### DBSync
90
91
91
92
-**`DBSYNC_DATABASE_URL`**: Update the URL and database name accordingly.
93
+
---
92
94
93
95
#### Starting the Service
94
96
@@ -100,7 +102,7 @@ docker compose -f docker-compose.dev.yml up -d
100
102
101
103
> **Note:** Ensure no applications are running on ports `3000` and `8000`.
102
104
103
-
#### Running the Agent
105
+
#### Finally Running the Agent
104
106
105
107
1. Visit the frontend at `http://localhost:3000` and connect your wallet.
106
108
2. Navigate to the `My Agent` tab in the bottom left to access the `Agents Page`.
@@ -111,12 +113,18 @@ docker compose -f docker-compose.dev.yml up -d
111
113
112
114
### Local Setup
113
115
114
-
Each service has its own setup guide within its respective directory. For running all services locally, dependencies like `Kafka` and `PostgreSQL` can be run via Docker using the following command:
116
+
Each service has its own setup guide within its respective directory.
115
117
116
118
1.[Backend](api/README.md)
117
119
2.[Agent Manager](agent-manager/README.md)
118
120
3.[Agent](agent-node/README.md)
119
121
4.[Frontend](frontend/README.md)
122
+
5.[DbSync-Api](dbsync-api/README.md)
123
+
124
+
**`Note`**: For running all services locally, dependencies like `Kafka` and `PostgreSQL` can be run via Docker using the following command:
@@ -31,42 +30,73 @@ This project is a TypeScript Agent Manager application where Agents are connecte
31
30
32
31
## Usage
33
32
34
-
Copy the env variables form `.env.example` to `.env` and update the env variables.
33
+
Create new file `.env` and copy env variables form `.env.example` to `.env` and update the env variables.
35
34
36
-
Make sure to run the following command to generate the database client and creating the required table mentioned in schema
35
+
#### Setup environment variables
37
36
38
-
```bash
39
-
yarn prisma generate
40
-
```
37
+
#### Kafka Configuration
41
38
42
-
### Development Mode
39
+
- **`KAFKA_CONSUMER_GROUP`**: Kafka consumer group name.
40
+
- **`CLIENT_ID`**: Unique client ID for Kafka.
41
+
- **`KAFKA_PREFIX`**: Prefix for Kafka topics.
42
+
- **`KAFKA_BROKERS`**: Kafka broker URL. Specify either a locally running Kafka URL (e.g., on Docker) or a deployed Kafka service URL.
43
43
44
-
To run the application in dev mode run the following command
44
+
#### Cardano Configuration
45
45
46
-
```shell
47
-
yarn dev
48
-
```
46
+
- **`CARDANO_NODE_URL`**: `172.31.0.4:3004` - URL for the Cardano node.
47
+
- **`KUBER_BASE_URL`**: `'https://sanchonet.kuber.cardanoapi.io'` - Base URL for Kuber's Cardano API.
48
+
- **`KUBER_API_KEY`**: API key for accessing Kuber services. Generate an API key from [KuberIde](https://kuberide.com/kuber/settings/api-keys).
49
+
- **`METADATA_BASE_URL`**: Metadata URL to fetch information about dReps and proposals across different networks. (Default provided in `.env.example`)
50
+
- **`DB_SYNC_BASE_URL`**: URL for the `dbsync-api service`. Default running on `http://localhost:9000` on starting `dbsync-api` service.
51
+
- **`CARDANO_NETWORK_MAGIC`**: `4` - Network magic for the Cardano testnet(Sanchonet).
52
+
- **`BLOCKFROST_API_KEY`** (Optional): API key for accessing the Blockfrost API. (Required if `ENABLE_BLOCKFROST_SUBMIT_API` is enabled): Obtain from [Blockfrost](https://blockfrost.io/).
> **Note:** If `ENABLE_BLOCKFROST_SUBMIT_API` is not enabled, transactions will be submitted using `Kuber`, which may take a few minutes.
49
55
50
-
### Production Mode
56
+
#### Wallet Configuration
51
57
52
-
To run the Agent Manager application, follow these steps:
58
+
- **`MANAGER_WALLET_ADDRESS`** (Optional): Wallet address with sufficient ADA for transfers.
59
+
- **`MANAGER_WALLET_SIGNING_KEY`** (Optional): Signing key for the manager wallet.
60
+
- **`FAUCET_API_KEY`** (Optional): API key to load ADA for agent transfers if the manager wallet lacks sufficient funds.
61
+
- **`AGENT_MNEMONIC`**: Seed phrase used to generate a wallet.
53
62
54
-
1. Build the application using the following command:
63
+
#### Database Configuration
55
64
56
-
```shell
57
-
yarn build
58
-
```
65
+
- **`DATABASE_URL`**: PostgreSQL database URL. Specify either a local Docker-based database or a deployed database URL.
59
66
60
-
This will compile the TypeScript files into JavaScript and place the output in the `dist` directory.
67
+
#### Server Configuration
61
68
62
-
2. Run the application with an agent ID as a command-line argument:
69
+
- **`SERVER_PORT`** (OPTIONAL): `3002` - Port number for the server. (Default port is 3001)
70
+
- **`NETWORK_NAME`**: `sanchonet` - Name of the Cardano network.
63
71
64
-
```shell
65
-
yarn start
66
-
```
72
+
After updating environment variables make sure to run the following command to generate the database client and creating the required table mentioned in schema
67
73
68
-
Make sure your API service is up and running .
74
+
```bash
75
+
yarn prisma generate
76
+
```
69
77
70
-
If successful a server listening on port `3000` will be running:
78
+
Now finally run the below command to start the manager:
79
+
80
+
```bash
81
+
yarn dev
82
+
```
83
+
84
+
If successful a server listening on mentioned PORT will be running:
71
85
72
86
> http://localhost:3001
87
+
88
+
## Running in `Preprod` or `Preview` Networks
89
+
90
+
To run in `Preprod` or `Preview` networks, update the following environment variables:
91
+
92
+
- **`DB_SYNC_BASE_URL`**:
93
+
- `https://preprod-dbync.agents.cardanoapi.io/api` for `preprod`
94
+
- `https://preview-dbync.agents.cardanoapi.io/api` for `preview`
95
+
- **`KUBER_BASE_URL`**:
96
+
- `https://preview.kuber.cardanoapi.io` for `preview`
97
+
- `https://preprod.kuber.cardanoapi.io` for `preprod`
98
+
- **`CARDANO_NETWORK_MAGIC`**:
99
+
- `3` for `preview`
100
+
- `2` for `preprod`
101
+
- **`BLOCKFROST_API_KEY`**: Obtain from [Blockfrost](https://blockfrost.io/) for the desired network.
102
+
- **`NETWORK_NAME`**: Set to `preprod` or `preview`.
Copy file name to clipboardExpand all lines: agent-node/README.md
+12-37Lines changed: 12 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,61 +2,36 @@
2
2
3
3
This project is a TypeScript client application that connects to a server via WebSocket and processes configurations sent by the server. It can schedule and trigger functions based on received configurations.
4
4
5
-
## Table of Contents
6
-
7
-
-[Requirements](#requirements)
8
-
-[Installation](#installation)
9
-
-[Usage](#usage)
10
-
-[Development](#development)
11
-
12
5
## Requirements
13
6
14
7
-[Node.js](https://nodejs.org/) (v18.18.0 or higher)
2. Create new file `.env` and copy env variables form `.env.example` to `.env` and update the env variables.
33
23
34
24
### Setting up environment variables
35
25
36
-
Copy environment variables from `.env.example` to `.env` and update them as necessary.
26
+
- **`TOKEN`**: Run the frontend and visit `My Agent` tab from left bottom section of the page. Then click `Run Agent` button on top right of the `Agent Overview` section. Copy the token part only and paste it in env.
27
+
- **`WS_URL`**: `agent-manager` websocket url . Default on `ws://localhost:3001'
37
28
38
-
>**Note**: AGENT_ID if the ID of the agent created with API.
29
+
**`Note`** - Remember to add `ws` as protocol in `WS_URL` instead of `http`.
39
30
40
-
### Development Mode
31
+
Copy environment variables from `.env.example` to `.env` and update them as necessary.
41
32
42
-
To run the application in dev mode run the following command
33
+
Finally run the agent by running below command.
43
34
44
35
```shell
45
-
yarn dev
36
+
yarn dev
46
37
```
47
-
48
-
### Production Mode
49
-
50
-
1. Build the application using the following command:
51
-
52
-
```shell
53
-
yarn build
54
-
```
55
-
56
-
This will compile the TypeScript files into JavaScript and place the output in the `dist` directory.
57
-
58
-
2. Run the application with an agent ID as a command-line argument:
0 commit comments