Sandbox and production
Every org has a sandbox and a production, on one gateway: what each holds, and what moves between them.
Every org on Pinecall has a sandbox and a production, served by the same gateway at the same address. The sandbox is where your team tries things; production is what your customers reach. Nothing you do in one reaches the other.
What are the sandbox and production?#
One gateway (https://cloud.pinecall.io) and one key serve both. The gateway decides which one a
request acts in from the key and from what the request names, never from the host name. A
sandbox call never runs on the same workers as a production call, so a busy sandbox never slows
production down.
Choosing sandbox or production#
In the CLI, every command acts in the sandbox. Add --prod to act in production, for that one
command:
$ pinecall sessions # your sandbox calls
$ pinecall sessions --prod # production's calls
$ pinecall agent set --greeting "Clínica Norte, how can I help you?" --prod
pinecall whoami prints sandbox or production on its first line, and whether your key may act
in production.
In the console, the address says which: https://cloud.pinecall.io/ is production's console and
https://cloud.pinecall.io/sandbox/ the sandbox's. The Production · Sandbox switch in the
sidebar opens the same screen on the other side, with the same sign-in. pinecall console opens
the sandbox's console signed in, and pinecall console --prod production's.
The sandbox is yours#
In the sandbox each person has a copy of their own. Your pinecall start holds your copy of the
agent, your pinecall chat talks to it, and your test calls are logged under it. A colleague
running the same agent has their own copy, and neither of you takes the other's.
Settings work the same way. pinecall agent set writes your own settings; add --team to write
the team's, which everyone who set nothing of their own falls back to. An admin can see everyone's
sandbox settings, but only you hold yours (Agent settings).
Your sign-in and the org's sandbox server token are two corners. In the sandbox, what you push with your
own sign-in — settings, documents, the lexicon — is your corner, and a sandbox server token (a CI job, a
server of the org's) reads the org's corner, which yours falls back to and which it never sees into. So a
base you pushed with pinecall docs push is not what that token's GET /v1/knowledge lists, and a call
your pinecall start held is read with your key, not the token. What the token must read, it pushes itself.
Production is the org's#
Production has one copy of each agent: the org's. It is held by a process that runs on a server token, not on a person's key, so it keeps running when the person who set it up leaves. That process is either:
- your project, run by Pinecall with
pinecall deploy --prod(Deploy to Pinecall), or - your project on your own server, with a production server token in its secrets (Run it on your own server).
A person can still act in production one command at a time with --prod, but only while their
production switch is on. An admin turns it on in the console's Team screen
(Orgs, people and roles). Without it, every --prod is refused:
403 Bruno has no production access: an admin gives it in Team
What each one holds#
| sandbox | production | |
|---|---|---|
| the agent | one copy per person, plus the team's | one, the org's |
| the agent's settings and lexicon | your own, or the team's with --team |
one set, written with --prod or from production's console |
| calls and their logs | your own copy's | production's |
| a contact's memory | the sandbox's facts | production's facts, kept apart |
| knowledge bases | the sandbox's | production's |
| numbers | optional | the ones your customers call |
| WhatsApp templates | answered as sent, marked simulated: nothing reaches Meta or anybody's phone, and no number is needed |
sent from the agent's WhatsApp number; Meta charges the number's account |
| limits | the free plan's: minutes on our models, messages, evals and simulations | closed on the free plan; a paid plan opens it, and from then on both worlds spend one pool — the plan's minutes, messages, evals and simulations — and only hosted apps are billed in production |
Some things belong to the org and are the same in both: its people, its carrier accounts and its own provider keys.
Calling your agent from your phone#
You do not need a number of your own to hear your agent on a phone. Tell Pinecall which mobile is yours, once, and which agent a call from it reaches (left out: the one agent your org runs):
$ pinecall line from +59899111111 --agent front-desk
calls from +59899111111 reach your copy of front-desk · dial +13617334133 to hear it
Then call Pinecall's test number from that phone: your agent answers, in the sandbox — in your
own copy while pinecall start holds one, else in the copy Pinecall runs for a deployed app or a
Studio agent. The call is yours, counts against your sandbox minutes, and shows in Calls as it
happens. From a phone nobody said was theirs, the test number says so. The sandbox console's
Phone testing tab does the same without a terminal, and says what a call from your phone
reaches right now.
A call from that phone to one of your org's production numbers reaches your sandbox copy the
same way, while every other caller still reaches production: that is how a team tests on the line
its customers use. pinecall line forget sends your calls back to production.
A server token opens only the sandbox or only production. A
pc_test_token is the sandbox's; a production server token (pc_live_, the prefix a person's key has too) used for a sandbox request is refused by the gateway:this key is a production server's token, and this request is for sandbox: a server's token opens the env it was made in.
What moves between them#
Nothing moves on its own. A setting reaches production when you set it there, with --prod on the
same command. Production's documents are pushed with pinecall docs push --prod. A number answers in
one of them at a time; production's Numbers screen has Move to sandbox on each number, and the
Numbers API moves one either way. From sandbox to production
walks it step by step.