Skip to content

Commit a560719

Browse files
committed
feat: Add H2A profile as a secure human-to-agent extension to A2A
1 parent 18998ab commit a560719

File tree

4 files changed

+183
-0
lines changed

4 files changed

+183
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"messages": [
3+
{
4+
"role": "user",
5+
"parts": [
6+
{
7+
"type": "data",
8+
"data": {
9+
"h2a": {
10+
"user_input": {
11+
"type": "text",
12+
"value": "I'd like to find a new doctor in my area"
13+
},
14+
"interaction_goals": [
15+
"provider_search"
16+
],
17+
"_acl": {
18+
"user_input": [
19+
"agent-finder"
20+
],
21+
"user_location": [
22+
"agent-maps"
23+
],
24+
"user_email": "public"
25+
},
26+
"_sig": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9..."
27+
}
28+
}
29+
}
30+
]
31+
}
32+
]
33+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"h2a": {
3+
"user_input": {
4+
"type": "text",
5+
"value": "I'd like to find a new doctor in my area"
6+
},
7+
"interaction_goals": [
8+
"provider_search",
9+
"followup"
10+
],
11+
"_acl": {
12+
"user_input": [
13+
"agent-healthfinder"
14+
],
15+
"user_zipcode": [
16+
"agent-healthfinder",
17+
"agent-geolocation"
18+
],
19+
"user_preferences": "public"
20+
},
21+
"_sig": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9..."
22+
}
23+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# H2A Profile: Human-to-Agent Interaction Extension for A2A
2+
3+
**Status**: Draft Proposal
4+
**Author(s)**: Ushur Team
5+
**Purpose**: Introduce a minimal and secure extension for human-agent intent encoding within the A2A ecosystem.
6+
7+
## Motivation
8+
9+
While A2A facilitates interoperable agent-to-agent collaboration, there is currently no formalized structure for capturing and securely transmitting **human-originated intent**, constraints, or privacy preferences.
10+
11+
This proposal defines a **Human-to-Agent (H2A) Profile** — a lightweight JSON structure that can be embedded in A2A task messages and routed via existing agent mechanisms, while:
12+
13+
- Ensuring **field-level access control**
14+
- Guaranteeing **authenticity** via message signing
15+
- Supporting **goal-driven routing** of user intent
16+
17+
## Spec Summary
18+
19+
An `h2a` object consists of:
20+
21+
| Field | Type | Description |
22+
|-------------------|----------|-------------|
23+
| `user_input` | object | Human's input (text, form, etc.) |
24+
| `interaction_goals` | array | List of routing hints or desired outcomes |
25+
| `_acl` | object | Access control map: field → [agent IDs] |
26+
| `_sig` | string | JWS-style signature over `h2a` payload |
27+
28+
## Example Usage
29+
30+
```json
31+
{
32+
"messages": [
33+
{
34+
"role": "user",
35+
"parts": [
36+
{
37+
"type": "data",
38+
"data": {
39+
"h2a": {
40+
"user_input": {
41+
"type": "text",
42+
"value": "I need to update my address"
43+
},
44+
"interaction_goals": ["address_change", "confirmation"],
45+
"_acl": {
46+
"user_input": ["agent-1", "agent-2"],
47+
"user_situation": ["agent-1"],
48+
"user_expectations": "public"
49+
},
50+
"_sig": "JWS-signature-of-above"
51+
}
52+
}
53+
}
54+
]
55+
}
56+
]
57+
}
58+
```
59+
60+
## Proposed Agent Roles
61+
62+
- **Edge Agent**: Captures H2A message, applies `_acl`, signs the packet.
63+
- **Router Agent**: Validates `_sig`, enforces `_acl`, routes to appropriate agent(s).
64+
- **Business Agent**: Handles task logic and responds via A2A channels.
65+
66+
## Benefits
67+
68+
- **Minimal**: Adds only what A2A doesn’t already cover.
69+
- **Secure**: Built-in signature mechanism for zero-trust routing environments.
70+
- **Compositional**: Can be embedded in existing A2A flows without schema breakage.
71+
72+
## Next Steps
73+
74+
We invite discussion and comments. Reference implementation under way.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "H2A Payload",
4+
"type": "object",
5+
"properties": {
6+
"user_input": {
7+
"type": "object",
8+
"properties": {
9+
"type": {
10+
"type": "string"
11+
},
12+
"value": {
13+
"type": "string"
14+
}
15+
},
16+
"required": [
17+
"type",
18+
"value"
19+
]
20+
},
21+
"interaction_goals": {
22+
"type": "array",
23+
"items": {
24+
"type": "string"
25+
}
26+
},
27+
"_acl": {
28+
"type": "object",
29+
"additionalProperties": {
30+
"anyOf": [
31+
{
32+
"type": "string"
33+
},
34+
{
35+
"type": "array",
36+
"items": {
37+
"type": "string"
38+
}
39+
}
40+
]
41+
}
42+
},
43+
"_sig": {
44+
"type": "string"
45+
}
46+
},
47+
"required": [
48+
"user_input",
49+
"interaction_goals",
50+
"_acl",
51+
"_sig"
52+
]
53+
}

0 commit comments

Comments
 (0)