Dynamiq
Get Started

SDK vs Platform

Decide when to build with the open-source Python SDK, when to use the Dynamiq platform, and how the two connect through tracing, YAML, the gateway, and deployment.

The SDK and the platform are two surfaces over the same execution engine. The open-source dynamiq package gives you full programmatic control in Python; the platform adds a visual Workflow builder, managed deployments (Apps), Knowledge Bases, tracing, evaluations, and team administration. Most production teams end up using both.

Decision guide

You want to…Use
Define workflows in Python, version them in git, run them in your own infrastructureSDK
Write custom node logic, function tools, or bespoke orchestration (graph state machines, custom callbacks)SDK
Embed agentic logic inside an existing Python service (FastAPI, workers, notebooks)SDK
Build workflows visually and iterate with non-engineersPlatformWorkflow builder
Deploy a workflow as a managed HTTPS endpoint with auth, streaming, and run historyPlatformApps
Managed RAG with sources, sync, chunking, and search testingPlatformKnowledge Bases
One API key and routing layer over many LLM providersPlatformAI Gateway
Run code anywhere but keep observability, evaluations, and governance in one placeBoth — SDK code + platform tracing

A useful rule of thumb: the SDK is a library you ship inside your application; the platform is a runtime and control plane that hosts, observes, and governs AI workloads — including ones built with the SDK.

The bridges

Nothing forces an either/or choice. Four integration points connect SDK code to the platform:

1. Tracing

Attach DynamiqTracingCallbackHandler to any run and the full execution tree — workflow, nodes, agent loops, LLM calls — is sent to the platform's trace collector (https://collector.getdynamiq.ai), where it shows up alongside traces from deployed Apps:

from dynamiq.callbacks import DynamiqTracingCallbackHandler
from dynamiq.runnables import RunnableConfig

tracing = DynamiqTracingCallbackHandler()  # auth via DYNAMIQ_ACCESS_KEY env var

result = workflow.run(
    input_data={"text": "Hola Mundo!"},
    config=RunnableConfig(callbacks=[tracing]),
)

See Tracing to Dynamiq for setup and what gets captured.

2. YAML workflows

Workflows serialize to a declarative YAML format and load back with full fidelity:

workflow.to_yaml_file("workflow.yaml")

from dynamiq import Workflow
restored = Workflow.from_yaml_file(file_path="workflow.yaml")

This is the same node/connection schema the platform uses, which makes YAML the interchange format between code-first and canvas-first work. See YAML workflows.

3. AI Gateway

Connection classes accept a custom url, so you can point any OpenAI-compatible connection at the platform's AI Gateway and get centralized key management, model routing, and per-project usage tracking without changing node code. See Remote connections and gateway.

4. Deploy from the SDK

The dynamiq CLI (installed with the package) authenticates against the platform and deploys SDK projects as managed services — dynamiq service deploy packages your source (or references a prebuilt image) and starts the deployment; dynamiq service status reports its state. See Deploy from the SDK and the CLI reference.

Feature map

CapabilitySDKPlatform
Workflows / DAG executionWorkflow, Flow, nodes in PythonVisual canvas, versions and releases
AgentsAgent node, Graph OrchestratorAgent node, orchestrator nodes, Chat
RAGEmbedders, splitters, vector-store nodesKnowledge Bases with managed ingestion
ServingYour own process (FastAPI, workers, …)Apps with auth, SSE, triggers, sessions
ObservabilityCallbacks, tracing handlersTrace explorer, run history
CredentialsEnv vars / connection objectsConnections stored per project
EvaluationsEvaluators in codeDatasets and evaluation runs

On this page