Answer from your own data, without uploading it
Let your bots answer from a folder or a script on your own computer with oalo serve. The files stay where they are; only each answer travels.
Your stock list, order database or handbook may live on a computer of yours and
shouldn't be uploaded. With oalo serve, that computer answers your bot's
questions itself: the bot asks, a folder search or a script of yours answers,
and only the answer comes back. The file never leaves the computer.
Use it when the data changes often, when it can't leave your premises, or when
it's easier to read where it is than to copy it into Oalo. If the data can live
in Oalo, syncing it in (oalo sources push) is faster and works while your
computer is off.
What you need
- An Oalo workspace and a bot. You need to be a workspace admin to add a machine.
- The CLI, signed in:
npm i -g @oalo-ai/cli, thenoalo login. - A computer that stays on while the bot is live. A laptop is fine for trying it out.
1. Add your computer as a machine
oalo machines add shop-pc
This saves a machine key on this computer (~/.oalo/serve/shop-pc.json,
readable only by you). The key can only answer your bots' questions. It can't
read or change anything in your workspace, so it's safe on a shop computer.
2. Share a folder
oalo serve add folder handbook ~/Documents/Handbook --describe "Store policies, shipping and returns"
oalo serve test handbook '{"query": "return policy"}'
The bot can now search the folder's text files (Markdown, text, CSV, TSV, JSON and HTML, up to 2 MB each) and gets back the matching snippets with their file names. The description is what the bot reads when deciding to search it, so be specific. Edits to the files count from the next question on.
3. Share a script
A script reads one JSON object on its input and prints one JSON object as its answer. This one looks up a product code in a spreadsheet:
# stock.py
import csv, json, sys
sku = json.load(sys.stdin)["input"]["sku"].upper()
for row in csv.DictReader(open("stock.csv")):
if row["sku"] == sku:
print(json.dumps({"sku": sku, "in_stock": int(row["qty"]), "price": int(row["price"])}))
break
else:
print(json.dumps({"sku": sku, "found": False}))
oalo serve add command stock --input sku:string --describe "Stock and price for one product code" -- python3 ~/oalo/stock.py
oalo serve test stock '{"sku": "BLUE-M"}'
--input lists the fields the bot sends (name:type, comma-separated; add ?
for an optional one). A script may run for 30 seconds by default
(--timeout, up to 120). It runs directly, never through a shell, and doesn't
see your Oalo keys.
4. Start serving
oalo serve
It connects out to your workspace; nothing listens on your computer and no port is opened. It prints one line per question: the time, the handler, how long it took and the size of the answer, never the question or the answer. If the connection drops it reconnects by itself.
After oalo serve add or oalo serve remove, restart oalo serve so the
workspace sees the change.
5. Give the bot the tools
Each handler becomes a workspace tool with the handler's name:
oalo bots tools <bot> --add handbook --add stock
6. Try it
oalo qa <bot> "Do you have BLUE-M in stock?"
You see the bot call stock, and a line for the question appears in the
oalo serve window. oalo machines shows whether each machine is online and
when it was last seen.
7. Keep it running
oalo serve install
Writes a login service (launchd on macOS, systemd on Linux) that starts
oalo serve when you log in and restarts it if it stops, then prints the one
command that starts it. On a laptop, also stop it from sleeping while the bot
is live.
Use it in a flow or a loop
A flow or loop step can ask the machine too: the On your machine step
(remote_step). Pick the handler and fill its input from earlier steps; its
answer becomes the step's output. The step waits without holding anything
open, so a restart loses nothing, and a question asked while the computer was
off is sent when it connects.
If the machine is offline when the step starts, the step can wait for it until
its time runs out (optionally telling the person to hold on), hand the
conversation to a teammate, or take the error route. Give the step an edge with
the condition _ok == false for every failure: offline, too slow, or the
script's own error. See chat flows and
loop nodes.
Answering about one customer
Each question carries who is asking: the script's input has a context with
the channel (chat, flow or loop), the bot, the conversation and
member, the verified id of the person chatting. Use that id to return only
their own orders. Never use a name or number the person typed: anyone can type
someone else's.
What travels where
- The person's message goes to Oalo and to the bot's AI model, as always.
- The question for your computer (a search, or the fields your script takes) goes to your computer.
- Only the answer comes back, at most 64 KB. It becomes part of that one reply, so it passes through Oalo and the bot's model for that message.
- The folder and the script's data stay on your computer.
To keep conversations off hosted AI models as well, run the bot on a model on your own computer: see Run your bot on your own model.
When your computer is off
In a chat, the bot's tool call fails and the bot says it can't check right now. In a flow or loop, the step follows the offline choice you made.
Troubleshooting
- "Machine offline":
oalo serveisn't running, or the computer is asleep. - Timeout: the script took longer than its
--timeout. - "Output too large": the answer is over 64 KB. Return fewer rows.
- The script's error: a script that exits with an error, or prints something
that isn't one JSON object, fails the question; the bot sees the last line it
wrote to its error output. Run
oalo serve testto see exactly what the bot would get. - A handler is skipped: another workspace tool already has that name. Pick another name.
- Revoked key:
oalo machines revoke <name> --yesstops a machine at once. Runoalo machines add <name>again to set it up anew; its handlers are kept.
Answer members with an AI model running on your own computer (Ollama, vLLM, LM Studio) through oalo serve. Oalo checks the model before any bot can use it.
The six kinds of credential in Oalo, what each one is for, how to create it, and which ones are safe to put in an app.
Build an Oalo chatbot end to end: pick a starting persona, give it knowledge, tune how it retrieves, guard what it says, and choose its model.
How to script a chatbot conversation with a flow. The node types, how a flow starts, how steps pass data and branch, and how to check and repair one.
A reference of every step type a loop automation can use, grouped by purpose, plus how steps connect (edges, conditions, fan-out, and templating).
Your own Base, with every feature, from $99 a month.