https://opencode.ai and https://github.com/QwenLM/qwen-code both allow you to configure any API as the LLM provider.
That said, running agentic workloads on local LLMs will be a short and losing battle against context size if you don't have hardware specifically bought for this purpose. You can get it running and it will work for several autonomous actions but not nearly as long as a hosted frontier model will work.