master
The registerTool name already comes from the first argument; drop the redundant duplicate 'name' field inside the definition object from the docs, example, and test.
bridle
An agentic harness and SDK for OpenAI-compatible chat completion endpoints.
Features
Harness user experience:
- Readline-based CLI with tab completion
- Coloured output for sections (
-Colour, orNO_COLORenv var) - Description of every available tool via
/tools - Press
Ctrl+Xto edit the current input line in$EDITOR - Press any key to interrupt a running model turn or tool call
- Audible bell after 10 seconds to signal the terminal is ready for input
- Coloured output for sections (
- Oneshot mode (
-p, implies-Agent=oneshot) - Select the agent logic at startup (
-Agent=oneshot|interactive|autoengineer) - Manipulate turn history (
/rewind,/turns,/submit)/rewindprompts for a target index from/turns, defaults to today
- Session management (
-Autosave, manual/save, and resume via-r) - Import local files (wildcard match) into prompt (
/read) - Restart the session with a freshly compiled binary (
/reexec) - Linux sandboxing with Bubblewrap, on by default (
-Sandbox=falseto opt out, use at own risk)- Append extra Bubblewrap flags to every sandboxed command via
-SandboxFlag(can be specified multiple times) - Leaves the harness process unconstrained and confines each thing the model can reach: file access by path, shell commands and MCP stdio servers by their own namespaces
- Grant extra paths with
-Allow, applied to every confined operation (repeatable)- A directory exposes itself and everything inside it; a single file exposes just that file
- Append extra Bubblewrap flags to every sandboxed command via
- Git worktree support (
-w), also works from inside the sandbox - Quiet mode (
-Quiet) to suppress all system messages
Special modes:
- "Autoengineer" (
-Agent=autoengineer)- Implement every task in TODO file and TODO/FIXME comments in codebase.
- The result is not necessarily very good, but it can run overnight and you can cherry-pick the good parts in the morning.
Model integration with harness:
- Auto load
AGENTS.mdandCLAUDE.mdfiles - Agent Skills support
- Discovers
SKILL.mdbundles under.agents/skills/or.claude/skills/ - Scanned at project level and user level, project wins on name collision
- The skill catalog is injected into the system prompt
- Use
read_skillto load the full contents of a skill (no size limit)
- Discovers
- Context management
- Auto compact on client-side token threshold (
-MaxContext) or on server-side length exceeded - Soft limit: compaction fires 10% below the ceiling to leave a safety buffer
- Auto-detect model context from
/v1/modelswhen-MaxContextis zero - Several strategies behind one dispatcher:
handover(default), head-summarize,quick,summarize,drop-reasoning,drop-tool-calls,truncate,rewind - The default "handover" strategy appends a summary instead of rewriting history, preserving prefix caching
- Auto compact on client-side token threshold (
- Tool calling
- Available tools:
- Local file I/O (
read_file,write_file), with optionallimit/offsetto read a line range of a large file - Single-string replacement (
edit_file) for reliable targeted edits - Auto-healing
apply_patch, supporting both unified + V4A formats - Command execution (
local_shell) - Subagents (
subagentwith fork/fresh context modes), optionally running in parallel (-Parallel <n>) - Web search with DuckDuckGo
- Webpage read in Reader Mode (via
go-readability), converting links to navigable markdown - Anti-hallucination:
write_file/apply_patchmust read a file first (or be nonexistent) before writing, andweb_readonly permits URLs already seen in the conversation
- Local file I/O (
- MCP support
- Stdio, Streaming HTTP, or SSE transports
- Static (
-Mcp <name>=<command>/-Mcp <name>=http://url) or dynamic registration (/mcp-connect,/mcp-list,/mcp-disconnect) - Dynamic tool discovery
- When using sandboxing, stdio servers are confined like any other subprocess (with the host network, so they can still reach an API); HTTP servers are remote and have no local process to confine
- User confirmation levels (
/checktoolsor-CheckTools:if-sandboxeddefault,ask,auto, oryolo)if-sandboxedbecomesyolowhen the tools are confined andaskwhen bubblewrap is unavailable- Allow denying with alternative message (
?) - Refuse and stop the turn outright (
!), as distinct fromn, which refuses this call but lets the model try something else
- Trigger tools locally (
/tool), optionally submit in next turn
- Available tools:
Model settings:
- Use custom model provider (
-Hostand-Key)- Supports timing metadata from both llama-server and OpenAI/OpenRouter
- Can be changed mid-session with
/host,/keyand/model
- Merge a custom JSON object into each API request body (
-ExtraArgs), e.g. OpenRouter provider preferences - Toggle thinking (
/thinkand/no-think) and setreasoning_effort(/reasoning-effort) - Running cost is tracked and reported per turn when the provider reports it
- Customizable system message, default-tuned for Golang development
Usage
# For 128k 131072, for 256k 262144 . Mostly affects pp speed, not tg speed
llama-server -c 262144 --cache-type-k q8_0 --cache-type-v q8_0 -fa on -np 1 -m /srv/llama/Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf &
./bridle
# or
./bridle -CheckTools=yolo -Autosave=auto -w my-worktree
# Interactive session, with up to 4 parallel subagents
./bridle -Parallel 4
# Use with OpenRouter
./bridle -Host 'https://openrouter.ai/api/' -Key 'sk-or-v1-xxxx' -Model 'openrouter/free'
Languages
Go
98%
Shell
1%
JavaScript
1%