# Integration in a day with a coding agent

This site is written so that a coding agent can plan your integration from it. You give the agent the address, it reads the site and asks you the decisions only you can make, and you test the result against the test environment. Examples use the **test** environment; see [Environments](https://code.salaxy.com/get-started/environments.md) for demo and production.

*Diagram: A flow of five steps. You, the developer, give the address code.salaxy.com to your coding agent. The agent reads the Salaxy developer site: llms.txt, the integration topics and the OpenAPI files. It then plans and writes the code, and the code runs against the Salaxy test environment. The agent asks you the decisions along the way. (You give the address, the agent reads the site and asks you the choices, and the code runs against the test environment.)*

## What the agent reads

| Source | What it holds |
|---|---|
| [`/llms.txt`](https://code.salaxy.com/llms.txt) | The index of the site, one line per page, with instructions for agents planning an integration |
| [`/llms-full.txt`](https://code.salaxy.com/llms-full.txt) | Every page in one Markdown file |
| `<page>.md` | Each page as Markdown: the page's URL with `.md` added |
| [Integration overview](https://code.salaxy.com/integration/index.md) | The build paths and the topics in the order an integration usually goes |
| [`/openapi/salaxy-03.json`](https://code.salaxy.com/openapi/salaxy-03.json) | The REST API v03, the current version |
| [`/openapi/salaxy-04.json`](https://code.salaxy.com/openapi/salaxy-04.json) | The REST API v04, in beta. Build on v03 |

See [For agents](https://code.salaxy.com/for-agents.md) for the full list, including the MCP demo servers.

## Start prompt

Open your coding agent in the repository you want to integrate from, and paste this. Replace the text in square brackets.

```text
Research https://code.salaxy.com and plan a Salaxy payroll integration for [my product: one sentence].
Start from https://code.salaxy.com/llms.txt and read the integration overview.
Before you write any code, run a grilling session with me: ask your questions one at a time.
First ask which build path I want (the embedded Salaxy UI — Salaxy Business and Salaxy Pro — or my own UI on the REST API) and whether I am a partner or a company.
Then take the integration topics in order and ask the "Which fits you?" question of each topic that applies.
Build on API v03 and follow the site's rules for errors, queries, idempotency and polling.
Use the test environment only. Never ask me to paste a password, token or private key into this chat.
When a fact is not on the site, tell me and list it as a question for Salaxy. Do not guess from other payroll APIs.
When the questions are answered, write the plan, then implement it step by step and test each step against the test environment.
```

## The questions the agent should ask

The agent should ask in this order. The choices are the same ones a partner kick-off meeting goes through.

1. **Build path.** The embedded Salaxy UI (Salaxy Business for companies, Salaxy Pro for accounting firms) or your own UI on the REST API; paths can be combined. See [Integration overview](https://code.salaxy.com/integration/index.md#choose-your-build-path).
2. **Partner or company.** A partner serves many customer companies and needs the one-time setup topics. A company connects its own systems and can skip most of them. See [Integration overview](https://code.salaxy.com/integration/index.md#partner-or-company).
3. **Each topic's "Which fits you?"** Every topic page lists its options under that heading, for example the account structure or the service model. The agent asks only the topics that apply to your build path.

The topic pages are listed in the [Integration overview](https://code.salaxy.com/integration/index.md). The first one for a partner is [Partner and technical accounts](https://code.salaxy.com/integration/partner-account.md).

## Test it

1. Get a test credential for your path: see [Get a test account](https://code.salaxy.com/get-started/test-account.md).
2. Tell the agent which credential you have and where it is stored. Give it a token through an environment variable or a secret store, never in the chat.
3. Ask the agent to make one authenticated call first, then to add one topic at a time and run it against `https://test-secure.salaxy.com`.
4. Ask it to read the [errors](https://code.salaxy.com/reference/errors.md) page before it writes error handling, and to look before it creates, as in [Retries and idempotency](https://code.salaxy.com/reference/idempotency.md).

## When a fact is missing

If the site does not state a fact, the agent should say so and list it as a question. Send the list to Salaxy; see [Support](https://code.salaxy.com/get-started/support.md). Include the page the agent read and the question, and nothing that identifies a real person. See also the [Developer FAQ](https://code.salaxy.com/get-started/faq.md).

## Checklist

- The agent started from `llms.txt` and the integration overview.
- You answered the build path and partner-or-company questions before any code was written.
- Every call in the code uses a `test-*` host and API v03.
- No password, token or private key is in the chat or in the repository.
- Every question the site could not answer is in a list for Salaxy.

**Next:** [Partner and technical accounts](https://code.salaxy.com/integration/partner-account.md)
