feat(artifacts): Implement A2A artifacts server#32
Conversation
…pport
- Add static artifacts server on port 8081 with REST endpoints
- Implement artifact registry for ID-to-file mapping with thread safety
- Create enhanced artifact helper extending ADK functionality
- Support FilePart, TextPart, and DataPart artifact types per A2A spec
- Add global artifact manager for server-wide access
- Integrate artifacts with take_screenshot skill automatically
- Include comprehensive test suite for all components
- Add detailed documentation and configuration options
- Implement proper file serving with MIME type handling
- Add health check and metadata endpoints
- Support configurable base URL and port settings
The implementation provides the infrastructure for the `includeArtifacts`
parameter, ready for integration when ADK framework hooks are available.
All artifacts are automatically registered and accessible via:
- GET /artifacts/{id} - Download files
- GET /artifacts/{id}/metadata - Get metadata
- GET /artifacts/ - List all artifacts
Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
|
@claude Why do we need the artifact helper - I understand you have troubles with the includeArtifacts flag, perhaps we can just remove it for now. I'll be implementing it in future versions. |
|
Claude finished @edenreich's task —— View job Analyzing artifact helper implementationTodo List:
Analysis of the Artifact HelperAfter reviewing the implementation, here's why the artifact helper exists and the role of the The Artifact Helper (
The The flag is currently implemented in middleware (
However, this middleware approach has limitations because it can't access the deeper ADK task handling system. Recommendation: You're right to consider removing the
Suggested approach:
The artifact helper is essential for your artifact server to function - without it, there's no way to map artifact IDs to files for the REST endpoints. |
|
@claude Let's simplify it, we can remove includeArtifacts for now and rely more on the ADK rather then creating more utilities - less code is better. |
|
Claude finished @edenreich's task —— View job Simplifying artifacts implementation ✅I've successfully simplified the artifacts implementation by removing the Todo List:
Summary of ChangesFiles Removed:
Files Simplified:
Key Improvements:
The implementation now follows the "less code is better" principle while maintaining all essential functionality for artifact creation, storage, and serving via REST endpoints. The artifact registry is still essential for the REST endpoints to function, but the implementation is much simpler and relies more on ADK's capabilities. |
…mentation Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
… middleware - Rename EnhancedArtifactHelper to ArtifactHelper and simplify implementation - Remove baseURL parameter dependencies - Focus on core artifact serving functionality with minimal custom utilities - Rely more on ADK's built-in artifact handling - Update tests and documentation to reflect simplifications - All tests passing with no linting issues Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
|
@claude To simplify it, let's remove the |
|
Claude finished @edenreich's task —— View job Successfully removed
|
…lementation - Removes the `GET /artifacts/` endpoint and associated `listArtifacts` handler - Removes unused `ListArtifacts()` method from ArtifactRegistry - Updates tests to remove dependencies on listing functionality - Updates documentation to reflect removed endpoint - Maintains focus on task-specific artifact access as requested Clients should request only artifacts associated with submitted tasks rather than listing all artifacts. Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ntation Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Implements A2A Artifacts feature as requested in issue #31.
Key Features:
Endpoints:
GET /artifacts/{id}- Download filesGET /artifacts/{id}/metadata- Get metadataGET /artifacts/- List all artifactsAll acceptance criteria met with infrastructure ready for
includeArtifactsparameter when ADK framework provides appropriate hooks.Generated with Claude Code