A2A Server 추가
This commit is contained in:
1 parent
ff90290b4f
commit
6183711765
7 files changed
+378
-8
No files matched your search
@@ -1,12 +1,24 @@
|
||||
"""Empathy Decision Agent MCP 서버."""
|
||||
"""Empathy Decision Agent 서버. MCP(8000)와 A2A(8001)를 함께 띄운다."""
|
||||
|
||||
import asyncio
|
||||
|
||||
import uvicorn
|
||||
from mcp.server.mcpserver import MCPServer
|
||||
|
||||
from services.a2a_server import a2a_app
|
||||
from services.utterance_guide import generate_style_guide
|
||||
|
||||
mcp = MCPServer("Empathy Decision Agent")
|
||||
mcp.add_tool(generate_style_guide)
|
||||
|
||||
|
||||
async def serve() -> None:
|
||||
a2a_server = uvicorn.Server(uvicorn.Config(a2a_app, host="0.0.0.0", port=8001))
|
||||
await asyncio.gather(
|
||||
mcp.run_streamable_http_async(host="0.0.0.0", port=8000),
|
||||
a2a_server.serve(),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run("streamable-http", host="0.0.0.0", port=8000)
|
||||
asyncio.run(serve())
|
||||
Reference in new issue
Block a user