본문으로 건너뛰기

Architecture Overview

This section provides an overview of the Synapse SDK internal architecture for maintainers and contributors.

Design Principles

1. Plugin-First Architecture

The SDK is designed around a plugin system that allows extensibility without modifying core code.

  • Actions are the atomic units of work
  • Pipelines compose actions into workflows
  • Executors handle local or distributed execution

2. Type Safety

Strong typing throughout the codebase:

  • Pydantic models for configuration and data validation
  • Generic types for action parameters and results
  • Runtime type checking for plugin discovery

3. Separation of Concerns

Clear boundaries between modules:

  • clients/ - HTTP communication with backend services
  • plugins/ - Plugin system and action definitions
  • utils/ - Shared utilities (file, network, storage)
  • cli/ - Command-line interface

High-Level Architecture

┌─────────────────────────────────────────────────────────────┐
│ CLI Layer │
│ (typer, commands) │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ Plugin System │
│ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│ │ Actions │ │ Pipelines│ │ Executors│ │ Discovery │ │
│ └─────────┘ └──────────┘ └──────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ Client Layer │
│ ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Backend │ │ Agent │ │ Ray │ │ Pipeline │ │
│ └──────────┘ └───────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ Utilities Layer │
│ ┌────────┐ ┌─────────┐ ┌──────────┐ ┌────────────────┐ │
│ │ File │ │ Network │ │ Storage │ │ Authentication │ │
│ └────────┘ └─────────┘ └──────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Key Modules

ModulePurposeKey Classes
plugins.actionBase action classesBaseAction, @action
plugins.executorsExecution enginesLocalExecutor, RayExecutor
plugins.pipelinesWorkflow compositionPipeline, Step
clients.backendBackend API clientBackendClient
clients.agentAgent communicationAgentClient, RayClient

Next Steps