fxCoding agents
Run fx on AnyRouter
Install the AnyRouter provider plugin, set one key, and pass anyrouter() to createFxAgent.
Short link
anyrouter.dev/u/fxSet it up
Install
npm i libfx github:AnyRouterHQ/fx-provider-anyrouter#v0.1.0
export ANYROUTER_API_KEY=sk-ar-v1-...- 1.Install libfx and the plugin from GitHub. The plugin is not on npm.
- 2.Set ANYROUTER_API_KEY. Get a key at anyrouter.dev.
- 3.Pass provider: anyrouter() and an AnyRouter model id such as anyrouter/hermes to createFxAgent. Use fetchAnyRouterProvider() for models newer than the bundled list.
Why use this
fx agents need a provider with model metadata. Writing that by hand for every model you want to try is slow, and it goes stale.
Other ways to set it up
createFxAgent
import { createFxAgent } from "libfx"
import { anyrouter, anyrouterCredentials } from "fx-provider-anyrouter"
const agent = createFxAgent({
provider: anyrouter(),
model: "anyrouter/hermes",
credentials: anyrouterCredentials(),
})Endpoints and key
- OpenAI-compatible
- https://anyrouter.dev/api/v1
- Anthropic-compatible
- https://anyrouter.dev/api
- Key
- ANYROUTER_API_KEY (sk-ar-…)