Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0348fcf
feat: Web ui support
sejin-pg Oct 28, 2025
fa60aee
t
sejin-pg Oct 29, 2025
8b01c05
Delete pixell-python-agent-0.1.0.apkg
sejin-pg Nov 5, 2025
6daeab6
feat: a2a-http
sejin-pg Nov 18, 2025
233e835
feat: deploy
sejin-pg Nov 23, 2025
ad33f71
fix: Linux name error
sejin-pg Nov 23, 2025
49a0cb5
feat: Deploy core agent
sejin-pg Nov 23, 2025
6314591
feat: Agent app logger
sejin-pg Nov 23, 2025
694607e
fix: Redistribute agent
sejin-pg Nov 23, 2025
5842bd5
feat: Supervisor use venv
sejin-pg Nov 24, 2025
2180e13
feat: Detail agent dploy log data
sejin-pg Nov 25, 2025
c9d5727
fix: health check
sejin-pg Nov 26, 2025
ab0a966
feat: Log file handler
sejin-pg Nov 26, 2025
27d972a
fix: Only check configured endpoint
sejin-pg Nov 26, 2025
41ae2ed
feat: Kill agent process
sejin-pg Nov 26, 2025
464debd
fix: Superviser health check response fomat
sejin-pg Nov 26, 2025
b18acb4
fix: Kill agent process
sejin-pg Nov 26, 2025
23920a7
Merge branch 'main' into feat/web-ui-support
sejin-pg Nov 26, 2025
acf6602
feat: user location
sejin-pg Nov 26, 2025
b125e37
feat: a2a-http
sejin-pg Nov 26, 2025
0075c87
chore: Rollback environment injection
sejin-pg Nov 26, 2025
2ca2061
fix: Linux user permission
sejin-pg Nov 27, 2025
266e486
fix: File locking
sejin-pg Dec 2, 2025
7dfd113
feat: Add A2A HTTP streaming support
syumpx Dec 4, 2025
7f7bc11
feat: Add Unix domain socket support for unlimited agent capacity
syumpx Dec 8, 2025
a4e5b37
chore: Bump version to 0.2.2
syumpx Dec 8, 2025
a3fdcf1
fix: Install PAR to both supervisor venv and system site-packages
syumpx Dec 8, 2025
b368964
feat: Add utility scripts for testing and proto generation
syumpx Dec 8, 2025
868ac6b
docs: Add documentation and architecture diagrams
syumpx Dec 8, 2025
48caa71
feat: Add echo-streamer example agent
syumpx Dec 8, 2025
43a2417
docs: Add refactoring documentation and migration guides
syumpx Dec 8, 2025
1368908
chore: remove temp file
sejin-pg Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ aws-credentials.json
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
/temp_apkg_extract
5 changes: 5 additions & 0 deletions .pixell/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"api_key": "f3764a4e1a472385fcab66f4686a71c060406d71d1d4c12af177b7b2373b0066",
"app_id": "4906eeb7-9959-414e-84c6-f2445822ebe4",
"default_environment": "prod"
}
282 changes: 282 additions & 0 deletions A2A_FORMAT_UPDATE_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
# A2A Format Update for talk_to_agent.py

## Summary

Updated `talk_to_agent.py` to use **standard A2A (Agent-to-Agent) JSON-RPC 2.0 format** for gRPC communication, ensuring compatibility with paf-core-agent and vivid-commenter.

---

## Changes Made

### 1. Added UUID Import

**File**: `talk_to_agent.py:11`

```python
import uuid # Added for generating unique message IDs
```

### 2. Updated `invoke()` Method

**File**: `talk_to_agent.py:308-359`

**Before (Broken):**
```python
# Convert parameters to string dict (protobuf limitation)
str_params = {k: json.dumps(v) if not isinstance(v, str) else v
for k, v in parameters.items()}

request = agent_pb2.ActionRequest(
action=action, # ❌ OLD: flat field
parameters=str_params, # ❌ OLD: flat field
request_id="" # ❌ OLD: flat field
)
```

**After (A2A Compliant):**
```python
# Build standard A2A (Agent-to-Agent) message structure
message_id = str(uuid.uuid4())
request_id = str(uuid.uuid4())

a2a_params = {
"message": {
"kind": "message",
"role": "user",
"messageId": message_id,
"metadata": {
"skill": action, # ✅ Use 'skill' not 'action'
"params": parameters # ✅ Use 'params' not 'parameters'
},
"parts": [
{
"kind": "text",
"text": json.dumps(parameters, ensure_ascii=False)
}
]
}
}

# Wrap in A2AMessage with JSON-RPC 2.0 structure
request = agent_pb2.ActionRequest(
message=agent_pb2.A2AMessage(
jsonrpc="2.0",
id=request_id,
method="message/send",
params_json=json.dumps(a2a_params)
)
)
```

### 3. Created Compliance Test Suite

**File**: `test_a2a_compliance.py`

Comprehensive test suite validating:
- JSON-RPC 2.0 structure
- Correct field names (`skill` not `action`, `params` not `parameters`)
- `parts` array presence
- Complex parameter handling
- Unicode support

---

## Format Comparison

### Old Format (Broken ❌)
```json
{
"action": "chat",
"parameters": {
"message": "Hello"
},
"request_id": "uuid"
}
```

