Build and manage AI workflows through modular and scalable Agents based on composite and reusable Templates.
🐍 Installation • ⚡ Quickstart • 🎯 Features • 👀 Examples • 🐳 Docker images • 📙 Documentation • 📚 Available sinapsis packages 🔍 License
Welcome to Sinapsis! The all-in-one AI-native platform that unifies the most powerful and innovative AI tools, from computer vision and NLP to GenAI, speech processing, time-series analysis, and beyond. Whether you're building, experimenting, or deploying, Sinapsis empowers you to create seamless end-to-end workflows, unlocking new possibilities and accelerating AI-driven innovation like never before. Join us in shaping the future of AI!
Important
Sinapsis requires Python 3.10 or higher.
We strongly encourage the use of uv
, although any other package manager should work too.
If you need to install uv
please see the official documentation.
- Install using your favourite package manager.
Example with uv
:
uv pip install sinapsis --extra-index-url https://pypi.sinapsis.tech
or with raw pip
:
pip install sinapsis --extra-index-url https://pypi.sinapsis.tech
CLI usage
The Sinapsis CLI provides an easy way to run agents and get information about templates:
# Run an agent with a config file
sinapsis run config.yml
# Run an agent with profiler enabled
sinapsis run config.yml --enable-profiler
# List all available templates
sinapsis info --all-template-names
# Get detailed info about a specific template
sinapsis info --template TemplateName
# Get example config for a template
sinapsis info --example-template-config TemplateName
# Display info for all templates
sinapsis info --all
📖 Hello World Sinapsis
Create a config file my_test_agent.yml:
You can also use the ones defined under the src/configs/
folder
agent:
name: my_test_agent
templates:
- template_name: InputTemplate-1
class_name: InputTemplate
attributes: {}
- template_name: HelloWorld-1
class_name: HelloWorld
template_input: InputTemplate-1
attributes:
display_text: "Hello, this is my first template!"
Run the agent:
sinapsis run my_test_agent.yml
Output
... | DEBUG | my_test_agent:__instantiate_templates:105 - Initialized template: InputTemplate-1
... | DEBUG | my_test_agent:__instantiate_templates:105 - Initialized template: HelloWorld-1
... | DEBUG | my_test_agent:_log_agent_execution_order:119 - Execution Order
... | DEBUG | my_test_agent:_log_agent_execution_order:122 - Order: <<0>>, template name: <<InputTemplate-1>>
... | DEBUG | my_test_agent:_log_agent_execution_order:122 - Order: <<1>>, template name: <<HelloWorld-1>>
... | INFO | my_test_agent:_lazy_init:63 - Agent and templates initialized
... | INFO | my_test_agent:signal_block_if_needed:156 - Signaling block mode for HelloWorld-1 no: 2/2
... | INFO | my_test_agent:all_templates_finished:192 - All templates returned finished, stopping execution...
... | DEBUG | .../run_agent_from_config.py:run_agent_from_config:41 - result: DataContainer(container_id=abc..., images=[], audios=[], texts=[TextPacket(content='Hello, this is my first template!', id='abc...', source='HelloWorld-1', modified_by_templates=['HelloWorld-1'], embedding=[], generic_data={}, annotations=None)], time_series=[], binary_data=[], generic_data={})
Agents
- Declarative workflows
- Multiple execution modes:
- Generator
- Single execute
- Continuous execution
- Sophisticated template orchestration:
- Topological sorting of execution order
- Parallel template execution
- Execution blocking control
- Built-in profiling capabilities:
- Execution time tracking
- State management:
- Dynamic attribute updates
- Failure handling
Templates
- Self-contained components
- Modular task-focused execution
- Eager or lazy evaluation
- Dynamic template definitions
- Composite templates
- SubAgents
Data Containers
- Universal data transport
- Domain agnostic design
- Native built-in support for images, audio, text, time series
- Multimodal data
General
- Data Validation and Type Safety through Pydantic
- YAML-based configuration files
- Command Line Interface
You can find specific implementations of templates in:
-
Static Templates
-
Dynamic Templates
🐳 Docker images
Sinapsis provides Docker images with all dependencies pre-configured. When you want to use docker to test an app within the project, you need to make sure the sinapsis base images are built in your system. To build the images:
- Clone the repository:
git clone [email protected]:Sinapsis-ai/sinapsis.git
cd sinapsis
- Build the image
docker compose -f docker/compose.yaml build
This will create two docker images:
- sinapsis:base: Contains UV package manager, git with SSH support, and Python 3.10 environment.
- sinapsis-nvidia:base: Same as base plus CUDA 12.4.0 support for GPU acceleration.
Documentation is available on the sinapsis website
Tutorials for different projects within sinapsis are available at sinapsis tutorials page
The sinapsis framework contains a list of public packages with Templates covering a wide range of tasks, including computer vision, time series, nlp, llm'. These packages include:
sinapsis data tools
sinapsis langchain
sinapsis image transforms
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.
For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.