Synaptic (synaptic v0.3.0-alpha.8)
View SourceSynaptic provides a declarative workflow engine with a DSL for orchestrating LLM-backed steps, human-in-the-loop pauses, and resumable executions.
Summary
Functions
Calls a registered service/instance/task reference through the agent router.
Returns the status of an async agent job.
Starts an asynchronous routed job and returns a job handle.
Attaches a voice session to an already running workflow run.
Returns the step-level history collected for a workflow run.
Returns a snapshot of the current workflow state for a run id.
Returns a list of currently running workflows with their run ids, workflow module, and snapshot context.
Lists task references for a user from the built-in task reference memory.
Registers an agent/service definition in the directory.
Resumes a previously suspended workflow run with the supplied payload.
Starts a workflow module with the provided input context.
Starts a voice session and a workflow run in one call.
Stops a running workflow. Returns :ok when the runner terminates or
{:error, :not_found} if the run id is unknown.
Subscribes the calling process to PubSub events for the given run_id.
Unsubscribes the calling process from workflow events for the given run_id.
Fetches the compiled workflow definition for a module.
Functions
Calls a registered service/instance/task reference through the agent router.
Returns the status of an async agent job.
Starts an asynchronous routed job and returns a job handle.
Attaches a voice session to an already running workflow run.
Returns the step-level history collected for a workflow run.
Returns a snapshot of the current workflow state for a run id.
Options
:timeout- Timeout in milliseconds for the snapshot call (default: 5000). Use:infinityto wait indefinitely.
Returns a list of currently running workflows with their run ids, workflow module, and snapshot context.
Lists task references for a user from the built-in task reference memory.
Registers an agent/service definition in the directory.
Resumes a previously suspended workflow run with the supplied payload.
Starts a workflow module with the provided input context.
Options
:run_id- Custom run ID (defaults to auto-generated):start_at_step- Start execution at a specific step by name (atom). The step must exist in the workflow definition. The provided context should contain all data that would have been accumulated up to that step.
Examples
# Start from the beginning (default)
{:ok, run_id} = Synaptic.start(MyWorkflow, %{initial: :data})
# Start at a specific step with pre-populated context
{:ok, run_id} = Synaptic.start(MyWorkflow, %{precomputed: :value}, start_at_step: :middle_step)
Starts a voice session and a workflow run in one call.
Stops a running workflow. Returns :ok when the runner terminates or
{:error, :not_found} if the run id is unknown.
Subscribes the calling process to PubSub events for the given run_id.
Events are delivered as {:synaptic_event, %{run_id: ..., event: ...}} tuples.
Unsubscribes the calling process from workflow events for the given run_id.
Fetches the compiled workflow definition for a module.