Skip to content

AI Agents

Workset uses external CLI tools to generate PR descriptions and commit messages. It shells out to the configured agent, passes a prompt with your diff context, and parses structured output back.

AgentCLI ToolProvider
codexCodex CLIOpenAI
claudeClaude CodeAnthropic

Both agents must be installed separately and available on your PATH.

Set the default agent in your global config (~/.workset/config.yaml):

defaults:
agent: codex

Optionally specify a model for text generation:

defaults:
agent: codex
agent_model: o3

For Codex this passes -m <model>, for Claude it passes --model <model>.

If the agent binary isn’t on your PATH, set it explicitly:

agent:
cli_path: /usr/local/bin/codex

Each agent handles its own authentication — Workset does not manage API keys.

  • Codex: Requires an OpenAI API key. Run codex auth or set OPENAI_API_KEY in your environment.
  • Claude: Requires an Anthropic API key or active session. Run claude to authenticate or set ANTHROPIC_API_KEY.

AI drafting a PR title and description

When you generate a PR description or commit message, Workset:

  1. Builds a prompt from your diff, branch name, and commit history
  2. Invokes the configured agent CLI (e.g., codex exec -)
  3. Passes a JSON schema for structured output
  4. Parses the agent’s response into a title and body (for PRs) or a commit message

The agent runs in the repo’s worktree directory, so it has full context of the codebase.

In the desktop app, the configured agent is used for:

  • Generating PR descriptions from the PR creation flow
  • Creating commit messages
  • Default coding agent for embedded terminals (configurable per terminal)

The CLI uses the configured agent when running commands that support AI generation. The agent setting in defaults.agent applies globally.