
Engineering Notes · Design principles and architecture
Permissions are enforced in code, judgment is left to the model
OwlAI's agent reads internal databases and documents, and it also reads web pages and results from connectors…
Blog
Design decisions and measurements from building an on-premises AI for work — how the principle of enforcing with code, guiding with instructions, and verifying with audits is implemented.
Part 1
The design principles behind the whole series, and the execution structure every AI feature shares.

Engineering Notes · Design principles and architecture
OwlAI's agent reads internal databases and documents, and it also reads web pages and results from connectors…

Engineering Notes · Design principles and architecture
Five features in OwlAI have a model working by calling tools: chat; playbooks, which run a defined procedure w…

Engineering Notes · Design principles and architecture
Ask "How many orders have gone unprocessed for more than 30 days?" through document search (RAG), and the mode…
Part 2
Turning natural-language questions into accurate SQL against business databases.

Engineering Notes · Structured data and NL2SQL
A business database with thousands of tables often keeps backup and working copies such as ORDMSTBAK and ORDMS…

Engineering Notes · Structured data and NL2SQL
The order table's STATUSCODE CHAR(1) holds S, D and C.

Engineering Notes · Structured data and NL2SQL
Ask for "last month's revenue" and sales thinks of booked orders, while finance thinks of invoiced amounts net of returns.

Engineering Notes · Structured data and NL2SQL
OwlAI's SQL execution tool runs SQL written by the model against a customer's production database.

