Skip to main content

Crate zag_orch

Crate zag_orch 

Source
Expand description

Orchestration library for zag — multi-session coordination for AI coding agents.

This crate provides the orchestration primitives: spawn, wait, collect, pipe, status, events, cancel, summary, watch, subscribe, retry, gc, and more. It depends on zag-agent for shared types (session_log, config, session, process_store) and for agent execution (AgentBuilder in pipe).

Modules§

cancel
Cancel command: graceful session cancellation with clean log entry.
collect
Collect command: gather results from multiple sessions.
duration
Duration parsing utilities for timeout and wait commands.
env
Env command: export session environment variables for nested agent invocations.
events
Events command: structured event query API for session logs.
gc
GC command: clean up old session data, logs, and process entries.
lifecycle
Filesystem lifecycle markers for external orchestrators.
listen
Listen command: tail a session’s JSONL log file and output parsed events in real-time.
log_cmd
Log command: append a custom structured event to a session’s log.
output_cmd
Output command: extract the final result text from a session.
pipe
Pipe command: chain session results into a new session.
ps
retry
Retry command: re-run a failed session with the same configuration.
search
spawn
Spawn command: launch an agent session in the background and return the session ID.
status
Status command: machine-readable session health check.
subscribe
Subscribe command: multiplexed event stream from all active sessions.
summary
Summary command: log-based session summarization and stats.
types
Shared types for orchestration commands.
util
Utility functions for orchestration commands.
wait
Wait command: block until one or more sessions complete.
watch
Watch command: event-driven reactions on session log events.
whoami