One harness for every model, ACP agent, and coding CLI
The askx harness unifies local Ollama models, remote APIs, and coding CLIs under one flag set with host tool execution and automatic JSON Schema repair loops.
By Dillip Chowdary • Nov 30, 2026 • Source: muthuishere.github.io

At a glance
- Product
- askx
- Software type
- Headless CLI harness and Go library
- Configuration file
- ~/.config/askx/profiles.yaml (mode 0600)
- Socket permissions
- mode 0600 local IPC
- Budget stop
- exit 4
- Policy limit
- exit 6 with no fallback
In this post
Independent developer Muthu Kumar launched askx, an open-source command line harness unifying artificial intelligence models, agent protocols, and coding tools. According to muthuishere.github.io's report, the utility discovers local Ollama models, programming CLIs, and API keys under a single interface. The software standardizes flags, exit codes, and audit logging for Unix scripting.
This report examines how askx coordinates multi-agent workflows across commercial cloud endpoints and local open weights. It is written for DevOps engineers and automation developers needing reliable scripting surfaces for code generation and log triage. The piece explores backend routing, host toolkits, schema loops, and execution budgets.
01Initial discovery and unified command line flags
Integrating artificial intelligence into continuous integration scripts often creates tooling fragmentation. Standard Unix utility pipes generally call remote HTTP endpoints, whereas full coding agents control proprietary flags, permissions, and runtimes. The askx utility resolves this divergence by centralizing operations locally, switching backends behind a single profile flag.
Environment setup uses two initialization commands to verify local tooling before running prompts: 1. Initialize configuration Run askx init to generate the base directory and profile templates. 2.
Diagnose environment Run askx doctor to identify local Ollama models, installed coding CLIs, and active API keys. These checks confirm local engines and authentication variables are ready before scripts dispatch tasks.
Pipelines can execute commands like askx to review diffs or analyze screenshot files. Every execution writes to a unified audit log and returns predictable exit codes. By standardizing flags such as stream-json and profile selection, developers can script complex automation steps without rewriting command syntax across engines.
02Backend targets and host runtime tools
The harness routes requests across four backend categories without changing downstream script interfaces. Supported systems include OpenAI-compatible HTTP endpoints like Ollama, vLLM, and OpenRouter, alongside Anthropic Messages APIs. It also bridges warm Agent Control Protocol sessions for Devin and OpenCode, plus CLI adapters for Claude, Copilot, and Gemini.
Comparing execution modes highlights how different backend categories coordinate system access: | Backend Style | Supported Targets | Execution Architecture | | HTTP Endpoints | OpenAI, Ollama, vLLM, OpenRouter, Anthropic | Remote API calls with host-side tool execution | | Warm ACP Sessions | Devin, OpenCode | Persistent IPC socket with host Toolkit bindings | | CLI Adapters | Claude, Devin, OpenCode, Copilot, Gemini | External process orchestration via adapter bridges | This architecture isolates provider protocols so downstream shell scripts remain completely identical across targets.
Security boundaries stay anchored to the local machine rather than remote model environments. Host system operations including read, write, edit, glob, grep, and bash execute strictly inside the local Toolkit. The environment similarly runs Model Context Protocol servers and skills locally, preventing remote agents from executing arbitrary unvetted code.
03Schema validation and subagent skill distribution
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Reliable output structure is vital when feeding automated responses into production pipelines. Passing the schema flag with a JSON schema enforces output validation across every backend engine. If an engine returns invalid data, an internal repair loop intercepts the response and requests corrections before scripts ingest the final payload.
User profiles live in a protected configuration file at ~/.config/askx/profiles.yaml with mode 0600 permissions. Stored profiles reference environment variable names for credentials rather than saving raw keys. A sample log-triage profile targets a local qwen3.5:4b model via Ollama, specifying metadata and when-to-use conditions for automated build log triage.
Profiles export to other autonomous coding agents via the subagent installation command. Running askx install --subagents creates standard SKILL.md files inside directories like ~/.agents/skills. Coding assistants including Claude Code, Codex, and Devin read these exported skill definitions, allowing them to route specialized subtasks to askx profiles automatically.
04Fallback sequences and execution budget caps
Production environments demand resilient failover when external model services experience outages. Profiles can specify fallback sequences such as ollama, claude-cli, and openai to survive connection drops, timeouts, 429 rate limits, 5xx server errors, or credit exhaustion. When an error arises, the harness automatically retries using the next configured profile.
Financial switches prevent runaway execution loops and billing spikes during automated workflows. Operators enforce ceilings using the max-tokens-budget parameter alongside the max-cost control flag. Whenever an execution crosses either cost or token threshold, the harness immediately halts the run and cleanly returns standardized exit code 4.
High-frequency automation maintains lower latency through a warm background daemon process. Running askx warm start keeps ACP and stream-json sessions alive across 0600 local IPC sockets. Alternatively, developers building native Go software can import github.com/muthuishere/askx directly, compiling standalone static binaries under CGO_ENABLED=0 without external Cgo dependencies.
05Operational boundaries and exit code controls
The software is built strictly as a headless command line harness for scripts rather than an interactive chat application. Developers requiring terminal chat conversations should use programs like claude or aichat instead. Furthermore, multimodal attachments require compatible vision or PDF models, as text-only Ollama models reject incoming image bytes.
Standardized exit codes communicate execution states directly to calling shell environments. A zero exit code signals completed execution, whereas exit code 4 indicates a token or cost budget cutoff. Shell runners use these discrete exit codes to distinguish clean completions from budget interruptions or policy violations.
Note: A policy denial strictly returns exit code 6 to halt execution immediately across all configured environments. The harness deliberately prevents failover upon policy rejection, ensuring that security or governance restrictions cannot be bypassed by secondary backend profiles. Downstream automation scripts must handle exit code 6 as a permanent, non-retryable execution failure.
Frequently asked questions
What core problem does askx solve for automation scripts?
It eliminates fragmented flags and tool environments across AI APIs and coding CLIs. The harness runs tools on the host while exposing a uniform command line interface.
How does the schema repair mechanism function?
Passing the schema flag enforces JSON Schema validation on outputs from any backend. An automatic repair loop prompts the model to correct malformed payloads before returning them.
Can askx fail over between local and cloud providers?
Yes, profiles support fallback chains like ollama, claude-cli, and openai on network or credit errors. However, policy denials trigger exit 6 and will never fall back.
How do external tools like Claude Code access askx profiles?
Running askx install --subagents exports profiles as standard SKILL.md files into ~/.agents/skills. Agents parse these files to delegate specialized tasks automatically.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement