maxlogic.ai

Get portfolio analyticsthrough natural language.

Abacus is a chat client bolted to a job scheduler. An LLM agent turns your input into a structured portfolio analysis request, a broker leases it to a stateless worker, and a CPU-bound solve runs for a configured amount of time while the transcript streams.

What crosses the socket
→{"type":"user_message","text":"…"}
←{"type":"ack","seq":41,"reply_message_id":"9f2c…"}
←{"type":"delta","chunk_index":0,"text":"Reserving"}

Kill the socket mid-solve, reconnect, and no result is lost.


The architecture

A durable handoff between a websocket and a pool of workers.

The chat client connects to the backend over a WebSocket connection. Postgres is the system of record for both transcripts and jobs; RabbitMQ owns the handoff on quorum queues, with retry through a per-message-TTL delay queue and a dead-letter exchange. Workers hold one lease against a spawned child process for CPU-bound computation tasks.

Client
Chat UI

Versioned JSON frames over /ws/chat/{id}. Resumes from a seq cursor.

Edge
FastAPI + LLM Gateway

Session management and seq allocation, holder of model key.

Broker
RabbitMQ

Quorum queues, delay queue and dead-letter exchange for delayed retry.

Compute
Docker workers

A supervised spawned process for computational tasks. Stateless, horizontally scaled.

Postgressystem of record

Persistence storage of chat sessions, chat messages, work orders, leases.

Object storeartifacts

Analysis result captured in charts and data series.

The pipeline

The lifecycle of an analysis request

queued

Enqueued and deduplicated on (session_id, idempotency_key) — a retried submit returns the same job as created before.

running

With a lease claimed by a worker. The supervisor extends timer for unfinished computation, acks or nacks completed or failed job.

done

Artifact written, job acked, S3 url persisted in database. An ack on a reassigned lease is fenced by database check to ensure the same job is only worked on by one worker.

failed · dead · cancelled

Dead and cancelled are terminal states. A job is in dead state if its retry count has exceeded the limit. A queued or failed job with a cancellation request is put to cancelled state right away.

Abacus is in private beta.

Walkthrough on request, get in touch for a demo.