-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
Description
I would like to add a unified HTTP request path prefix to the existing Fusion AI Server to make all API endpoints accessible under a common root path (e.g., /fusion or /api/v1/...).
Current Behavior
The A2A server currently exposes endpoints directly at:
/a2a/tasks/a2a/agent/a2a/state/a2a/events
Desired Behavior
I want all endpoints to be accessible under a unified prefix, for example:
/fusion/a2a/tasks/fusion/a2a/agent/fusion/a2a/state/fusion/a2a/events
Proposed Solution
Modify the run_server call in main() to include a root_path parameter:
Current code:
run_server(server, host="0.0.0.0", port=port)Proposed change:
run_server(
server,
host="0.0.0.0",
port=port,
root_path="/fusion" # Add unified path prefix
)Benefits
- Better API Organization: All endpoints under a common namespace
- A2A Compatibility: No breaking changes to existing A2A functionality
- Future Extensibility: Easy to add custom endpoints like
/fusion/search - Flexible Configuration: Root path can be easily customized (
/api/v1,/myapi, etc.)
Additional Features (Optional)
This change would also enable adding custom REST APIs alongside A2A:
/fusion/search- Custom search endpoint/fusion/models- Model management/fusion/health- Health check endpoint
Implementation
The solution requires minimal code changes and maintains full backward compatibility with the A2A framework while providing a cleaner, more organized API structure.
Metadata
Metadata
Assignees
Labels
No labels