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
TEE Logging is a feature that allows you to log the activities of your agents. Through these logs, you can verify that the actions of the agents are protected by the TEE and that they are executed autonomously by Eliza, without any third-party interference.
50
+
51
+
## Setup
52
+
53
+
You need to setup the TEE log plugin first. Follow the [TEE Log Plugin](../plugin-tee-log/README.md) to setup the plugin.
54
+
55
+
## Get all TEE agents Information
56
+
57
+
```bash
58
+
curl -X GET --location "http://localhost:3000/tee/agents"
Note that the user report included in the attestation contains the SHA256 hash of the value of the "agents" field. Specifically, it is calculated as follows: `SHA256(JSON.stringify(agents value))`. By verifying the attestation, you can retrieve this hash value and ensure the integrity of the agents' information.
80
+
81
+
82
+
Example response when error:
83
+
84
+
```json
85
+
{
86
+
"error": "Failed to get TEE agents"
87
+
}
88
+
```
89
+
90
+
## Get TEE agent Information by agentId
91
+
92
+
```bash
93
+
curl -X GET --location "http://localhost:3000/tee/agents/75490f32-c06a-0005-9804-339453d3fe2f"
Note that the user report included in the attestation contains the SHA256 hash of the value of the "agent" field. Specifically, it is calculated as follows: `SHA256(JSON.stringify(agent value))`. By verifying the attestation, you can retrieve this hash value and ensure the integrity of the agent's information.
113
+
114
+
Example response when error:
115
+
116
+
```json
117
+
{
118
+
"error": "Failed to get TEE agent"
119
+
}
120
+
```
121
+
122
+
## Get TEE log
123
+
124
+
```bash
125
+
curl -X POST --location "http://localhost:3000/tee/logs" \
126
+
-H "Content-Type: application/json" \
127
+
-d '{
128
+
"query": {
129
+
"agentId": "75490f32-c06a-0005-9804-339453d3fe2f"
130
+
},
131
+
"page": 1,
132
+
"pageSize": 10
133
+
}'
134
+
```
135
+
136
+
There are optional parameters in the `query` parameter:
137
+
138
+
-**agentId**: (string, optional) The ID of the agent whose logs you want to retrieve.
139
+
-**roomId**: (string, optional) The ID of the room associated with the logs.
140
+
-**userId**: (string, optional) The ID of the user related to the logs.
141
+
-**type**: (string, optional) The type of logs to filter.
142
+
-**containsContent**: (string, optional) A substring to search for within the log content.
143
+
-**startTimestamp**: (number, optional) The starting timestamp for filtering logs.
144
+
-**endTimestamp**: (number, optional) The ending timestamp for filtering logs.
Note that the user report included in the attestation contains the SHA256 hash of the value of the "logs" field. Specifically, it is calculated as follows: `SHA256(JSON.stringify(logs value))`. By verifying the attestation, you can retrieve this hash value and ensure the integrity of the logs
0 commit comments