Sling
Slingdata.ioBlogGithubHelp!
  • Introduction
  • Sling CLI
    • Installation
    • Environment
    • Running Sling
    • Global Variables
    • CLI Pro
  • Sling Platform
    • Sling Platform
      • Architecture
      • Agents
      • Connections
      • Editor
      • API
      • Deploy from CLI
  • Concepts
    • Replications
      • Structure
      • Modes
      • Source Options
      • Target Options
      • Columns
      • Transforms
      • Runtime Variables
      • Tags & Wildcards
    • Hooks / Steps
      • Check
      • Command
      • Copy
      • Delete
      • Group
      • Http
      • Inspect
      • List
      • Log
      • Query
      • Replication
      • Store
      • Read
      • Write
    • Pipelines
    • Data Quality
      • Constraints
  • Examples
    • File to Database
      • Custom SQL
      • Incremental
    • Database to Database
      • Custom SQL
      • Incremental
      • Backfill
    • Database to File
      • Incremental
    • Sling + Python 🚀
  • Connections
    • Database Connections
      • Athena
      • BigTable
      • BigQuery
      • Cloudflare D1
      • Clickhouse
      • Databricks
      • DuckDB
      • DuckLake
      • Iceberg
      • MotherDuck
      • MariaDB
      • MongoDB
      • Elasticsearch
      • MySQL
      • Oracle
      • Postgres
      • Prometheus
      • Proton
      • Redshift
      • S3 Tables
      • StarRocks
      • SQLite
      • SQL Server
      • Snowflake
      • Trino
    • Storage Connections
      • AWS S3
      • Azure Storage
      • Backblaze B2
      • Cloudflare R2
      • DigitalOcean Spaces
      • FTP
      • Google Drive
      • Google Storage
      • Local Storage
      • Min.IO
      • SFTP
      • Wasabi
Powered by GitBook
On this page
  • What is an agent?
  • How does the agent work?
  • Running an Agent
  • How do development and production agents differ?
  • What about my Connection Credentials?
  1. Sling Platform
  2. Sling Platform

Agents

PreviousArchitectureNextConnections

Last updated 4 days ago

What is an agent?

To put it simply, an agent is a container for your data pipelines. It runs in the background and waits for data jobs (such as replications). You can run an agent using Docker or by using the Sling CLI. An agent can run on any machine (Windows, Mac, Linux) and connects to the control server via a secure WebSocket connection (TLS). There is no need to open ports or configure firewalls.

How does the agent work?

Upon starting, the agent will connect to the control server, using a provided API Key, and will wait for jobs to be assigned to it. It will then execute the job (data will flow only through it) and then send the results back to the control server (such as logs, errors, number of rows processed, etc). The agent will continue to run and wait for new jobs to be assigned to it.

Running an Agent

You can simply use the sling agent command from the CLI or Docker.

$ sling agent
agent - Manage the local sling agent

See more details at https://docs.slingdata.io/sling-cli/

  Usage:
    agent [run]

  Subcommands: 
    run   run the sling agent

  Flags: 
       --version   Displays the program version string.
    -h --help      Displays help with available flag, subcommand, and positional value parameters.

Before running it, you need to obtain the SLING_AGENT_KEY from the Sling Platform UI.

Once you have the key, you can start the agent by running sling agent run.

export SLING_AGENT_KEY='....'

sling agent run
export SLING_AGENT_KEY='....'

sling agent run
# using windows Powershell
$env:SLING_AGENT_KEY='....'

sling agent run
export SLING_AGENT_KEY='....'

docker run -d -e SLING_AGENT_KEY slingdata/sling agent run
services:
  sling-agent:
    image: slingdata/sling
    command: agent run
    container_name: sling-agent
    restart: unless-stopped
    environment:
      SLING_AGENT_KEY: '....'
    volumes:
      - agent_data:/home/sling

volumes:
  agent_data:

How do development and production agents differ?

A development agent is a special agent, with defined limits, that is used for development purposes. It is not billed, nor intended for production use, and therefore will not be selected for scheduled jobs. All plans include one development agent. On the other hand, a production agent will be selected for scheduled jobs, and requires a paid plan.

What about my Connection Credentials?

If you choose to self-host your Sling Agent, you can define a local env.yaml file to store your connection credentials (on the machine). Using this method, the sensitive credentials will never leave the agent. You can also store your credentials in the Sling Control Server, per project, which is securely transmitted over TLS and encrypted at rest.

Sling Platform Agent