> For the complete documentation index, see [llms.txt](https://puregamma-ai.gitbook.io/puregamma-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://puregamma-ai.gitbook.io/puregamma-ai/puregamma-ai/developer-reference/deployment-and-operations.md).

# Deployment & operations

## Services

A production-oriented deployment includes:

* Next.js web application;
* FastAPI API;
* PostgreSQL and Redis;
* API worker and scheduler;
* configured market, model, billing and notification providers;
* optional macOS iMessage relay;
* strategy runtime;
* containerized research runner when enabled.

## Configuration and release discipline

Provider secrets are environment-managed. Production configuration must explicitly control authentication, database access, model providers, market and portfolio connectors, Stripe, notifications, runtime behavior and research-runner availability.

Before enabling a feature:

1. apply migrations and verify rollback;
2. validate secrets and provider health;
3. run unit, integration and browser tests;
4. run a production-like smoke test;
5. verify data freshness and unavailable states;
6. verify Credits reserve/settle/refund where applicable;
7. confirm that no mock or fallback data is presented as live;
8. record deployment version and operational status.

## Research runner operations

A production research runner requires a working container runtime, a built runner image, read-only approved datasets, durable artifact storage and worker access to the execution environment. If any dependency is unavailable, the API must report the runner unavailable rather than queue a job that cannot run.

## Observability

Monitor:

* API health and readiness;
* worker queues, retries and failed jobs;
* source freshness and provider status;
* report and delivery state;
* model and Skills runs;
* backtest and research-run lifecycle;
* Stripe webhook processing;
* portfolio synchronization;
* runtime, orders, positions and reconciliation once enabled.

Use correlation IDs and idempotency keys when investigating retries or user-visible discrepancies.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://puregamma-ai.gitbook.io/puregamma-ai/puregamma-ai/developer-reference/deployment-and-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
