Skip to main content

Crate okbot_agent

Crate okbot_agent 

Source
Expand description

Agent backends for okbot: agent CLIs through agent-call, fallback chains and CLI detection.

  • CliBackend runs one agent CLI (Claude Code, Codex, OpenCode, Devin) per turn.
  • AgentChain tries backends in order, enforces the tool policy and limits concurrency.
  • detect finds installed CLIs and whether they are logged in, for okbot init and doctor.

Modules§

detect
Finding installed agent CLIs (design §6.3.1).

Structs§

AgentChain
Tries backends in order until one answers.
CliBackend
An agent CLI run through agent-call. Each turn starts a fresh process.
CliBackendConfig
How to run one agent CLI.
EnvScrub
Decides which environment variables are removed before an agent CLI starts.
MachineSlots
max slots in dir.
Slot
A held slot; dropping it frees the slot.

Enums§

Provider

Constants§

PROVIDERS
Every provider okbot knows, in the order the setup wizard lists them.

Functions§

inline_system_prompt
Combines a system prompt and a user prompt for backends without a separate system prompt.
parse_provider
Parses a provider name as used in configuration (claude, codex, opencode, devin).
provider_name
The configuration name of a provider.