-
Notifications
You must be signed in to change notification settings - Fork 373
Description
Problem
Currently, agent orchestration (type: agent) and function calling (type: prompt with prompt_targets) operate on separate listeners with separate ports. There is no way to have a single entry point that:
- First checks if the user request matches a
prompt_target(function calling → direct API call) - Falls back to agent orchestration if no function matches
We tried several approaches on v0.4.11:
1. use_agent_orchestrator: true in overrides
The WASM source code (stream_context.rs) has the logic to fall back from function calling to agent orchestration when use_agent_orchestrator is set. However:f
- The Python config generator (
config_generator.pyline 450-458) requires exactly one endpoint whenuse_agent_orchestrator: true, and counts agent URLs as endpoints, so any config with agents + a function calling endpoint fails - The Rust brightstaff binary has the same validation
- The WASM filter (
prompt_gateway.wasm) also validates this at runtime
2. Separate listeners on different ports
This works — we can run type: prompt on port 10000 and type: agent on port 8001 in the same container. But the caller (our gateway) must decide which port to send to, re-introducing client-side routing logic that Plano should handle.
3. Patching the config generator
We patched the Python endpoint count check (elif len(endpoints) > 1: → elif False:), which let the config generate. But the envoy template creates two listeners on the same port (one for the prompt WASM filter, one for the agent routing), causing duplicate address errors.
Desired behavior
A single listener that combines both capabilities:
listeners:
- type: unified # or type: prompt with agent support
name: platform
port: 8001
router: plano_orchestrator_v1
prompt_targets:
- name: fetch_application_fields
description: Fetch fields for a certain database
parameters:
- name: applicationId
type: str
required: true
endpoint:
name: server
path: /api/v1/meta/queries/appfields
http_method: GET
agents:
- id: consultant_agent
description: Knowledge questions
- id: version_api_creator_agent
description: Create a Version API (multi-turn workflow)
- id: general_chat_agent
description: General conversation
default: trueFlow:
- User sends "Fetch CUSTOMER fields" → Arch-Function matches
fetch_application_fields→ direct API call → fast response - User sends "Explain FUNDS.TRANSFER validation rules" → Arch-Function finds no match → falls back to Plano-Orchestrator → routes to
consultant_agent - User sends "Hello" → No function match → No agent match → routes to
general_chat_agent(default)
Environment
- Plano v0.4.11 (
katanemo/plano:0.4.11) - Cloud orchestrator at
archfc.katanemo.dev - Note: v0.4.12 doesn't work with the cloud (
provider_interface: planonot recognized by cloud)