Docs

A reference implementation on AWS, service by service

Every AWS service the engine uses, what it does, which part of the engine runs in it and whether that part is Rust or a managed service; a request traced through the real services; the template; and the cost model with its arithmetic, down to what one free project costs.

Applies to EngineCloud At launch

View as Markdown
On this page
  1. The services
  2. Where the Rust is, and where the logic is
  3. From crates to functions to services
  4. One request through the real services
  5. Limits and settings in one place
  6. The template
  7. Postgres: which one, and why
  8. The cost model
  9. Prices used
  10. An idle deployment
  11. Unit costs
  12. Two self-hosted examples
  13. One project on Sypnia Cloud’s Free plan
  14. Questions this model leaves open
  15. What changed from the system this comes from
  16. Next

Deployment shapes says the engine can run as functions on AWS. This page is that deployment with the names on: which AWS service does what, where the Rust code runs, where the engine’s logic lives, what each service is limited to, and what it costs. It is the deployment the template sypnia-aws.yaml creates, and the one Sypnia Cloud runs Cloud.

The services

Nine AWS services. One of them, Lambda, runs the engine’s code, as three functions. The last column is the answer to «is this Rust, or is this Amazon?».

AWS serviceWhat it does hereWhich part of the engineRust code, or managed
Amazon CloudFrontThe one HTTPS address. Sends /v1/ingest/*, /v1/otlp/* and /v1/sdk.js to the ingest function and everything else to the API function. Caches only /v1/sdk.jsNone. It forwardsManaged. Configuration: two path rules
AWS Lambda, function sypnia-ingestReceives what SDKs sendIngest: the seven gates, then the batch goes to the queue; replay chunks and snapshots go to the BucketRust: the sypnia binary with SYPNIA_ROLE=ingest
AWS Lambda, function sypnia-workerDoes all the work that is not a requestThe worker: writing segments, the Fast path, the Roll-up, the agent’s jobs, Alerts and webhooks, uptime checks, retention, ParquetRust: the same binary with SYPNIA_ROLE=worker
AWS Lambda, function sypnia-apiAnswers people and coding agentsThe API, the MCP server and the ConsoleRust: the same binary with SYPNIA_ROLE=api
Amazon SQS, the intake queue and its dead-letter queueHolds validated batches until the worker has written them; parks the ones that failed five timesNone. It is the buffer a function cannot keep in memoryManaged. Configuration: retention, visibility timeout, maxReceiveCount
Amazon EventBridge SchedulerWakes the worker every minuteNone. The worker decides what is dueManaged. Configuration: rate(1 minute)
Amazon S3The Bucket: segments, per-session files, replay chunks, snapshots, source maps, ParquetNone. Keys are built by the engine; retention is the engine’s daily jobManaged. Configuration: private, encrypted, one rule for unfinished uploads, CORS for replay links
Amazon RDS for PostgreSQLPostgres: the ledger, problems, numbers, the session index, alerts, jobsNone. No stored procedure, no trigger, no extensionManaged. Or any Postgres 15 or later of yours
AWS Secrets ManagerHolds the generated password of the database the template createsNoneManaged
Amazon CloudWatchA log group per function, kept 30 days; three alarmsNone. The alarms watch the engine from outsideManaged. Configuration: three thresholds
AWS IAMOne role per function, each with the least it needsNoneManaged

Not used, on purpose: no load balancer, no API gateway, no container cluster, no NAT gateway, no stream, no cache, no search service, no workflow service, no second database.

The Sypnia engine and Sypnia Cloud compared
Sypnia engineOpen source, self-hostedSypnia CloudPaid service, with a free tier
E-mailNone. Alerts are recorded and sent to your webhook; the guides show how to send e-mail from it.Amazon SES: alert e-mails and the daily summary.
AI providerYours, off until you set a key. The worker calls it over HTTPS.OpenRouter, with settings that forbid providers from keeping or training on the data.
Accounts, billing, the app, the GitHub AppNot in the engine.The private app. It is a client of the engine's public API, like your own tools; it has its own database and adds no logic to the engine.

Where the Rust is, and where the logic is

Diagram to drawARCHITECTURE DIAGRAM with AWS service names, inside one frame «AWS account · us-east-1 · stack: sypnia». The three Lambda functions are the LIT elements (accent fill) and carry a small «Rust» tag each; every other node is drawn in the neutral tone with a small «managed» tag. LEFT, outside the frame: «Your app (SDK)» and below it «You · your coding agent · your CI». INSIDE, left to right: node «Amazon CloudFront · the address» (two outgoing arrows labelled «/v1/ingest/* · /v1/otlp/* · /v1/sdk.js» and «everything else»); LIT box «AWS Lambda · sypnia-ingest» with the sub-label «Ingest: the seven gates» and the tag «256 MB · 10 s · 40 copies»; queue symbol «Amazon SQS · intake queue» with a smaller one under it «dead-letter queue · 14 days»; LIT box «AWS Lambda · sypnia-worker» with FIVE small inner tiles stacked: «write segments», «Fast path», «Roll-up», «The agent», «Alerts · uptime · retention» and the tag «1,024 MB · 15 min · 2 copies»; above the worker a clock «Amazon EventBridge Scheduler · every minute»; a curved arrow from the worker to itself labelled «agent jobs»; to the right two stores stacked: «Amazon S3 · the Bucket» and «Amazon RDS for PostgreSQL · Postgres»; bottom row a LIT box «AWS Lambda · sypnia-api» with the sub-label «API · MCP server · Console» and the tag «512 MB · 30 s · 20 copies». Small nodes in a corner strip labelled «around it»: «AWS Secrets Manager · database password», «Amazon CloudWatch · logs + 3 alarms», «AWS IAM · one role per function». ARROWS: Your app → CloudFront → sypnia-ingest; sypnia-ingest → intake queue «SendMessage»; sypnia-ingest → S3 «replay chunks, snapshots»; intake queue → sypnia-worker «up to 10 s of messages»; intake queue ⇢ dead-letter queue (dashed) «after 5 deliveries»; sypnia-worker → S3 «segments, session files, Parquet»; sypnia-worker → RDS «ledger, problems, numbers, jobs»; You → CloudFront → sypnia-api; sypnia-api → RDS «reads»; sypnia-api → S3 «signed links». OUTSIDE the frame on the right, dashed: «AI provider (yours · Sypnia Cloud: OpenRouter)» and «Your webhook», each with an arrow from sypnia-worker; and a dashed cloud-only box «Sypnia Cloud only: Amazon SES · the private app» with a cloud badge. A legend with two swatches: accent «the engine: Rust, all the logic» and neutral «AWS managed services: they move and hold bytes». Numbered callouts (1) CloudFront, (2) sypnia-ingest, (3) the queues, (4) sypnia-worker, (5) the scheduler, (6) S3, (7) RDS, (8) sypnia-api.
Figure. The reference implementation. The three lit boxes are the engine: one Rust binary, three roles. Everything else is a managed service that moves or holds bytes.

Three statements, each of which you can check in the template and in the code:

  1. Everything inside the three functions is the engine, and the engine is Rust. The functions run the same file, sypnia, built for arm64 and started by Lambda as its bootstrap. There is no Node, Python or Java runtime in the deployment, and no second program.
  2. AWS services move and hold bytes. CloudFront forwards a request. SQS keeps a message. S3 keeps an object. Postgres keeps rows. The scheduler sends one fixed JSON document a minute. None of them inspects an event.
  3. No logic lives in a service’s configuration. What the template configures is numbers and names: two path rules, a retention, a visibility timeout, the 5 of the dead-letter rule, a rate, three alarm thresholds, the roles. There is no request-mapping template, no rule with a filter, no code at the edge, no bucket notification, no stored procedure, no trigger, no workflow definition. Retention is not even a bucket lifecycle rule: it is the engine’s daily job, so it is the same on any S3-compatible store.

That third statement is what makes the engine portable. Replace SQS by memory and Lambda by a process, and you have the one-process shape, with the same code deciding the same things.

From crates to functions to services

Diagram to drawTHREE-COLUMN MAPPING DIAGRAM with connecting lines. LEFT COLUMN titled «Crates (Rust)»: eleven small nodes stacked in the layers of the codebase diagram, exact labels: «sypnia (binary): main, lambda, Engine», «sypnia-ingest», «sypnia-pipeline», «sypnia-agent», «sypnia-alerts», «sypnia-api», «sypnia-store», «sypnia-db», «sypnia-fingerprint», «sypnia-core». MIDDLE COLUMN titled «Functions (the same binary, by role)», three larger LIT boxes: «sypnia-ingest · SYPNIA_ROLE=ingest», «sypnia-worker · SYPNIA_ROLE=worker», «sypnia-api · SYPNIA_ROLE=api». RIGHT COLUMN titled «AWS services», nodes: «Amazon CloudFront», «Amazon SQS», «Amazon EventBridge Scheduler», «Amazon S3», «Amazon RDS for PostgreSQL», and dashed «AI provider», «Your webhook». LINES left → middle (which crate's code runs in which function): sypnia-ingest → sypnia-ingest function (label «gates, send») and → sypnia-worker function (label «the queue's other end: write segments»); sypnia-pipeline → sypnia-worker; sypnia-agent → sypnia-worker (label «jobs») and → sypnia-api (label «the prompt»); sypnia-alerts → sypnia-worker; sypnia-api → sypnia-api function; a bracket around sypnia-store, sypnia-db, sypnia-fingerprint, sypnia-core labelled «linked into all three»; the binary crate → all three with the label «main → lambda::run(role)». LINES middle → right (what each function is allowed to touch, with the permission as the label): sypnia-ingest function → SQS «send»; → S3 «put only»; ← CloudFront «invoked by». sypnia-worker function ← SQS «receives, deletes, delays»; ← Scheduler «every minute»; → S3 «read and write»; → RDS «read and write»; → AI provider; → Your webhook. sypnia-api function ← CloudFront; → RDS «read, and the writes of the API»; → S3 «read + sign». Under the diagram one line: «the left column is all the logic; the right column has none». Numbered callouts (1) left column, (2) middle, (3) right.
Figure. Which crate runs in which function, and which service each function may touch. The left column holds all the logic.
CrateRuns inReaches
sypnia (the binary): main, lambda, EngineAll three functionsThe Lambda runtime
sypnia-ingestsypnia-ingest: the gates and the send. sypnia-worker: the queue’s other end, which writes segmentsSQS, S3
sypnia-pipelinesypnia-workerS3, Postgres
sypnia-agentsypnia-worker: the jobs. sypnia-api: the promptS3, Postgres, the AI provider
sypnia-alertssypnia-workerPostgres, your webhook, the addresses of your uptime checks
sypnia-apisypnia-apiPostgres, S3 (read, and signing links)
sypnia-store, sypnia-dbAll threeS3; Postgres
sypnia-fingerprint, sypnia-coreAll threeNothing: no I/O

The functions share one entry point. It is the main of Deployment shapes; these are the lines that matter here. Notice that the role is the only thing that differs between the three functions, and that it is read from the environment the template sets.

crates/sypnia/src/main.rs
    // Bucket, Postgres, the AI provider (or none), the alert sinks. Built once, shared by everything.
    let engine = match Engine::connect(config.clone()).await {
        Ok(engine) => Arc::new(engine),
        Err(error) => return fail(4, &error),
    };

    // Inside AWS Lambda the runtime sets this variable and there is no command line.
    if std::env::var_os("AWS_LAMBDA_RUNTIME_API").is_some() {
        return exit(lambda::run(engine, config.role).await); // SYPNIA_ROLE: ingest | worker | api
    }

One request through the real services

The failed payment of the overview, with the service that carries each step, its time budget, its limit and what happens when that service fails. The failure column is a summary; What happens when something fails has every case.

#StepServiceBudgetThe limit that appliesIf it fails
1The browser sends POST /v1/ingest/eventsCloudFront → Lambda sypnia-ingest50 ms warm; 300 ms for a cold functionBody: 2 MiB after decompression (the engine’s), 6 MB (Lambda’s). 10 s. 40 copies; beyond them the address answers 429The SDK keeps the batch and retries with the same batch_id
2Ingest sends the validated batchSQS SendMessage20 ms256 KiB a message; a batch over 192 KiB compressed goes to S3 and the message names it503; the SDK retries
3Ingest answers 200Lambda → CloudFront———
4The queue hands the batch to the workerSQS → Lambda sypnia-workerUp to 10 s500 messages or 6 MB a delivery. 2 copies. Visibility 15 minDelivered again after 15 s, 1 min, 5 min, 15 min; then the dead-letter queue
5The worker writes the segmentS3 PutObject300 ms4 MiB a segment, before compressionThe message is not deleted; step 4 repeats
6The worker writes the ledger row, scans the segment, writes the problem, its alert and its jobRDS for PostgreSQL, one transaction50 ms; 5 s for the scan3 connections per worker copyThe segment stays leased 2 minutes, then another try; 5 tries, then quarantine
7The worker calls itself with the jobLambda Invoke, asynchronous100 msLambda’s own retries off: the job row is the retryThe minute tick finds the row
8The agent reads maps and the session, calls the model, writes the sentenceS3 GetObject; HTTPS to the AI provider; Postgres60 s15 min for the function; 3 tries for the jobThe alert leaves on time without the sentence; analysis.status: failed
9The alert is released to your webhookHTTPS from the worker10 s7 tries over 21 hoursThe alert is recorded all the same
10Every minute: one passEventBridge Scheduler → Lambda sypnia-worker1 s when idle2 copies shared with steps 4, 7 and 8The next tick does it
11Your coding agent calls the MCP tool problemCloudFront → Lambda sypnia-api → Postgres300 msAnswer: 6 MB (Lambda’s); 30 s; 20 copies; 2 connections per copy503 with Retry-After: 2
12You open the replaysypnia-api signs links; the browser reads S3 directly300 ms for the linksA link lives 15 minutes; chunks never pass through a function503; the list of problems still works

Limits and settings in one place

WhereSettingValueWhy this value
sypnia-ingestMemory, time limit, copies256 MB, 10 s, 40It only checks and forwards. 40 copies at 50 ms accept about 800 batches a second
sypnia-workerMemory, time limit, copies1,024 MB, 15 min, 2Two projects rolled at once (2 × 256 MB), the source-map cache, room. The daily job may need the 15 minutes
sypnia-apiMemory, time limit, copies512 MB, 30 s, 20A session’s detail is built in memory, inside a 4 MB budget
All functionsArchitecture, runtimearm64, provided.al2023A native binary; no language runtime to start
All functionsEnvironmentUnder 4 KB in allLambda’s limit. The engine needs about 12 settings
Intake queueRetention, visibility, deliveries4 days, 15 min, 5See Reliability
Dead-letter queueRetention14 daysThe longest SQS allows
Queue → workerBatch, window, answer500 messages or 6 MB, 10 s, failures reported per messageOne bad message does not send the others back
SchedulerRateEvery minuteOne schedule; daily and weekly work is started by the pass when due
BucketEncryption, accessAt rest, privateFunctions reach it through their roles; browsers through 15-minute signed links
PostgresConnectionsAt most 86: 40 × 1, 20 × 2, 2 × 3Fits the smallest instance, which accepts about 100
AlarmsThreeDead-letter queue not empty; oldest message over 120 s for 3 minutes; worker failing in 3 of 5 minutesThey work when the engine does not

The two copies of the worker are shared by the queue’s deliveries, the minute tick and agent jobs. When all are busy, a new call waits: a message stays in the queue, an asynchronous call is held by Lambda. Nothing is lost; work is later. This is the first number to raise when lag_seconds grows, together with the database’s connections.

The template

The whole deployment is one file, sypnia-aws.yaml. This excerpt is the part this page talks about: the three functions, the queue with its dead-letter rule, the schedule and one alarm. Left out: the distribution, the bucket, the database, the other two alarms and the outputs. How to deploy it is in Deploy on AWS.

deploy/sypnia-aws.yaml (excerpt)
Transform: AWS::Serverless-2016-10-31

Globals:
  Function:
    Runtime: provided.al2023          # no language runtime: the package is the sypnia binary, named bootstrap
    Handler: bootstrap
    Architectures: [arm64]
    CodeUri: { Bucket: !Ref CodeBucket, Key: !Sub "sypnia/${Version}/sypnia-lambda-arm64.zip" }
    Environment:
      Variables:
        SYPNIA_ROOT_TOKEN: !Ref RootToken
        SYPNIA_STORAGE_BUCKET: !Ref Bucket
        SYPNIA_DATABASE_URL: !If [CreateDb, !Sub "postgres://sypnia:{{resolve:secretsmanager:${DatabaseSecret}:SecretString:password}}@${Database.Endpoint.Address}:5432/sypnia?sslmode=require", !Ref DatabaseUrl]
        SYPNIA_INTAKE_QUEUE_URL: !Ref IntakeQueue                       # the queue stands in for the in-memory buffer
        SYPNIA_INTAKE_DEAD_LETTER_QUEUE_URL: !Ref IntakeDeadLetterQueue # read by /v1/engine/status and sypnia doctor

Resources:
  IngestFunction:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: sypnia-ingest
      MemorySize: 256
      Timeout: 10
      ReservedConcurrentExecutions: 40
      FunctionUrlConfig: { AuthType: NONE }   # reached through the distribution; the engine checks every key itself
      Environment: { Variables: { SYPNIA_ROLE: ingest, SYPNIA_DATABASE_MAX_CONNECTIONS: "1" } }
      Policies:
        - SQSSendMessagePolicy: { QueueName: !GetAtt IntakeQueue.QueueName }
        - Statement: [{ Effect: Allow, Action: "s3:PutObject", Resource: !Sub "${Bucket.Arn}/*" }]

  ApiFunction:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: sypnia-api
      MemorySize: 512
      Timeout: 30
      ReservedConcurrentExecutions: 20
      FunctionUrlConfig: { AuthType: NONE }
      Environment: { Variables: { SYPNIA_ROLE: api, SYPNIA_DATABASE_MAX_CONNECTIONS: "2" } }
      Policies:
        - S3ReadPolicy: { BucketName: !Ref Bucket }                    # read, and sign links to read

  WorkerFunction:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: sypnia-worker
      MemorySize: 1024
      Timeout: 900
      ReservedConcurrentExecutions: 2
      Environment: { Variables: { SYPNIA_ROLE: worker, SYPNIA_DATABASE_MAX_CONNECTIONS: "3" } }
      EventInvokeConfig: { MaximumRetryAttempts: 0 }                    # a job is a row in Postgres: the row is the retry
      Policies:
        - S3CrudPolicy: { BucketName: !Ref Bucket }
        - Statement:
            - { Effect: Allow, Action: "lambda:InvokeFunction", Resource: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:sypnia-worker" }
            - { Effect: Allow, Action: "sqs:GetQueueAttributes", Resource: !GetAtt IntakeDeadLetterQueue.Arn }
      Events:
        Intake:
          Type: SQS
          Properties:
            Queue: !GetAtt IntakeQueue.Arn
            BatchSize: 500
            MaximumBatchingWindowInSeconds: 10
            FunctionResponseTypes: [ReportBatchItemFailures]             # only the messages that failed come back
            ScalingConfig: { MaximumConcurrency: 2 }
        EveryMinute:
          Type: ScheduleV2
          Properties:
            ScheduleExpression: rate(1 minute)
            Input: '{"job":"pass"}'

  IntakeQueue:
    Type: AWS::SQS::Queue
    Properties:
      VisibilityTimeout: 900                  # not shorter than the worker's time limit
      MessageRetentionPeriod: 345600          # 4 days
      ReceiveMessageWaitTimeSeconds: 20
      SqsManagedSseEnabled: true
      RedrivePolicy:
        deadLetterTargetArn: !GetAtt IntakeDeadLetterQueue.Arn
        maxReceiveCount: 5                    # the fifth failed delivery is the last

  IntakeDeadLetterQueue:
    Type: AWS::SQS::Queue
    Properties:
      MessageRetentionPeriod: 1209600         # 14 days
      SqsManagedSseEnabled: true

  DeadLetterNotEmpty:
    Type: AWS::CloudWatch::Alarm
    Properties:
      AlarmDescription: Batches were set aside. Look at one, fix the cause, redrive.
      Namespace: AWS/SQS
      MetricName: ApproximateNumberOfMessagesVisible
      Dimensions: [{ Name: QueueName, Value: !GetAtt IntakeDeadLetterQueue.QueueName }]
      Statistic: Maximum
      Period: 60
      EvaluationPeriods: 1
      Threshold: 0
      ComparisonOperator: GreaterThanThreshold
      TreatMissingData: notBreaching

What wakes the worker is told apart by the shape of the event, in worker_event of Deployment shapes: { "Records": […] } is the queue, { "job": "pass" } is the schedule, { "job": { "agent": { "problem": "prb_8f3k2m9x4q7w" } } } is the worker calling itself.

Postgres: which one, and why

The reference uses Amazon RDS for PostgreSQL, one small instance in one availability zone: db.t4g.micro, Postgres 16, 20 GB, encrypted, backups kept 7 days. It is what the template creates when CreateDatabase is true.

OptionIdle cost a monthGoodThe price you pay
RDS for PostgreSQL, db.t4g.micro (the reference)11.68 + 2.30 of diskThe cheapest managed Postgres on AWS; a fixed bill; plain PostgresOne zone: a failure of the instance is minutes of «receiving works, reading does not». About 100 connections
RDS, two zones (Multi-AZ)Twice the instance and the diskFails over by itself in a minute or twoTwice the price for a database the Bucket can mostly rebuild
Aurora Serverless v2From 43.80: 0.5 capacity units × 0.12 × 730, plus storage and I/OGrows and shrinks with loadThree times the idle cost. Scaling to zero does not fit: the minute tick would wake it every minute
A Postgres outside AWS (Supabase, Neon, your own)0 to 25You may already have itEvery query crosses the internet; their connection limits apply. Use a session-mode or direct connection, not a transaction pooler

One connection string. The engine takes a single SYPNIA_DATABASE_URL, for every role. It must be a direct or session-mode connection: the engine prepares its statements and runs transactions of several statements, which a transaction-mode pooler breaks. Functions keep the total small instead: 1 connection per ingest copy, 2 per API copy, 3 per worker copy.

Secrets. The generated database password lives in Secrets Manager and is resolved when the stack deploys. The root token, the AI key and the webhook secret are template parameters that are never echoed, stored as the functions’ environment, which Lambda encrypts at rest. Anyone who may read a function’s configuration can read them; restrict that permission as you would restrict the secrets themselves.

The cost model

Prices used

USD, on demand, us-east-1, as assumed on 2026-11-15, without any free allowance. Each name links to the official price list.

ServiceUnitPrice
AWS Lambda, arm64Per GB-second; per million requests0.0000133334; 0.20
Amazon SQS, standardPer million requests (each 64 KB of a message is one)0.40
Amazon S3, StandardPer GB-month; per million writes or lists; per million reads0.023; 5.00; 0.40
Amazon CloudFrontPer million HTTPS requests; per GB sent to the function; per GB sent out1.00; 0.02; 0.085
Data leaving AWS from S3Per GB0.09
Amazon RDS for PostgreSQLdb.t4g.micro per hour; db.t4g.medium per hour; disk per GB-month; a public address per hour0.016; 0.065; 0.115; 0.005
Amazon EventBridge SchedulerPer million invocations1.00
Amazon CloudWatchLogs per GB; per alarm a month0.50; 0.10
AWS Secrets ManagerPer secret a month0.40
Amazon SES CloudPer 1,000 e-mails0.10
NAT gateway (not in the reference)Per hour; per GB0.045; 0.045

AWS gives every account a monthly allowance that covers a small deployment’s functions (400,000 GB-seconds and a million requests), its queue (a million requests) and its address (10 million requests). The unit costs below ignore it, so they stay true at any size.

An idle deployment

Nothing arrives. What still costs:

LineArithmeticA month
The minute tick43,200 calls × 1 s × 1 GB × 0.0000133334, plus 43,200 × 0.20 ÷ 1,000,0000.59
The schedule43,200 × 1.00 ÷ 1,000,0000.04
The queue’s empty pollsAbout 15 a minute: 648,000 × 0.40 ÷ 1,000,0000.26
Three alarms3 × 0.100.30
One secret0.40
LogsAbout 0.1 GB0.05
Bucket, address, the other two functionsNothing arrives, nothing is billed0.00
The engine, idle≈ 1.64
Postgres, if the template creates it0.016 × 730 + 20 × 0.11513.98
Its public address0.005 × 7303.65
Total, idle≈ 19.27

With a Postgres you already have, an idle engine is under USD 2 a month, and with the free allowance it is cents.

Unit costs

Receiving, storing and processing events. The unit that costs is not the event: it is the batch, and the segment it lands in.

Step, per 1,000 batchesServiceArithmeticUSD
The address receives themCloudFront1,000 × 1.00 ÷ 1,000,0000.00100
The bodies reach the function, 3 KB eachCloudFront0.003 GB × 0.020.00006
sypnia-ingest is calledLambda1,000 × 0.20 ÷ 1,000,0000.00020
It runs 50 ms at 256 MBLambda12.5 GB-s × 0.00001333340.00017
The batches are sent to the queueSQS1,000 × 0.40 ÷ 1,000,0000.00040
The worker receives and deletes them, in groupsSQSAbout 670 requests × 0.40 ÷ 1,000,0000.00027
Receiving0.0021
Segments written: at most one per batchS31,000 × 5.00 ÷ 1,000,0000.00500
Each read once by the fast path and up to 11 times by the roll-upS312,000 × 0.40 ÷ 1,000,0000.00480
The worker’s time for them, 20 ms each at 1 GBLambda20 GB-s × 0.00001333340.00027
Storing and processing, at most0.0101
Total, at most0.0122

Segments are the larger half, and they are capped: a project and environment gets at most one segment per 10-second delivery, 259,200 a month, however much it sends. So the cost of a million events depends on how they arrive:

A million eventsBatchesSegmentsArithmeticUSD
A busy project: the small project of Deployment shapes, 4 million events a month225,00065,000 (the cap, shared by 4 million)225 × 0.0021 + 65 × 0.0101 + 15,000 session files × 5 ÷ 1,000,000≈ 1.20
A quiet project: every batch alone in its 10 seconds225,000225,000225 × 0.0122 + 0.08≈ 2.80
The worst shape: every event alone in a batch, two events a session1,000,0001,000,0001,000 × 0.0122 + 1,000,000 session files × 5 ÷ 1,000,000≈ 17.20

Measured on the system this engine comes from: 4.4 events a batch and 30 batches a session, which is where 225,000 comes from. The worst shape is what a ceiling must assume, and what nobody’s app looks like.

Storing. USD 0.023 per GB-month. A GB is about 8 million events as segments (125 MB a million), or 2.7 million with their per-session files and Parquet (375 MB a million), or about 1,330 short replays.

Replays. A recording is one object per 10 seconds, sent through the address and sypnia-ingest, and read by the browser straight from S3 when someone watches it.

Per 1,000 replaysA short one: 22 chunks, 0.75 MB (measured there)The longest: 720 chunks, 144 MB, two hours
Requests through the address and the function22,000 × (1.00 + 0.20 + 0.33) ÷ 1,000,000 = 0.0341.10
Bodies to the function0.75 GB × 0.02 = 0.0152.88
Objects written22,000 × 5 ÷ 1,000,000 = 0.1103.60
Stored≈ 0.16≈ 7.58
Kept, per month of retention0.75 GB × 0.023 = 0.0173.31
Watched once, each of them22,000 reads × 0.40 ÷ 1,000,000 + 0.75 GB × 0.09 = 0.076≈ 13.25

A short replay costs two hundredths of a cent to store and watch. The longest costs two cents, almost 90 times more, and most of that is the data leaving AWS when it is watched.

An AI analysis. The engine counts tokens, not money; the price is your provider’s. The formula:

Text
cost = calls × (tokens_in × price_in + tokens_out × price_out) ÷ 1,000,000
Tokens inTokens outCalls
A usual analysis8,000: about 24,000 characters of context at 3 to 4 characters a token, plus the fixed instructions7001.15: assumed, one answer in seven fails the check and is asked again
The largest the engine allows9,0002,000 (ai.max_output_tokens)3
Price of the model, per million tokens in / outA usual analysisThe largest
0.15 / 0.600.00190.0077
0.40 / 1.600.00500.0204
3.00 / 15.000.0400.171

So an analysis costs between a fifth of a cent and four cents, depending on the model, and up to 17 cents in the worst case with an expensive one. Measured on the system this engine comes from: USD 0.08 to 0.20 for a weekly run of 15 to 25 calls, about half a cent to a cent a call. No model is named here because none is promised.

An uptime check. One request a minute, made inside the pass that runs anyway: about USD 0.02 a month for its 43,200 result rows and its share of the worker’s time.

Two self-hosted examples

The two projects of Deployment shapes, summed by service. The line-by-line arithmetic is there; the last rows add three small fixed items that table leaves out.

USD a monthSmall: 4 million events, 30,000 sessionsMedium: 40 million events, 300,000 sessions
Lambda3.3115.26
SQS0.604.00
S3: writes, reads, storage3.5214.34
CloudWatch logs0.502.00
CloudFront0.00 (inside the allowance)0.00
The engine≈ 8≈ 36
RDS for PostgreSQL≈ 14 (db.t4g.micro)25 to 50 (2 to 4 GB of memory)
Total, as on the other pages≈ 22≈ 60 to 85
Three alarms, one secret, the database’s public address0.30 + 0.40 + 3.65 = 4.354.35
Everything on the bill≈ 26≈ 65 to 90
With the functions in a private network instead+ 32.85 for the NAT gateway, − 3.65The same

Not included: the model, at your provider’s price (a project that makes 200 usual analyses a month at 0.40 / 1.60 pays USD 1.00), and data leaving AWS when you watch replays (0.09 per GB).

One project on Sypnia Cloud’s Free plan Cloud

The owner’s rule: no project on the Free plan may cost Sypnia more than USD 3 a month, everything included. A rule like that is only true if every line of the bill has a limit. So this section does three things: it prices each limit at its worst shape, it shows which lines have no limit today, and it proposes the limits that make the rule hold.

Shared, fixed costs. Sypnia Cloud is this same deployment, sized for many projects, and its fixed costs are shared by all of them:

Fixed, a monthArithmeticUSD
Postgres: db.t4g.medium in two zones, 100 GB2 × 0.065 × 730 + 100 × 0.23117.90
A NAT gateway, so the database has no public address0.045 × 73032.85
The minute tick, budgeted at 10 s a pass43,200 × 10 GB-s × 0.00001333345.76
Logs, alarms, secrets10 GB × 0.50 + 0.30 + 1.206.50
Fixed≈ 163

Assumption, stated: 500 projects share one such deployment, so each carries USD 0.33. With 130 projects the share is USD 1.25 and the ceiling below still holds; with fewer, Sypnia pays the fixed cost whatever the plans are, and the ceiling is a statement about each further project. The private app’s own hosting is not in this number.

The model. For the Free plan’s arithmetic Sypnia Cloud’s model is budgeted at no more than USD 0.40 per million tokens in and 1.60 out: a usual analysis is half a cent, the largest is two cents. If a dearer model is chosen, the row scales with it.

A free project at 100 % of every limit, at the worst shape:

Limit (proposed)At the limitUnit cost, worst shapeUSD a month
Events received: hard stop at 20,000, four times the 5,000 counted events20,000 batches of one event0.0122 per 1,000 batches0.24
…their sessions10,000 sessions, two files written each5.00 per million writes0.10
…their roll-upsA run in every 5 minutes of the month: 8,640 × 0.3 GB-s0.0000133334 per GB-s0.04
Replays: 50 a month, 30 minutes each at most, kept 7 days50 × 180 chunks, 36 MB each; every one watched once0.0021 to store + 0.0033 to watch0.27
Uptime checks: 143,200 checks0.02
Analyses: 50 a month50 of the largest0.02041.02
Alert e-mails: 100 a month, plus the daily summary131 e-mails0.10 per 1,0000.01
Pull requests: none0.00
Share of the fixed costs163 ÷ 5000.33
Total≈ 2.03

The same project at the same limits with the shape real apps have (4.4 events a batch, short replays of which one in five is watched, usual analyses) costs about USD 0.65, half of it the fixed share.

Diagram to drawHORIZONTAL STACKED BAR CHART, one chart with two bars and a vertical limit line. X axis in USD from 0 to 3.25 with ticks every 0.50; a bold vertical line at 3.00 labelled «the ceiling: USD 3». BAR 1 labelled «A free project at 100 % of every limit, worst shape · USD 2.03», segments left to right with these exact labels and widths: «AI analyses · 1.02» (the lit segment, accent colour), «Events: receive, store, process · 0.38», «Share of fixed costs · 0.33», «Replays: store and watch · 0.27», «Uptime check · 0.02», «E-mail · 0.01». BAR 2 labelled «The same limits, the shape real apps have · USD 0.65», segments: «Share of fixed costs · 0.33», «AI analyses · 0.25», «Events · 0.03», «Uptime check · 0.02», «Replays · 0.01», «E-mail · 0.01». To the right of bar 1, a bracket from 2.03 to 3.00 labelled «margin: 0.97». Under the chart a third, hatched bar that runs past the right edge with a break mark, labelled «Today's proposal (20 analyses a day, 5 pull requests, no hard stop) · more than USD 15», to show it crosses the ceiling. Legend not needed: labels are on the segments. Text alternative lists the six components of each bar with their values.
Figure. What one free project costs Sypnia a month, by component. The agent's analyses are half of the worst case, which is why their limit is the one that changes most.

Against today’s proposal. pricing.ts and Limits propose for Free: 5,000 events, 50 replays, 7 days, 1 uptime check, 5 pull requests a month and 20 analyses a day. Priced the same way:

LineToday’s proposalUSD a month, worst shapeVerdict
Analyses20 a day, 620 a month620 × 0.0204 = 12.65Four times the ceiling by itself. Even at the usual size it is 3.10
Pull requests5 a month5 × 0.30 to 0.60 = 1.50 to 3.00Half the ceiling to all of it. Already decided: not in the Free plan
Events5,000 counted; uncounted events and failures past the limit have no capNo ceilingA page that fires a custom event in a loop, or an error in a loop, is unbounded
Replays50, each up to two hours50 × (0.0084 + 0.0133) = 1.08Fits only if nothing else is at its worst
Alert e-mailsNo capNo ceilingAn uptime check that flaps all month is 43,200 e-mails: 4.32
TotalMore than 15, with two lines that have no ceiling

The paid plans at 100 % of the proposed limits. A paid plan is priced on the shape real apps have, with the worst shape stated as the risk. A pull request is the least certain number here, because its worker is not designed in detail: it is budgeted at USD 0.30, and 0.60 at worst, for about 120,000 tokens in and 8,000 out with a model fit for writing code.

USD a monthBuilder, 3 projectsTeam, 10 projects
Events: twice the counted ones received, 4.4 a batch0.293.12
Replays: short, one in five watched0.101.13
Uptime checks5 × 0.02 = 0.1025 × 0.02 = 0.50
Analyses, usual size200 × 0.005 = 1.001,000 × 0.005 = 5.00
Pull requests5 × 0.30 = 1.5030 × 0.30 = 9.00
E-mail: summaries and alerts0.060.51
Share of the fixed costs3 × 0.33 = 0.9910 × 0.33 = 3.30
Card payment: 2.9 % + 0.300.591.72
Cost at 100 % of limits≈ 4.63≈ 24.28
Margin5.37, 54 %24.72, 50 %
The same limits at the worst shape≈ 24.50≈ 233
With today’s proposal for pull requests (50 and 300)18.13: a loss of 8.13105.28: a loss of 56.28

Three things to read from it:

  1. Pull requests and analyses are the bill. Storage, events and replays together are under a fifth of either plan’s cost at real shapes. The model is more than half.
  2. The paid plans are not safe at the worst shape, and the exposure is one line: long recordings that are all watched. 5,000 two-hour replays are 720 GB written, kept three months and downloaded: about USD 154 on a USD 49 plan. A shorter longest recording on paid plans, or counting hours of replay instead of replays, would close it. It is a question for the owner, below.
  3. Today’s numbers for pull requests lose money on both paid plans at any shape.

Questions this model leaves open

  • The model’s price tier for Sypnia Cloud. Everything above assumes 0.40 / 1.60 per million tokens. A model at 3.00 / 15.00 makes the Free plan’s 50 analyses cost up to USD 8.55; the same ceiling then allows 5.
  • The NAT gateway. USD 33 a month so that Sypnia Cloud’s database has no public address. Counted above; the self-hosted reference does without it.
  • Replays on paid plans: a cap per recording, or hours instead of a count.
  • The cost of a pull request, once its worker exists and can be measured.

What changed from the system this comes from

ThereHereWhy
An ingest function, an hourly one, a daily one and a weekly one, in TypeScript, with a native query engine as a 68 MB bindingThree functions by role, one Rust binary, no native dependencyOne program to read, arm64, 300 ms cold starts
A managed delivery stream between ingest and the bucketSQS, with a dead-letter queue and a redrive commandFreshness; objects named by project; failures you can see
The app’s shared databaseA database of the engine’s ownThe shared one ran out of memory once
Retention as bucket lifecycle rules and a database cron extensionThe engine’s daily jobThe same on any store and any Postgres
Cost estimated once, for one appA unit cost per batch, replay and analysis, and a ceiling per planA service with a free plan must know what a free project costs

Next

Sections

Start hereWhat Sypnia is, how it works, what is open source and what is the paid cloud, and the two ways to get your first problem in plain words.ConceptsThe ten ideas Sypnia is made of, each defined precisely, from a project and its keys to problems, traces and alerts.SDKsHow your app sends data to Sypnia. One SDK for the browser, one for Node, one for Next.js, and the OpenTelemetry intake for every other backend.The agentHow Sypnia analyses a problem, what it writes, what it sends to a model and what it never does.MCP and skillsConnect your coding agent to Sypnia so it can ask what is failing in production, read what it needs to fix it, and set Sypnia up for you.API referenceThe Sypnia HTTP API: one API for the open-source engine and for Sypnia Cloud, with every endpoint, parameter, response and error.CLI referenceThe sypnia command: how to install it, the variables it reads, what its exit codes mean, and where each command is documented.Self-hostingWhat you run when you host the Sypnia engine yourself, what you need, what it costs, and what you do not get compared with Sypnia Cloud.How the engine is builtThe whole Sypnia engine on one page, from a click in your app to the sentence your coding agent reads, with the design rules and the code that holds them.Sypnia CloudHow the paid service works, from organizations and roles to plans, limits, billing, where your data lives, the GitHub App and support.Privacy and securityWhat Sypnia collects from your app and its users, what it never collects, how masking works, how to delete data, and how the service is protected.LicensingWhich licence covers each part of Sypnia, what you may do with it, how the name may be used, and the terms of a contribution.GuidesStep-by-step recipes for the common ways to use Sypnia, from apps made with AI builders and Next.js on Vercel to Supabase, source maps in CI, alert e-mails from your own engine, and moving from Sentry.ReferenceThe pages you look things up in, from the event schema and the glossary to what is planned, the changelog and the common questions.
↑↓ to move↵ to openEsc to close