mcpwn API
    Preparing search index...

    Class CommandAgent

    Drive an external agent command. For each step the harness spawns the command fresh, writes the AgentObservation as one JSON object to its stdin, and reads one JSON AgentAction back from its stdout. The command runs under the shell (so --agent-cmd "python my_agent.py" works) and is ALWAYS killed if it overruns the per-step timeout.

    Contract (documented for real-agent authors): stdin <- {"scenario","task","tools":[...],"resources":[...], "samplingPrompts":[...],"transcript":[...],"visibleText","step"} stdout -> {"type":"tool_call","tool":"...","arguments":{...}} | {"type":"final","message":"..."}

    mcpwn NEVER reads or injects an API key — if the agent needs one it must come from the command's OWN environment. Non-JSON stdout is treated leniently as a final message (so a bare answer still scores).

    Implements

    Index
    name: "command"