Open-source SDK lets you script AI coding workflows across multiple CLI tools
Unigent SDK lets developers combine different (harnesses) like Pi, Claude CLI, and Codex CLI, plus multiple chat sessions, under one unified API. Instead of defining workflows in YAML config files, workflows are written directly in TypeScript code, which allows fine-grained control such as parallel or sequential execution and fan-out (splitting one task into several branches). Prompts can be embedded directly in the workflow code. Because it uses Claude CLI under the hood, both Claude and Codex work with it.
Developers can define a schema with Zod to get back from the AI in that exact format. It includes built-in tracing to monitor each stage of a workflow and a TUI (terminal ) so developers can watch what's happening while testing. Workflow arguments can be defined so that `--help` is auto-generated, and an `-i` flag enables to fill in missing arguments one by one. Custom tools can be created just by writing a TypeScript function with a description in the comment, which gets parsed automatically.
Each run (trace) tracks cost, token usage, and time, and limits can be set such as a maximum USD spend or a timeout. Run results can also be saved to a file to avoid re-running the same workflow.
Key points
- Combines different AI tools (Pi, Claude CLI, Codex CLI) under a single unified API
- Workflows are written in TypeScript rather than YAML, enabling parallel/sequential execution and fan-out
- Zod schemas can force AI responses into a format
- Built-in tracing and a TUI let you monitor each workflow stage as it runs
- Tracks cost, tokens, and time per run, with configurable spend and timeout limits