# Temporal

The temporal server and UI can be added by calling the `add-temporal` mcp tool. Temporal manages state by orchestrating durable workflow execution. You write your business workflow logic as code and retry and timeouts logic will be handled for you. This puts an end to writing your own state management systems, instead of focusing on your business logic. Once your API is added and the Temporal client has been scaffolded, Bluetext implements the `<your-api-name>-add-workflow`to scaffold all code needed to write a workflows, activities, register them in a task queue and so on. This is set up to raise syntax errors early, so they can be fixed right away. Temporal uses Postgres to store your workflow execution history, ect. Hence Postgres will be configured and ran too, once you called the tool to add Temporal.


---

# Agent Instructions: 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:

```
GET https://docs.bluetext.dev/tech-stack-overview/temporal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
