core / agent_qwen.py — GhostQwenAgent
Thin qwen_agent.agents.ReActChat wrapper specialised for Qwen3.6 with native file_system / execute / knowledge_base tools.
Class
class GhostQwenAgent(qwen_agent.agents.ReActChat):
def __init__(self, context, llm_cfg): ...
def _run(self, messages, lang='en', **kwargs) -> Iterator[List[Dict[str, Any]]]:
...
Constructor binds the active GhostContext via qwen_bridge.set_context() so the bridged tools have access to sandbox / memory / scratchpad. Registers a tool list of file_system, execute, knowledge_base via the qwen-agent registry, then delegates the chat loop to ReActChat._run().
When used
Activated when the upstream LLM is Qwen and the agent runs in Qwen's native ReAct mode (XML tool-call syntax handled by the Qwen library rather than the agent's own parser). The tool bridge is documented in tools / qwen_bridge.