Agents
Your agents' signing keys and their TheWavly Score, built from your own records. The score's method is published at /score.
/v1/agentsGET/v1/score/methodGET/v1/agents/{agent}/scoreGET/v1/agents/{agent}/keysPOST/v1/agents/{agent}/keysPOST/v1/agents/{agent}/keys/{kid}/revokeList agents with their TheWavly Score
GET/v1/agentsSecret key · scope agents:read
Returns
| Field | Type | Description |
|---|---|---|
object required | "list" | |
data required | array of object | |
has_more required | boolean |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/agents \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/agents");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/agents"){
"object": "list",
"data": [
{
"object": "agent_score",
"agent": "grocer-assistant",
"score": 1
}
],
"has_more": true
}The TheWavly Score method: weights, prior, window and confidence levels (public)
GET/v1/score/methodPublic · no key needed
Returns
| Field | Type | Description |
|---|---|---|
method | string | |
window_days | integer | |
prior_checks | integer | |
weights | object | |
confidence | object | |
formula | string |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/score/methodimport { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/score/method");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/score/method"){
"method": "method",
"window_days": 1,
"prior_checks": 1
}An agent's TheWavly Score and track record
GET/v1/agents/{agent}/scoreSecret key · scope agents:read
Parameters
| Name | In | Description |
|---|---|---|
agent required | path | Your name for the agentpattern ^[A-Za-z0-9][\w.:-]{0,79}$ |
Returns
| Field | Type | Description |
|---|---|---|
object | "agent_score" | |
agent | string | |
score | integer | min 0, max 100 |
confidence | "low" | "medium" | "high" | |
track_record | object | |
explanation | string |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/agents/grocer-assistant/score \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/agents/grocer-assistant/score");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/agents/grocer-assistant/score"){
"agent": "grocer-assistant"
}List an agent's signing keys
GET/v1/agents/{agent}/keysSecret key · scope agents:read
Parameters
| Name | In | Description |
|---|---|---|
agent required | path | Your name for the agentpattern ^[A-Za-z0-9][\w.:-]{0,79}$ |
Returns
| Field | Type | Description |
|---|---|---|
object required | "list" | |
data required | array of object | |
has_more required | boolean |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/agents/grocer-assistant/keys \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/agents/grocer-assistant/keys");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/agents/grocer-assistant/keys"){
"object": "list",
"data": [
{
"object": "agent_key",
"kid": "kid",
"agent": "grocer-assistant"
}
],
"has_more": true
}Register an agent's public key
POST/v1/agents/{agent}/keysSecret key · scope agents:write
Parameters
| Name | In | Description |
|---|---|---|
agent required | path | Your name for the agentpattern ^[A-Za-z0-9][\w.:-]{0,79}$ |
Request body
| Field | Type | Description |
|---|---|---|
jwk required | object | Ed25519 (OKP) or P-256 (EC) public JWK |
label | string |
Returns
| Field | Type | Description |
|---|---|---|
object | "agent_key" | |
kid | string | |
agent | string | |
alg | "EdDSA" | "ES256" | |
status | "active" | "revoked" | |
jwk | object |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl -X POST https://thewavly.com/v1/agents/grocer-assistant/keys \
-H "Authorization: Bearer $WAVLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jwk": {},
"label": "production"
}'import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("POST", "/v1/agents/grocer-assistant/keys", {
"jwk": {},
"label": "production"
});from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("POST", "/v1/agents/grocer-assistant/keys", {
"jwk": {},
"label": "production"
}){
"agent": "grocer-assistant",
"status": "paid"
}Revoke an agent key
POST/v1/agents/{agent}/keys/{kid}/revokeSecret key · scope agents:write
Parameters
| Name | In | Description |
|---|---|---|
agent required | path | Your name for the agentpattern ^[A-Za-z0-9][\w.:-]{0,79}$ |
kid required | path | Key id (RFC 7638 thumbprint)pattern ^[\w-]{20,64}$ |
Returns
| Field | Type | Description |
|---|---|---|
object | "agent_key" | |
kid | string | |
agent | string | |
alg | "EdDSA" | "ES256" | |
status | "active" | "revoked" | |
jwk | object |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl -X POST https://thewavly.com/v1/agents/grocer-assistant/keys/Zx81kLmQp0aBcdEfGhIj/revoke \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("POST", "/v1/agents/grocer-assistant/keys/Zx81kLmQp0aBcdEfGhIj/revoke");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("POST", "/v1/agents/grocer-assistant/keys/Zx81kLmQp0aBcdEfGhIj/revoke"){
"agent": "grocer-assistant",
"status": "paid"
}