-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.http
More file actions
86 lines (74 loc) · 2.01 KB
/
Copy pathagent.http
File metadata and controls
86 lines (74 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
GET http://localhost:8080/a2a/travel/.well-known/agent-card.json
### Flights are public
POST http://localhost:8080/a2a/travel
Content-Type: application/json
A2A-Version: 1.0
{
"jsonrpc": "2.0",
"id": "e92b3b43-9414-49c2-ac8d-5be4d1d4cb92",
"method": "SendMessage",
"params": {
"message": {
"role": "ROLE_USER",
"parts": [
{
"text": "Show me flights from Frankfurt to any location at any time"
}
],
"messageId": "c4af85a6-4462-429c-971c-e56185134bfd"
}
}
}
### Travels are restricted to authenticated users
POST http://localhost:8080/a2a/travel
Content-Type: application/json
Authorization: Basic authenticated:
A2A-Version: 1.0
{
"jsonrpc": "2.0",
"id": "e92b3b43-9414-49c2-ac8d-5be4d1d4cb92",
"method": "SendMessage",
"params": {
"message": {
"role": "ROLE_USER",
"parts": [
{
"text": "List me a few available travels"
}
],
"messageId": "c4af85a6-4462-429c-971c-e56185134bfd"
}
}
}
### Travel Edits are restricted to admin users
POST http://localhost:8080/a2a/travel
Content-Type: application/json
Authorization: Basic admin:
A2A-Version: 1.0
{
"jsonrpc": "2.0",
"id": "e92b3b43-9414-49c2-ac8d-5be4d1d4cb92",
"method": "SendMessage",
"params": {
"message": {
"role": "ROLE_USER",
"parts": [
{
"text": "Update the description of travel with ID 4132 to 'Vacation to San Francisco' and list me other information about that travel"
}
],
"messageId": "c4af85a6-4462-429c-971c-e56185134bfd"
}
}
}
### List Tasks
POST http://localhost:8080/a2a/travel
Content-Type: application/json
Authorization: Basic admin:
A2A-Version: 1.0
{
"jsonrpc": "2.0",
"id": "e92b3b43-9414-49c2-ac8d-5be4d1d4cb92",
"method": "ListTasks",
"params": {}
}