Back to blog
Engineering

Durable background jobs: ask once, pick up the answer anywhere

A legal research run can take minutes. We enqueue every LISA run as a Cloud Task, stream progress through PocketBase realtime, and notify you via FCM when it finishes.

EngineeringInfrastructureAug 5, 20265 min read
Durable background jobs: ask once, pick up the answer anywhere

Legal work is not instant. A complex question across a thousand-page data room, a multi-jurisdictional precedent search, or a workflow that drafts, verifies, and redlines a contract can take anywhere from seconds to many minutes. If the user has to keep a browser tab open and watch a spinner the entire time, the tool has already failed.

Every run is a job

Inside CouncilGPT, every LISA run is enqueued as a durable background job. The Cloud Tasks queue holds the request, retries transient failures, and dispatches it to a Cloud Run worker. That worker has the same permissions model as the rest of the platform: it can only access the matter vault and integrations the user has already authorised.

Decoupling the ask from the answer gives the system room to do real work. The worker can run multiple agents in sequence, call external search APIs, parse large files, and render documents without worrying about browser timeouts or memory limits in the user's device.

Server racks with status lights in a data centre.

Real-time progress, wherever you are

While the job runs, status is streamed back through PocketBase realtime. The web app, the mobile app, and the Word add-in all subscribe to the same job record. That means you can start a question on your laptop, step into a meeting, and see the result on your phone. When the job finishes, FCM push notifications alert every subscribed device.

Recoverable by design

Because the job state lives in the queue and the database, a worker crash does not mean lost work. Another worker picks up the task. Partial results are saved. A human checkpoint can pause execution until the lawyer is ready. Durable background jobs are the invisible scaffolding that lets LISA feel fast even when it is doing slow, serious work.

EngineeringInfrastructureAug 5, 20265 min read

Discover the future of legal work through a live product demo.

Experience the Council in action: from agentic workflows and legal research to secure document vaults and tabular review.