### New A2A Format (Correct ✅)
```json
{
"jsonrpc": "2.0",
"id": "b36b456d-a7b8-4362-9e64-86e7e05e9e2e",
"method": "message/send",
"params": {
"message": {
"kind": "message",
"role": "user",
"messageId": "cc56f9d8-77b7-4d52-a84b-83eecd155c25",
"metadata": {
"skill": "chat",
"params": {
"message": "Hello"
}
},
"parts": [
{
"kind": "text",
"text": "{\"message\": \"Hello\"}"
}
]
}
}
}
```

---

## Test Results

### Compliance Tests

```
🧪 A2A Message Structure Compliance Tests
======================================================================

✅ PASS: Chat action builds valid A2A message
✅ PASS: Comment action builds valid A2A message
✅ PASS: Complex parameters build valid A2A message
✅ PASS: Format exactly matches A2A specification

Passed: 4/4
```

### Validation Checks

All checks passed:
- ✓ `jsonrpc == '2.0'`
- ✓ `method == 'message/send'`
- ✓ `message.kind == 'message'`
- ✓ `message.role == 'user'`
- ✓ `metadata.skill` exists
- ✓ `metadata.params` exists
- ✓ `parts` array exists
- ✓ Parts have text content
- ✓ No legacy field names (`action`, `parameters`)

---

## Integration Testing Plan

### Phase 1: Local Testing ✅ COMPLETE
- [x] Create compliance test suite
- [x] Validate A2A message structure
- [x] Test with various action types
- [x] Test with complex parameters

### Phase 2: Agent Integration Testing

#### Test with paf-core-agent

```bash
# Start paf-core-agent locally (if not already running)
cd /Users/syum/dev/paf-core-agent
./scripts/start.sh

# Test A2A communication
cd /Users/syum/dev/pixell-agent-runtime
python talk_to_agent.py \
--host localhost \
--port 50051 \
--agent-id paf-core-agent \
--verbose
```

**Expected**: Successful health check and chat interaction

#### Test with vivid-commenter (PAR-deployed)

```bash
python talk_to_agent.py \
--agent-id 4906eeb7-9959-414e-84c6-f2445822ebe4 \
--dns-resolver native \
--verbose
```

**Expected**: Successful interaction once vivid-commenter receiver is updated

### Phase 3: End-to-End Testing

Test scenarios:
1. **Chat conversation**: Natural language queries
2. **Code commenting**: Code analysis requests
3. **Complex parameters**: Nested data structures
4. **Unicode content**: International characters
5. **Error handling**: Invalid requests

---

## Compatibility Matrix

| Component | Status | Notes |
|-----------|--------|-------|
| **talk_to_agent.py** | ✅ Updated | Now sends A2A format |
| **paf-core-agent** | ✅ Compatible | Accepts A2A format (commit f6378d3) |
| **vivid-commenter** | ⚠️ Needs Update | Requires receiver-side fix ([issue #4](https://github.com/pixell-global/vivid-commenter/issues/4)) |
| **PAR (runtime)** | ✅ Compatible | Proto updated to A2A format |

---

## Benefits

- ✅ **Standards Compliance**: Follows JSON-RPC 2.0 specification
- ✅ **Interoperability**: Works with all A2A-compliant agents
- ✅ **File Transfer Support**: `parts` array enables file/rich content
- ✅ **Future-Proof**: Compatible with ecosystem evolution
- ✅ **Better Structure**: Clear separation of skill vs parameters
- ✅ **Traceability**: Unique message IDs for debugging

---

## Migration Notes

### Breaking Changes
- Old `action`/`parameters`/`request_id` fields no longer exist in proto
- Must use new `A2AMessage` wrapper structure

### Backward Compatibility
- None - this is a clean break from old format
- All clients must update to new format
- Proto regeneration required after changes

### Deployment Strategy
1. Update PAR proto definitions
2. Regenerate proto Python files
3. Update all A2A clients (talk_to_agent.py, etc.)
4. Update all A2A servers (vivid-commenter, etc.)
5. Test end-to-end communication

---

## Next Steps

1. **Deploy to PAR**: Ensure PAR runtime has updated protos
2. **Update vivid-commenter**: Implement receiver-side A2A parsing
3. **Integration Test**: Test full PAF Core → vivid-commenter flow
4. **Documentation**: Update A2A communication docs
5. **Monitor**: Watch for any compatibility issues in production

---

## Files Modified

1. `/Users/syum/dev/pixell-agent-runtime/talk_to_agent.py`
- Added uuid import
- Updated `invoke()` method to build A2A format

2. `/Users/syum/dev/pixell-agent-runtime/test_a2a_compliance.py` (new)
- Comprehensive A2A format validation tests

---

## References

- **Issue**: https://github.com/pixell-global/paf-core-agent/issues/13
- **PAF Core Commit**: f6378d3 (A2A format implementation)
- **vivid-commenter Issue**: https://github.com/pixell-global/vivid-commenter/issues/4
- **A2A Specification**: JSON-RPC 2.0 with A2A extensions

---

**Date**: 2025-10-28
**Author**: Claude Code
**Status**: ✅ Implementation Complete, Ready for Integration Testing
Loading
Loading