Engineering Notes · Structured data and NL2SQL
Suppose that after schema analysis (“DDL doesn't say what a column means, so we read its values first”) finish…

Engineering Notes · Structured data and NL2SQL
When a user says "Give me the result you just queried as a CSV file," the model has to write the rows it alrea…
Part 3
How the connection to a customer database is opened and protected: SSH tunnels through a bastion, encryption in transit and certificate checks, importing Amazon RDS and Supabase connections on SaaS, and how execution works for databases connected through OwlDB.

Engineering Notes · Database connections and OwlDB
When a production database sits in a private network behind a bastion host (an SSH server that leads into that…

Engineering Notes · Database connections and OwlDB
When OwlAI runs on a corporate network and connects over TLS to a cloud LLM or a customer database, certificate errors come from two places.

Engineering Notes · Database connections and OwlDB
To connect a customer's Amazon RDS or Aurora database from OwlAI SaaS, OwlAI needs the endpoint, port and engi…

Engineering Notes · Database connections and OwlDB
The Supabase dashboard lists three addresses for the same database: the project's direct address, port 6543 on…

Engineering Notes · Database connections and OwlDB
To open a company database to the AI, an administrator enters the host, port, account and password into OwlAI.

Engineering Notes · Database connections and OwlDB
Say an administrator opens only the customer and order tables to the sales role and closes the salary table in the same database.

Engineering Notes · Database connections and OwlDB
When AI-written SQL holds a production database for a long time, the order screen and the settlement batch tha…

Engineering Notes · Database connections and OwlDB
To keep AI queries off the primary node, you can register the connection with a standby's address.

Engineering Notes · Database connections and OwlDB
OwlAI has two ways to run SQL against a customer database.
Part 4
Memory design that lets individual and team knowledge improve answers, plus document search, deep research, and source design.

Engineering Notes · Memory and search
A user says, "My account in the issue tracker is this ID.

Engineering Notes · Memory and search
The status column STATCD in a customer table holds 1, 2, and 9.

Engineering Notes · Memory and search
A table note says 「반품 주문은 ORDRTN 테이블에 따로 쌓인다」 ("returned orders pile up separately in the ORDRTN table"), and…

Engineering Notes · Memory and search
Every time an agent calls the model, the request carries the tool definitions, the system prompt, and the conv…

Engineering Notes · Memory and search
In OwlAI SaaS, many organizations share one PostgreSQL database, and one person can belong to two of them.

Engineering Notes · Memory and search
Ask "How many days of annual leave can I carry over to next year?" against a company's policy documents with e…

Engineering Notes · Memory and search
A question like "Summarize last quarter's incident root causes across our three products, and compare how the…

Engineering Notes · Memory and search
When one answer draws on web pages, internal documents, records queried from a database, and tickets returned…

Engineering Notes · Memory and search
Upload a Hangul document with a 300-row price list and ask for "the average unit price by product group," and…
Part 5
The internals that keep conversations running: multi-turn, caching, compaction, and messages sent mid-turn.

Engineering Notes · Conversation engine
A model API remembers nothing between calls.

Engineering Notes · Conversation engine
The OpenAI Responses API stores every response on the provider's servers unless the request sets store, and th…

Engineering Notes · Conversation engine
Say a user asks for "last month's top 10 customers by revenue," and the model answers from a table that holds only domestic customers.

Engineering Notes · Conversation engine
A deep research turn runs for up to an hour by default.

Engineering Notes · Conversation engine
Model APIs remember nothing between calls, so an agent resends the whole conversation context every round.

Engineering Notes · Conversation engine
As a conversation grows, its requests eventually reach the input limit the model will accept.

Engineering Notes · Conversation engine
Sometimes a single tool result blows past the model's input limit in one go: a query that returns hundreds of…

Engineering Notes · Conversation engine
Sometimes every tool an agent calls succeeds and the work still goes nowhere.
Part 6
Workflow automation, data movement, tool design, document and diagram generation, and subagents.

Engineering Notes · Tools and execution
Say a chat once went well: it pulled last week's sales from the database, grouped them by department, and built an Excel file.

Engineering Notes · Tools and execution
Take a request like "For each issue opened last week, look up the customer's contract, and email the owner onl…

Engineering Notes · Tools and execution
Making a quote from a company form takes two steps: copy the form to a new path, then fill in the copy.

Engineering Notes · Tools and execution
When a model writes code that builds an Excel file, the run can exit with code 0 and the model can answer "Don…

Engineering Notes · Tools and execution
To give an agent a tool, you put that tool's definition, its name, description, and argument schema, into the request.

Engineering Notes · Tools and execution
Ask a model to draw a bar chart as SVG and it converts each value to a height on its own scale and writes the coordinates.

Engineering Notes · Tools and execution
The usual way to add subagents is to give the parent model a tool that launches them and let it decide the pro…
Part 7
Meeting recording, speech recognition, meeting glossaries, minutes, and audio retention.

Engineering Notes · Voice and meetings
When a meeting recording is transcribed, internal system names and product names come out as the common word that sounds closest.

Engineering Notes · Voice and meetings
In an on-premises installation, several meetings share one speech recognition model running on a single GPU.

Engineering Notes · Voice and meetings
When a meeting ends, some of its sound has not been transcribed yet.

Engineering Notes · Voice and meetings
A meeting recording runs for an hour or more in a single browser tab.

Engineering Notes · Voice and meetings
Choose a meeting speech recognition service from a single error-rate table and two things go wrong.
Part 8
How the principle of blocking deterministically, guiding with instructions, and confirming through audit is implemented: egress control, injection defense, personal data masking, a shared output boundary, credentials, sandboxing, approval gates, external tool policy, and permissions and audit.

Engineering Notes · Security and audit
Put a model running inside the customer network and an external API model in one installation, and deciding wh…

Engineering Notes · Security and audit
Tools that read a web page or download a file from a URL only open addresses that appeared earlier in the conv…

Engineering Notes · Security and audit
"Find the customers who asked for a refund more than three times last week and summarize what they said" is no…

Engineering Notes · Security and audit
In a conversation that analyzes customer inquiries, someone without permission to view originals sees the phon…

Engineering Notes · Security and audit
Connectors for cloud file services (external services, such as MCP servers, that a company connects to OwlAI)…

Engineering Notes · Security and audit
OwlAI's metadata database holds customer database passwords, LLM provider API keys, OAuth tokens for connector…

Engineering Notes · Security and audit
In OwlAI, Excel, Word, PowerPoint and Hangul documents are produced by python and node scripts the model write…

Engineering Notes · Security and audit
You can write "Confirm with the user before sending email" in the system prompt, and the model can still call…

Engineering Notes · Security and audit
When you attach a connector (an outside service such as an MCP server that a company connects to OwlAI) with O…

Engineering Notes · Security and audit
OwlAI's per-user connectors (external services such as MCP servers that a company connects to OwlAI) attach through OAuth.

Engineering Notes · Security and audit
Say a customer turns its internal e-approval system into an MCP server and attaches it to OwlAI as a connector…

Engineering Notes · Security and audit
Open your internal databases and documents to an AI agent, and after an incident a security officer will ask:…
Part 9
Technical reference for on-premises adoption, from installation and air-gapped transfer to updates and operational checks, plus the principles that keep an installable AI product's quality.

Engineering Notes · Installation, operations, and quality
On-premises OwlAI runs as a Docker Compose stack on a single host the customer picks.

Engineering Notes · Installation, operations, and quality
Install on-premises OwlAI on a host inside a corporate network, wait a few weeks, and one day an internal data…

Engineering Notes · Installation, operations, and quality
When you install on-premises OwlAI on a corporate network that can reach the internet only through a proxy, ca…

Engineering Notes · Installation, operations, and quality
On-premises OwlAI runs on the customer's host as nine container images.

Engineering Notes · Installation, operations, and quality
An on-premises product keeps the files customers receive and the files that stay in-house in the same repository.

Engineering Notes · Installation, operations, and quality
When someone records a meeting, the browser uploads a chunk of the recording to the web backend every 5 second…

Engineering Notes · Installation, operations, and quality
Benchmark a vLLM server for a self-hosted model with 1.1K-token prompts, and the numbers tell you to raise the…

Engineering Notes · Installation, operations, and quality
Put an update button in the admin console of an on-premises product, and something has to stop the containers…

Engineering Notes · Installation, operations, and quality
When an update fails, the operator's first move is to redeploy the previous image.

Engineering Notes · Installation, operations, and quality
In OwlAI, workers run chat turns (one question through to its answer), not the web server.

Engineering Notes · Installation, operations, and quality
A deployment can be broken while /health returns 200 and every container shows healthy.

Engineering Notes · Installation, operations, and quality
An on-premises product runs on the customer's servers.

Engineering Notes · Installation, operations, and quality
When a desktop app's UI lives inside its installer, changing one button label means shipping a new installer.

Engineering Notes · Installation, operations, and quality
Put a boolean field that turns a feature on or off into the settings file of an on-premises product, and every…

Engineering Notes · Installation, operations, and quality
OwlAI is an on-premises product, so each installation runs in one language.

Engineering Notes · Installation, operations, and quality
In a product with an LLM inside, an E2E test that compares the answer text with an expected string fails even when nothing is broken.

Engineering Notes · Installation, operations, and quality
In OwlAI, administrators can set a usage limit for each user, and OwlAI SaaS draws down a member's credits on every call.