@@ -24,23 +24,23 @@ You can find a detailed overview of the taskflow grammar [here](doc/GRAMMAR.md)
2424```
2525┌─────────────────────────────────────────────────────┐
2626│ CLI (cli.py) │
27- │ Typer-based entry point: -p, -t, -l, -g, --resume │
27+ │ Typer-based entry point: -p, -t, -l, -g, --resume │
2828└─────────────────────┬───────────────────────────────┘
2929 │
3030┌─────────────────────▼───────────────────────────────┐
31- │ Runner (runner.py) │
32- │ Taskflow execution loop, model resolution, │
33- │ template rendering, session checkpointing │
31+ │ Runner (runner.py) │
32+ │ Taskflow execution loop, model resolution, │
33+ │ template rendering, session checkpointing │
3434└─────────────────────┬───────────────────────────────┘
3535 │
3636┌─────────────────────▼───────────────────────────────┐
37- │ MCP Lifecycle (mcp_lifecycle.py) │
38- │ Server connection, cleanup, process management │
37+ │ MCP Lifecycle (mcp_lifecycle.py) │
38+ │ Server connection, cleanup, process management │
3939└─────────────────────┬───────────────────────────────┘
4040 │
4141┌─────────────────────▼───────────────────────────────┐
42- │ Agent (agent.py) │
43- │ TaskAgent wrapper, hooks, OpenAI Agents SDK bridge │
42+ │ Agent (agent.py) │
43+ │ TaskAgent wrapper, hooks, OpenAI Agents SDK bridge │
4444└─────────────────────────────────────────────────────┘
4545
4646Supporting modules:
@@ -81,6 +81,41 @@ Per-model `model_settings` can include:
8181- **`endpoint`** — API base URL override for this model
8282- **`token`** — name of an environment variable containing the API key
8383
84+ # ## Backends
85+
86+ The runner can drive two SDKs behind a common interface :
87+
88+ - **`openai_agents`** (default) — the OpenAI Agents Python SDK. Supports
89+ multi-personality handoffs, both `chat_completions` and `responses`
90+ ` api_type` , `temperature`, `parallel_tool_calls`,
91+ ` exclude_from_context` , and MCP over stdio, SSE, and streamable HTTP.
92+ - **`copilot_sdk`** (optional, `pip install seclab-taskflow-agent[copilot]`)
93+ — the GitHub Copilot Python SDK. Supports streaming, `reasoning_effort`,
94+ MCP over stdio/SSE/HTTP, and per-tool permission gating. The SDK
95+ selects its own wire protocol per model, so the YAML `api_type` field
96+ is not honoured; multi-personality handoffs, `temperature`, and
97+ ` parallel_tool_calls` are likewise not available. Taskflows that use
98+ unsupported fields fail at load time with a `BackendCapabilityError`
99+ naming the offending field.
100+
101+ Selection precedence :
102+
103+ 1. `backend:` field in the model config document.
104+ 2. `SECLAB_TASKFLOW_BACKEND` environment variable.
105+ 3. Endpoint auto-default (`api.githubcopilot.com` prefers `copilot_sdk`
106+ when the optional dependency is installed).
107+ 4. `openai_agents`.
108+
109+ ` ` ` yaml
110+ seclab-taskflow-agent:
111+ version: "1.0"
112+ filetype: model_config
113+ backend: copilot_sdk
114+ models:
115+ fast: gpt-5-mini
116+ slow: claude-opus-4.6
117+ ` ` `
118+
84119# ## Session Recovery
85120
86121Taskflow runs are automatically checkpointed at the task level. If a task
0 commit comments