Reference
SDK reference
Every entry point of zidane and zidane-ui, generated from the TypeScript sources and their TSDoc. Import paths match the package exports.
Core#
zidaneThe root entry point, with the agent, providers, tools and presets re-exported alongside the runtime helpers that have no narrower entry.zidane/Type-only access to the public agent, session, context, decision and hook types, plus the typed error classes.types zidane/The agent core,agent createAgent(), with manual compaction, run summaries, cache telemetry and read-state helpers.zidane/The typed errors an agent run can throw, with the helpers that classify and convert provider failures.errors zidane/Ready-made agent option sets, pluspresets definePreset()andcomposePresets()to build and merge your own.
Providers#
zidane/Theproviders Providercontract, the shared provider helpers, OAuth credential handling and the Mistral, Z.ai and Cursor providers.zidane/The Anthropic provider for the Messages API, with API keys, Claude OAuth credentials or Amazon Bedrock.providers/ anthropic zidane/The OpenAI provider on the Responses API, with API keys or ChatGPT (Codex) OAuth credentials.providers/ openai zidane/A factory for any OpenAI-compatible Chat Completions endpoint, with the message and stream helpers it uses.providers/ openai-compat zidane/The OpenRouter provider, one API key for models from many vendors.providers/ openrouter zidane/The xAI Grok provider, with an API key or SuperGrok OAuth credentials.providers/ xai zidane/The Google Gemini providers, on the Gemini API with an API key or on Vertex AI with Google Cloud credentials.providers/ google zidane/The Cerebras provider for open models hosted on Cerebras.providers/ cerebras zidane/The Baseten Model APIs provider, with per-model reasoning settings.providers/ baseten zidane/The Neuralwatt provider, with the measured energy of every request.providers/ neuralwatt zidane/The Arcee provider for the Trinity family of open models.providers/ arcee zidane/A provider for a local OpenAI-compatible server such as Ollama, llama.cpp or LM Studio.providers/ local
Tools#
zidane/The built-in tools, the factories for shell, spawn, skills and interaction tools, and thetools ToolDeftypes.zidane/The opt-intools/ web-search web_searchtool, with Tavily, Brave or DuckDuckGo as the backend.zidane/The opt-intools/ fetch-url fetch_urltool, with an SSRF guard on every redirect hop.zidane/Every native tool's model-facing description as plain strings, free of runtime dependencies.tools/ prompts zidane/A QuickJS sandbox that runs model-written JavaScript with only injected tools as its capabilities.codemode
Contexts#
zidane/Execution contexts, the environments where an agent runs shell commands and reads and writes files.contexts zidane/The generic remote sandbox context and the provider interface that E2B and Daytona implement.contexts/ sandbox zidane/An execution context that runs commands and file operations inside a local Docker container.contexts/ docker zidane/A sandbox provider backed by E2B micro-VMs, hosted or self-hosted.contexts/ e2b zidane/A sandbox provider backed by Daytona.contexts/ daytona
Sessions#
zidane/Sessions, session stores and the provider-neutral message format that persists a conversation.session zidane/A SQLite-backed session store for Bun.session/ sqlite zidane/The Restate runtime for the agent loop, so model calls, tool calls and loop decisions are journaled.restate zidane/The durable runtime seam, so an agent run continues after its process crashes.durable zidane/A durable runtime that checkpoints agent runs in a SQLite file, for Bun.durable/ sqlite
Chat and clients#
zidane/The renderer-agnostic chat engine that backs the TUI and GUI hosts.chat zidane/The Node-free subset of zidane/chat, safe to import from a browser renderer.chat/ pure zidane/The terminal UI for zidane, built on React and OpenTUI.tui zidane/Run a prompt to completion without a UI and get one serializable result with the full trajectory.headless zidane/An Agent Client Protocol server that lets editors such as Zed drive a zidane agent.acp zidane/The shared chat host, its unix-socket daemon and the typed client that keeps several windows in sync.ipc zidane/The client side of remote zidane hosts, over WebSocket with saved servers and settings sync.ipc/ remote zidane/zidane/ipc/browser — a zidane-server client that runs wherever aipc/ browser WebSocketdoes: browsers, workers, Node, Bun. Nonode:*, noprocess: the kit's server adapter (zidane-ui/adapters) and any web app build on it. Node and Bun clients that keep saved hosts, trust a CA or share a machine usezidane/ipc/remote, which adds those on top.
Integrations#
Extensibility#
zidane/The Model Context Protocol client that connects servers and turns their tools into agent tools.mcp zidane/Discover, parse, define and install Agent Skills, the instruction packages a model loads on demand.skills zidane/A strict loader for Agent Plugins packages that bundle skills and MCP server config.plugins zidane/The extension API and the registry that discovers, installs and runs extensions in a zidane host.extensions zidane/6 exportsextensions/ testing
Utilities#
zidane/Helpers for splitting a system prompt into a cacheable static half and a per-turn dynamic half.prompt zidane/One import for the terminal and JSONL output renderers.output zidane/A terminal renderer that streams an agent run to stdout, with depth-aware output for sub-agents.output/ terminal zidane/A JSONL writer that emits one line per persisted turn, for pipes, logs and other programs.output/ stream-json zidane/The pieces zidane's own sign-ins are built from, for OAuth flows written outside the core.oauth zidane/26 exportsdist-feed zidane/Eval runner primitives that score headless agent runs and write artifacts.eval
UI kit#
zidane-uiThe design system behind the desktop app: tokens, buttons, menus, popovers, form controls, motion helpers and the theme engine.brands/3 exportsmarks code/4 exportsCodeHighlightProvider code/2 exportsHighlightedCode code/5 exportshighlighter code/2 exportsshiki-theme code/6 exportseditor/ environment theme/3 exportsaccents theme/19 exportscolor theme/4 exportscss-vars theme/12 exportsderive theme/1 exportsfrom-theme theme/3 exportsruntime-icons theme/2 exportsstylesheet theme/10 exportsthemes theme/1 exportswithout-transitions path6 exportszidane-ui/0 exportscode/ editor code/8 exportseditor/ CodeCompletion code/3 exportseditor/ CodeEditor code/7 exportseditor/ CodeHover code/2 exportseditor/ DiagnosticAnnotation code/10 exportseditor/ diagnostics code/3 exportseditor/ DiagnosticsChip code/5 exportseditor/ DiffView code/2 exportseditor/ edit-session code/3 exportseditor/ EditorColumn code/4 exportseditor/ FileIcon code/2 exportseditor/ FileTabPill code/8 exportseditor/ FileTree code/5 exportseditor/ FileView code/8 exportseditor/ find/ find-model code/2 exportseditor/ find/ FindBar code/2 exportseditor/ find/ settle-scroll code/4 exportseditor/ find/ useFind code/3 exportseditor/ fs-adapter code/2 exportseditor/ HighlightWorkers code/2 exportseditor/ language code/3 exportseditor/ LanguageEditor code/11 exportseditor/ patch-parse code/6 exportseditor/ pierre-theme code/2 exportseditor/ reveal code/5 exportseditor/ useCodeDocument code/1 exportseditor/ useDefinition code/1 exportseditor/ useDetachCleanup code/2 exportseditor/ useFileDocument code/2 exportseditor/ useRevealLine zidane-ui/0 exportscode/ editor/ patch-parse.worker zidane-ui/0 exportscode/ highlight.worker zidane-ui/0 exportsterminal terminal/3 exportsghostty terminal/1 exportskeys terminal/3 exportsTerminalSurface terminal/3 exportstheme terminal/2 exportsHostTerminalSurface terminal/7 exportsTerminalDrawer terminal/3 exportsTerminalPanel terminal/12 exportsTerminalProvider terminal/1 exportsuseTerminalLabels zidane-ui/26 exportsterminal/ headless zidane-ui/7 exportsterminal/ testing zidane-ui/6 exportsterminal/ testing/ contract zidane-ui/The label dictionary and provider for the design system's strings.labels zidane-ui/The kit's design tokens as a UnoCSS preset, plus a crisp Phosphor icon loader.uno zidane-ui/20 exportsapprovals zidane-ui/23 exportsapprovals/ headless zidane-ui/8 exportsapprovals/ testing zidane-ui/5 exportsapprovals/ testing/ contract zidane-ui/39 exportspalette zidane-ui/69 exportspalette/ headless zidane-ui/7 exportspalette/ testing zidane-ui/5 exportspalette/ testing/ contract zidane-ui/0 exportspalette/ rank.worker zidane-ui/97 exportssession zidane-ui/145 exportssession/ headless zidane-ui/21 exportssession/ testing zidane-ui/7 exportssession/ testing/ contract zidane-ui/61 exportsworkspace zidane-ui/103 exportsworkspace/ headless zidane-ui/6 exportsworkspace/ testing zidane-ui/6 exportsworkspace/ testing/ contract zidane-ui/19 exportsappearance zidane-ui/38 exportsappearance/ headless zidane-ui/6 exportsappearance/ testing zidane-ui/7 exportsappearance/ testing/ contract zidane-ui/23 exportsfiles zidane-ui/74 exportsfiles/ headless zidane-ui/6 exportsfiles/ testing zidane-ui/6 exportsfiles/ testing/ contract zidane-ui/23 exportskeybindings zidane-ui/28 exportskeybindings/ headless zidane-ui/4 exportskeybindings/ testing zidane-ui/6 exportskeybindings/ testing/ contract zidane-ui/215 exportssettings zidane-ui/152 exportssettings/ headless zidane-ui/24 exportssettings/ testing zidane-ui/41 exportssettings/ testing/ contract zidane-ui/59 exportsmachines zidane-ui/72 exportsmachines/ headless zidane-ui/14 exportsmachines/ testing zidane-ui/10 exportsmachines/ testing/ contract zidane-ui/34 exportsgit zidane-ui/68 exportsgit/ headless zidane-ui/13 exportsgit/ testing zidane-ui/5 exportsgit/ testing/ contract zidane-ui/70 exportsextensions zidane-ui/100 exportsextensions/ headless zidane-ui/0 exportsextensions/ kit zidane-ui/10 exportsextensions/ testing zidane-ui/9 exportsextensions/ testing/ contract zidane-ui/21 exportsapp zidane-ui/15 exportsapp/ headless zidane-ui/2 exportsapp/ testing
UI components#
components/4 exportsBrandMark components/4 exportsBrowserChrome components/10 exportsbutton components/2 exportsBreadcrumb components/3 exportsBrowserSignIn components/3 exportsChoiceCards components/4 exportsCodeFrame components/4 exportsConfirmDialog components/2 exportsCopyButton components/2 exportsEditableTitle components/7 exportsErrorBoundary components/36 exportsForm components/2 exportsHighlighted components/3 exportsHowItWorks components/6 exportsIconButton components/2 exportsIconToggle components/4 exportsKeycap components/5 exportskeyboard-layout components/2 exportsLightbox components/3 exportsMediaNav components/4 exportsZoomableImage components/2 exportsLoadError components/16 exportsMenu components/4 exportsOverlay components/4 exportsPanelEmpty components/7 exportsPanelRows components/2 exportsPreviewWindow components/9 exportsreport-error components/3 exportsReorderTabs components/3 exportsRowActionsMenu components/3 exportsSegmented components/2 exportsSegmentSpinner components/4 exportsStepFrame components/3 exportsStepper components/12 exportsSurface components/3 exportsSwatchPicker components/2 exportsSwitchGlyph components/5 exportsTabPill components/2 exportsZidaneMark components/2 exportsThemeThumb components/2 exportsToggleCard components/2 exportsRestricted components/2 exportsTooltip components/15 exportspalette/ PaletteList components/4 exportspalette/ PalettePanel components/2 exportsfloating/ FloatingSurface components/3 exportsfloating/ HoverCard components/3 exportsfloating/ Popover components/8 exportsfloating/ useAnchoredPosition components/5 exportsfloating/ usePopover
UI chat#
zidane-ui/The styled chat layer: provider, session list, transcript, composer and interaction cards bound to a ChatHost.chat zidane-ui/The React-free chat model, with the ChatHost interface, stores and the transcript pipeline.chat/ headless zidane-ui/Transcript row components, renderer slots and row actions.chat/ transcript zidane-ui/The prompt box, model and reasoning pickers, attachment helpers and mention suggestions.chat/ composer zidane-ui/103 exportschat/ sidebar zidane-ui/6 exportschat/ rich-composer zidane-ui/Cards for the questions and plans an agent waits on.chat/ interactions zidane-ui/24 exportschat/ testing zidane-ui/20 exportschat/ testing/ contract zidane-ui/Browser-safe ChatHost implementations that connect the chat components to an agent.adapters zidane-ui/Server helpers that serve a zidane chat engine to the browser over HTTP and SSE.server zidane-ui/8 exportsserver/ testing
UI onboarding#
zidane-ui/The setup wizard over an OnboardingHost: the provider, the flow with its eleven steps, and the hooks and the frame to build your own.onboarding zidane-ui/The setup wizard without components: the OnboardingHost contract, the run controller and the strings of the wizard.onboarding/ headless zidane-ui/7 exportsonboarding/ testing zidane-ui/6 exportsonboarding/ testing/ contract
UI motion and hooks#
motion/1 exportscollapse motion/2 exportsgrow motion/4 exportslayout-animating motion/11 exportspresence motion/2 exportsprovider motion/3 exportsreduced motion/5 exportsroll motion/2 exportsshimmer motion/6 exportssize motion/28 exportssprings motion/5 exportsswap motion/2 exportsSwapIcon motion/2 exportstitle-text hooks/3 exportskeyed-store hooks/6 exportsuseDisplayPath hooks/1 exportsuseMinuteTick hooks/2 exportsuseNearViewport hooks/5 exportsusePersistedState hooks/5 exportsuseResizeDrag hooks/3 exportsuseTabDrag