feat(agent-runner): finalize 4.x processor integration

This commit is contained in:
huanghuoguoguo
2026-07-19 22:45:15 +08:00
parent 457408ad7f
commit 9aa71d54e3
109 changed files with 2200 additions and 1204 deletions
+15 -15
View File
@@ -164,32 +164,32 @@ class LangBotMCPServer:
await ap.pipeline_service.delete_pipeline(pipeline_uuid)
return _dump({'ok': True})
# ----- Agents -------------------------------------------------- #
# ----- Processors ---------------------------------------------- #
@mcp.tool(description='List product-level processors, including Agents and Pipelines.')
async def list_agents() -> str:
async def list_processors() -> str:
return _dump(await ap.agent_service.get_agents())
@mcp.tool(description='Get a product-level Agent or Pipeline by UUID.')
async def get_agent(agent_uuid: str) -> str:
return _dump(await ap.agent_service.get_agent(agent_uuid))
@mcp.tool(description='Get an Agent or Pipeline processor by UUID.')
async def get_processor(processor_uuid: str) -> str:
return _dump(await ap.agent_service.get_agent(processor_uuid))
@mcp.tool(
description=(
'Create an Agent processor or Pipeline. `agent_data` matches '
'POST /api/v1/agents; set kind to `agent` or `pipeline`. Returns the new UUID and kind.'
'Create an Agent or Pipeline processor. Set `processor_data.kind` to '
'`agent` or `pipeline`. Returns the new UUID and kind.'
)
)
async def create_agent(agent_data: dict) -> str:
return _dump(await ap.agent_service.create_agent(agent_data))
async def create_processor(processor_data: dict) -> str:
return _dump(await ap.agent_service.create_agent(processor_data))
@mcp.tool(description='Update an Agent processor or Pipeline by UUID.')
async def update_agent(agent_uuid: str, agent_data: dict) -> str:
await ap.agent_service.update_agent(agent_uuid, agent_data)
@mcp.tool(description='Update an Agent or Pipeline processor by UUID.')
async def update_processor(processor_uuid: str, processor_data: dict) -> str:
await ap.agent_service.update_agent(processor_uuid, processor_data)
return _dump({'ok': True})
@mcp.tool(description='Delete an Agent processor or Pipeline by UUID.')
async def delete_agent(agent_uuid: str) -> str:
await ap.agent_service.delete_agent(agent_uuid)
@mcp.tool(description='Delete an Agent or Pipeline processor by UUID.')
async def delete_processor(processor_uuid: str) -> str:
await ap.agent_service.delete_agent(processor_uuid)
return _dump({'ok': True})
# ----- Models -------------------------------------------------- #