Build a domain-specific agent harness with PowerShell and PSAISuite

dfinke · x · 2026-09-13

Developer dfinke published a tutorial on building a small custom agent harness in PowerShell using the PSAISuite module, exposing existing PowerShell functions as model-callable tools. Key points: install PSAISuite and configure provider keys via env vars (OpenAIKey, AnthropicKey); the core is Invoke-ChatCompletion, which accepts messages, a model, and tool definitions — PowerShell command names can be passed directly as tools with registration and the tool-calling loop handled; New-AgentHarness picks the model, tools, instructions, and iteration limit for the task, and GetResponse drives the loop. Inspired by LangChain's custom-harness guidance: match the surrounding code to the task. Handy for wiring models into real Windows ops/file tools.

Original post →

More from coding & agent

coding & agent channel →