Agents · Downstream clients

Point any agent at localhost — route through role-model

Any application that can set an OpenAI-compatible base URL to 127.0.0.1/v1 works with the runtime. Packaged adapters for Pi and Codex add intent metadata and model catalog wiring for sharper routing.

Any OpenAI-compatible client
If the app can set its API base URL to the Role-Model runtime, it is supported — no special SDK required.
Base URLhttp://127.0.0.1:3456/v1
http://127.0.0.1:3457/v1   # stage
http://127.0.0.1:3458/v1   # dev
Models
GET /v1/models — discover role-model aliases from the running runtime.
Chat
POST /v1/chat/completions — OpenAI-compatible chat through the router.
Responses
POST /v1/responses — including streaming for agents that speak Responses.
Packaged adapters for Pi and Codex
The Pi extension and Codex plugin go beyond a raw /v1 base URL — they attach routing intent and keep the agent’s model picker wired to role-model.
Pi extension
@try-works/pi-role-model

Registers a role-model provider in Pi and classifies intent so the router sees domain, role, task, and scope.

Capabilities
  • Intent classifier for domain / role / task / scope
  • Richer metadata on each request for accurate routing
  • /role-model setup, status, doctor, and related commands
  • Default endpoint http://127.0.0.1:3456 (does not start runtime)
Install
pi install npm:@try-works/pi-role-model
Usage
/role-model setup
/role-model status
/role-model doctor
/role-model alias recommended

Start role-model first. Slash commands only work in an interactive Pi session.

Codex plugin
@try-works/codex-role-model

Local Responses forwarder so Codex can use any role-model id — while keeping native GPT turns on the ChatGPT path.

Capabilities
  • Use any role-model model id from Codex
  • Local Responses adapter on loopback :3460/v1
  • setup + start CLI; marketplace plugin install
  • Native GPT turns stay on the ChatGPT path
Install
npx @try-works/codex-role-model setup
npx @try-works/codex-role-model start

# or via Codex marketplace
codex plugin marketplace add try-works/role-model
codex plugin add role-model@role-model
Usage
# After setup + start, restart Codex
# Select a role-model alias as the model
# Adapter listens on http://127.0.0.1:3460/v1

Restart Codex after setup. Compaction stays Codex-managed; adapter injects routing intent on /v1/responses.

Wire your agent to role-model

Point any OpenAI-compatible client at localhost /v1 — or install the Pi extension and Codex plugin for richer routing.