runHeadless

suspend fun runHeadless(backend: ChatBackend, prompt: String, clock: () -> Long = System::currentTimeMillis): Message(source)

Run one prompt on backend without a UI (scheduled or background work) and return the final answer. Throws when the run reports an error.


suspend fun AgentHarness.runHeadless(prompt: String, approver: ToolApprover = ToolApprover { false }): Message(source)

runHeadless on this harness. Nobody can approve tools here, so calls that need approval are denied unless approver says otherwise.