Create a profile
curl --request POST \
--url https://api.matrices.com/v1/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configuration": {
"models": [
"anthropic/claude-sonnet*"
],
"systemPrompt": "<string>",
"hooks": [
{
"id": "<string>",
"processor": {
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"path": "<string>",
"value": "<unknown>"
}
]
},
"timeoutMs": 123
}
],
"roleIds": [
"<string>"
]
},
"name": "<string>",
"description": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {
models: ['anthropic/claude-sonnet*'],
systemPrompt: '<string>',
hooks: [
{
id: '<string>',
processor: {agentId: '<string>', url: '<string>'},
asyncTimeoutMs: 123,
match: {tools: ['<string>'], where: [{path: '<string>', value: '<unknown>'}]},
timeoutMs: 123
}
],
roleIds: ['<string>']
},
name: '<string>',
description: '<string>'
})
};
fetch('https://api.matrices.com/v1/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/profiles"
payload = {
"configuration": {
"models": ["anthropic/claude-sonnet*"],
"systemPrompt": "<string>",
"hooks": [
{
"id": "<string>",
"processor": {
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": ["<string>"],
"where": [
{
"path": "<string>",
"value": "<unknown>"
}
]
},
"timeoutMs": 123
}
],
"roleIds": ["<string>"]
},
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/profiles"
payload := strings.NewReader("{\n \"configuration\": {\n \"models\": [\n \"anthropic/claude-sonnet*\"\n ],\n \"systemPrompt\": \"<string>\",\n \"hooks\": [\n {\n \"id\": \"<string>\",\n \"processor\": {\n \"agentId\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"asyncTimeoutMs\": 123,\n \"match\": {\n \"tools\": [\n \"<string>\"\n ],\n \"where\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"timeoutMs\": 123\n }\n ],\n \"roleIds\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"profile": {
"agentCount": 123,
"configuration": {
"hooks": [
{
"id": "<string>",
"point": "before_turn_start",
"processor": {
"type": "url",
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
},
"onFailure": "fail_closed",
"timeoutMs": 123
}
],
"models": [
"anthropic/claude-sonnet*"
],
"roleIds": [
"<string>"
],
"systemPrompt": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"workspaceId": "<string>"
}
}{
"profile": {
"agentCount": 123,
"configuration": {
"hooks": [
{
"id": "<string>",
"point": "before_turn_start",
"processor": {
"type": "url",
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
},
"onFailure": "fail_closed",
"timeoutMs": 123
}
],
"models": [
"anthropic/claude-sonnet*"
],
"roleIds": [
"<string>"
],
"systemPrompt": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"workspaceId": "<string>"
}
}{
"operation": {
"action": "<string>",
"agentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "pending",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"result": {
"status": 349,
"body": "<unknown>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Agent profiles
Create a profile
POST
/
v1
/
profiles
Create a profile
curl --request POST \
--url https://api.matrices.com/v1/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configuration": {
"models": [
"anthropic/claude-sonnet*"
],
"systemPrompt": "<string>",
"hooks": [
{
"id": "<string>",
"processor": {
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"path": "<string>",
"value": "<unknown>"
}
]
},
"timeoutMs": 123
}
],
"roleIds": [
"<string>"
]
},
"name": "<string>",
"description": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {
models: ['anthropic/claude-sonnet*'],
systemPrompt: '<string>',
hooks: [
{
id: '<string>',
processor: {agentId: '<string>', url: '<string>'},
asyncTimeoutMs: 123,
match: {tools: ['<string>'], where: [{path: '<string>', value: '<unknown>'}]},
timeoutMs: 123
}
],
roleIds: ['<string>']
},
name: '<string>',
description: '<string>'
})
};
fetch('https://api.matrices.com/v1/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/profiles"
payload = {
"configuration": {
"models": ["anthropic/claude-sonnet*"],
"systemPrompt": "<string>",
"hooks": [
{
"id": "<string>",
"processor": {
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": ["<string>"],
"where": [
{
"path": "<string>",
"value": "<unknown>"
}
]
},
"timeoutMs": 123
}
],
"roleIds": ["<string>"]
},
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/profiles"
payload := strings.NewReader("{\n \"configuration\": {\n \"models\": [\n \"anthropic/claude-sonnet*\"\n ],\n \"systemPrompt\": \"<string>\",\n \"hooks\": [\n {\n \"id\": \"<string>\",\n \"processor\": {\n \"agentId\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"asyncTimeoutMs\": 123,\n \"match\": {\n \"tools\": [\n \"<string>\"\n ],\n \"where\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"timeoutMs\": 123\n }\n ],\n \"roleIds\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"profile": {
"agentCount": 123,
"configuration": {
"hooks": [
{
"id": "<string>",
"point": "before_turn_start",
"processor": {
"type": "url",
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
},
"onFailure": "fail_closed",
"timeoutMs": 123
}
],
"models": [
"anthropic/claude-sonnet*"
],
"roleIds": [
"<string>"
],
"systemPrompt": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"workspaceId": "<string>"
}
}{
"profile": {
"agentCount": 123,
"configuration": {
"hooks": [
{
"id": "<string>",
"point": "before_turn_start",
"processor": {
"type": "url",
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
},
"onFailure": "fail_closed",
"timeoutMs": 123
}
],
"models": [
"anthropic/claude-sonnet*"
],
"roleIds": [
"<string>"
],
"systemPrompt": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"workspaceId": "<string>"
}
}{
"operation": {
"action": "<string>",
"agentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "pending",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"result": {
"status": 349,
"body": "<unknown>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
APIKeyBearerAgentLeaseBearer
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Replayed profile creation.
Show child attributes
Show child attributes