API Reference synaptic v#0.3.0-alpha.9
View SourceModules
Synaptic provides a declarative workflow engine with a DSL for orchestrating LLM-backed steps, human-in-the-loop pauses, and resumable executions.
Convenience registration and lifecycle facade for agent directory records.
Agent service/instance/task-reference directory facade with policy filtering.
Pluggable storage backend for services, instances, and task references.
In-memory GenServer-backed directory store.
Opaque-ish handle returned by agent router calls and jobs.
Behavior for host-provided agent discovery and invocation authorization.
Default policy: tenant-aware and permissive for non-private records, while private records require owner alignment when owner metadata is present.
Authorized routing and invocation for services, instances, and task references.
OTP application entry point that starts the registry, runtime supervisor, PubSub, and Finch pool required by Synaptic.
Dev-only coordinator workflow that calls the worker agent through Synaptic's Agent Router, recovers it through task references, and resumes it.
One-command helper for validating two-agent communication through the agent directory/router in development.
Dev-only worker agent workflow used by the two-agent router demo.
Demo workflow that uses the browser-use MCP sidecar to scrape the first 10 videos from Andrej Karpathy's YouTube channel.
Demo workflow that collects email/phone details with LLM-based routing.
Dev-only telemetry handler that tracks and logs LLM token usage and estimated costs across Synaptic workflow runs.
A small workflow available only in the dev environment so you can try the
Synaptic engine end-to-end from iex -S mix.
Demo workflow that uses the browser-use MCP sidecar to scrape a car listing from otomoto.pl (Polish automotive marketplace).
Demo workflow that uses the browser-use MCP sidecar to search otomoto.pl by car criteria. Uses the AI search field (Obsługiwane przez Otomoto AI) for brand and model, then dedicated filter panels (Rok, Paliwo, Przebieg, Cena) for year, fuel, mileage, and price. Returns listing links with a price range.
Demo workflow that uses the browser-use MCP sidecar to perform a deep VIN (Vehicle Identification Number) lookup. Uses Google first to discover relevant links, then visits VIN-specific sites (NHTSA, NICB, VinCheck, etc.) for specs, recalls, damage history, accidents, theft/salvage records, and title status.
Internal orchestrator that glues workflow definitions to runtime runners.
Behaviour for integrating with 3rd party eval services like Braintrust, LangSmith, etc.
Experimental API for running workflows against multiple inputs and scorers.
Facade for MCP connection normalization, discovery, and execution.
Behaviour for MCP transport adapters.
HTTP JSON-RPC adapter for MCP servers.
Descriptor for one MCP server.
Normalized MCP server discovery result.
Dev-oriented monitoring facade for Synaptic runtimes.
Normalized event envelope stored by the Synaptic monitor.
Standalone browser viewer for the Synaptic monitor.
Embeddable LiveView for browsing Synaptic monitor state inside a Phoenix app.
Registry used to name runner processes by run id and enumerate active runs.
GenServer that executes a workflow definition, tracking context, waiting states, retries, history, PubSub events, and suspend/resume logic.
DynamicSupervisor responsible for spinning up Synaptic.Runner processes.
Behaviour and helper types for step-level scoring in Synaptic workflows.
Immutable snapshot passed to scorers when evaluating a step.
Standardized result returned by scorers.
Metadata structure for compiled workflow steps.
Structured task reference memory record used for durable task lookup.
Main test runner module for executing Synaptic workflows from YAML test definitions.
Validates test expectations against workflow execution results. Supports regex matching for context field values.
Formats test results for console and JSON output.
Parses and validates YAML test definition files for Synaptic workflows.
Helper utilities for invoking LLM providers from workflow steps.
Behaviour for LLM adapter implementations.
Adapter that delegates a Synaptic chat request to local Codex non-interactive mode.
Minimal OpenAI chat client built on Finch.
Struct describing an LLM-callable tool.
Unified voice session API for headless and realtime integrations.
Helpers for building and validating normalized voice event envelopes.
DynamicSupervisor responsible for headless voice sessions.
Optional behaviour for providers that can keep a live STT stream and emit native partials.
ElevenLabs-oriented STT adapter that batches audio at end_turn and emits normalized STT messages.
ElevenLabs-oriented TTS adapter that emits raw PCM16 audio messages to the owning session.
Gemini-oriented STT adapter that batches audio at end_turn and emits normalized STT messages.
Gemini-oriented TTS adapter that emits raw PCM16 audio messages to the owning session.
OpenAI-oriented STT adapter with an OpenAI-compatible JSON transcription request.
OpenAI-oriented TTS adapter that emits chunked audio messages to the owning session.
DynamicSupervisor responsible for realtime voice sessions.
Behaviour for speech-to-text adapters used by voice sessions.
Unified registry for all voice sessions keyed by session id.
Optional behaviour for providers that can synthesize a single assistant turn over a persistent TTS stream.
Behaviour for text-to-speech adapters used by voice sessions.
Incremental text segmentation so TTS can start speaking before full text is available.
Behaviour for provider-specific transport event normalization helpers.
Normalizes application-owned decisions about whether a final transcript should resume a headless voice workflow or keep the current turn open.
DSL entry point for defining Synaptic workflows.
Manages workflow-backed agent instances and tracks their lifecycle in the AgentDirectory.