Skip to main content

Syngular lets you connect to AI agents running locally or in production, stream their outputs, and collect structured feedback without infrastructure overhead.

Project description

Syngular AI

Run on your laptop, chat instantly on syngularai.com 🚀

Syngular lets you connect to AI agents running locally or in production, stream their outputs, and collect structured feedback without infrastructure overhead.

Features

  • 🚀 Zero Infrastructure: No need to build your own UI - just focus on your agent
  • 📡 Real-time Streaming: Stream agent responses character by character to the Syngular UI
  • 📊 Rich Feedback Collection: Built-in support for thumbs, text, and option-based feedback
  • 📁 File Handling: Seamless file upload and processing from the UI
  • 🔄 Async Support: Full async/await support for non-blocking operations

Installation

pip install syngular-ai

Or with uv:

uv add syngular-ai

Quick Start

1. Create Your First Agent

from syngular_ai import entrypoint, MarkdownMessage, ThumbsFeedback

@entrypoint('@helloworld')
def helloworld(prompt: str):
    for char in 'hello':
        yield MarkdownMessage(
            content=f'{char}',
            feedback=[ThumbsFeedback(name='ratings')]
        )

2. Run Your Agent

For development (connects to Syngular cloud):

from syngular_ai import dev_listen

# Replace this with your API key from the profile section on syngularai.com.
dev_listen('your-api-key-here')

Advanced Examples

Agent with Inputs

from syngular_ai import entrypoint, TextInput, FileInput, StatusUpdate, OptionFeedback

@entrypoint(
    '@syngular/analyse', 
    inputs=[
        TextInput(name='url', placeholder='Enter company URL'),
        FileInput(name='file')
    ]
)
def analyse(prompt: str, inputs: list):
    # Process the inputs
    url = inputs[0]  # TextInput
    file_content = inputs[1].get_file_content()  # FileInput
    
    # Show status update
    yield StatusUpdate(
        icon='info', 
        text='Starting the process...'
    )
    
    # Stream response with feedback options
    for char in 'processing':
        yield MarkdownMessage(
            content=f'{char}',
            feedback=[
                OptionFeedback(
                    name='multioption', 
                    options=['Complete', 'Relevant'],
                    allow_multiple=True
                ),
                ThumbsFeedback(name='ratings'),
                TextFeedback(name='Leave a comment')
            ]
        )

API Reference

Decorators

@entrypoint(name, inputs=None)

Decorator for synchronous agent functions.

Parameters:

  • name (str): Agent name, must start with '@'
  • inputs (List[Input], optional): List of input specifications

Input Types

TextInput

Text input field for user prompts.

TextInput(name='prompt', placeholder='Enter your message')

FileInput

File upload input.

FileInput(name='document')

Message Types

MarkdownMessage

Rich text message with markdown support.

MarkdownMessage(
    content='**Bold text** and *italic*',
    feedback=[ThumbsFeedback(name='rating')]
)

StatusUpdate

Status indicator for long-running operations.

StatusUpdate(icon='info', text='Processing...')

Feedback Types

ThumbsFeedback

Thumbs up/down feedback.

ThumbsFeedback(name='rating')

OptionFeedback

Multiple choice feedback.

OptionFeedback(
    name='choice',
    options=['Option 1', 'Option 2'],
    allow_multiple=True
)

TextFeedback

Free text feedback.

TextFeedback(name='comment')

Server Functions

dev_listen(api_key)

Connect to Syngular cloud for development.

Parameters:

  • api_key (str): Your Syngular API key

Support

For support, please contact us at support@syngularai.com.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syngular_ai-0.1.0.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syngular_ai-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file syngular_ai-0.1.0.tar.gz.

File metadata

  • Download URL: syngular_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for syngular_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 649c7db8220bec922b226e4e3220eae11c8efc59dbe8319c1dacdce8e037b3b4
MD5 99e36d27fb3d65590126544246ed1f7e
BLAKE2b-256 75814f9b53396887ce6271e58d40435de08339eec2598808c5b4e3ffa3eaa007

See more details on using hashes here.

File details

Details for the file syngular_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: syngular_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for syngular_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eef236d193ad54cda0c94a130937c453ce21305c7faf5a19bc3549579909e725
MD5 247424550278e053257109d80c7ba659
BLAKE2b-256 947fc49ed59414923d8b69fc8630936a83c1c6c482a90d4de5b1279baf1b0537

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page