Skip to main content
Every Book in Pathway has its own AI agent, Jack. It runs in a Linux sandbox with Python, a filesystem, and network access, and it works with your data using your exact permissions. This page explains how it works, from the context it starts with to the loop it runs.
The Pathway chat engine

Jack querying Books across a deal, rendered inline in the chat

The parser turns documents into a structured Book. Jack is how you act on that structure. Ask a question across the data, build a chart or a spreadsheet, pull in an email, reconcile two sources, or run an analysis no fixed report covers. The whole design follows from one decision: give the agent the same data access as the user, then give it a real computer. Scoped access keeps it safe. The computer makes it capable. Everything else on this page is detail underneath those two ideas.

Using the chat

Open a new chat or any existing one. Three controls sit around the composer: what the agent can reach, which model runs it, and how to find past chats.

Connectors

The + button opens the connector menu. Each toggle grants the agent one capability for this chat, and grants are per chat, so the same agent can be wired differently each time. Attach Books and it starts on those deals; add Gmail and it can read your inbox. The Pathway API is on by default, so the agent can already read across everything you can access. Turning a connector on does two things: it hands the agent the tools for that surface and adds the instructions for using it to the agent’s context. Keep the set tight. The agent works best when it carries only what the task needs.
Connector menu on the composer
Connectors map directly to the context the agent receives. Each one you enable appends its instructions to the system prompt, which is why a focused set of toggles keeps the agent sharp. See What the model sees.

Chatting about a Book

Open a chat from inside a Book and that Book is attached automatically. The agent starts scoped to the deal in front of you, so you can ask about it right away.
Chat panel open inside a Book
You can also attach Books to any chat. Open Books in the connector menu, search, and check the ones you want. Pull in several at once to compare deals or ask across a set.
Searching and attaching Books to a chat
Inline @ references to pull a Book into the middle of a message are coming soon.

Model

The model selector sets which model runs the chat and how hard it thinks. New chats start on GPT-6.1 Terra at medium effort. You can switch model or effort at any point in a chat. Higher effort gives the model more time to reason before it answers. Use a lighter model for quick questions and a stronger one, or more effort, for multi-step analysis.

Find past chats

Open the New Chat dropdown to search and reopen earlier chats. The search box filters your history by title.
Searching past chats

What you can do

Ask about a Book

Total deposits, true revenue, debt-to-income, a single transaction, a counterparty breakdown. The agent computes from the source data, not from a summary.

Build charts and reports

Ask for a revenue trend, a cash flow heatmap, a custom Excel export, or an HTML report. The output renders inline in the chat.

Work with email

Connect Gmail and the agent can search the inbox, read threads, download attachments, and compare them against Book data. Sending requires your approval.

Attach files

Drop in a CSV, PDF, image, or spreadsheet. The agent reads it, parses it, and cross-references it against the Book.
Chats don’t have to be attached to a Book. A standalone chat gets the same sandbox and tools, just without a Book to read from. Use them for general computation or analysis.

How it works

Three pieces make up the engine.
1

Scoped access

The agent reads only what the current user can read. Its permissions are the user’s permissions.
2

A sandbox

A Linux workspace where the agent runs code, writes files, and keeps its working memory.
3

A rendering layer

Any file the agent produces can be saved as an artifact and shown back in the chat.
A turn runs as a loop over those pieces. You send a message, the model thinks, calls a tool, reads the result, and repeats until it has an answer. A tool call executes, mostly against the sandbox, its result feeds back in, and the model decides what to do next. The loop continues until the model responds with text only. A turn may run for up to an hour and 200 rounds of tool calls; for a job too big for one turn, the agent finishes the most useful part and tells you what is left. No single tool call runs longer than four minutes; a longer job runs in the background while the agent keeps working, and the agent is told when it ends. If you stop a reply, it keeps what it had written and is marked Stopped by user; a tool call that had already run keeps its result. If the server restarts during a reply, the reply ends as interrupted within about half a minute, and you can send again. A whole chat may use up to 10,000 credits, and can grow only as long as the model can read: past that it says so and you start a new chat. The usage ring beside the send button shows how much it has used; at the limit, start a new chat. Text and tool calls stream to the screen as they happen, and because the filesystem persists across the whole turn, each step builds on the last. Reads that don’t depend on each other run at the same time. The rest of this page walks through the parts: the context the model starts with, the sandbox it works in, the tools it holds, and how it reaches your data.

What the model sees

Before any tool runs, the backend assembles the context for the turn. It is built fresh each time, in a fixed order.
1

Preamble

The current date and time, and a line identifying the user and org by name and ID. This grounds the agent in who it is acting for. It comes first on Gemini models, and last on GPT models so the rest of the prompt can be cached.
2

Base instructions

The core system prompt: how to use the sandbox, the tool conventions, and the rules for sharing files and computing instead of guessing.
3

Skills index

One line per skill, name and description. The full text is pulled on demand with read_skill.
4

Capability sections

A section is appended for each capability the chat has enabled. Each one teaches the agent how to use that surface.
5

Conversation history

Every prior message, tool call, and tool result, in order, so the agent has the full thread.
The capability sections are the important part. A chat only carries instructions for what it can actually do, which keeps the prompt focused and the agent reliable. The base instructions and skills index are always present. The rows above are added only when that capability is on for the chat. The result is that two chats can hold the same agent but see different context: a Book chat with Gmail connected gets the API and Gmail sections; a standalone chat with neither gets just the base.
The assembled prompt is sent at the start of each turn, followed by the conversation history. The list of reads and the list of facts are generated from the API itself, so the agent’s picture of Pathway matches what the API serves.

The sandbox

Each chat gets a fresh sandbox, created from a cached snapshot in seconds. It runs Amazon Linux with Python 3.13 and full sudo. pandas, numpy, matplotlib, seaborn, openpyxl, xlsxwriter, scipy, tabulate, duckdb, and plotly are pre-installed. Anything else installs with pip, and system packages install with dnf. The filesystem is rooted at /tmp/, and the network is open. Three things are placed in the sandbox before the first message: Everything else, the agent creates: scripts, query results, charts, spreadsheets, and exports all land under /tmp/. Book data is not dumped to disk up front. The agent reads it live through the API when it needs it, which keeps the workspace small and the data current. Sandboxes are ephemeral. One lasts 45 minutes, and longer while a reply is running in it. When it times out between messages, a new one is created from the snapshot, your uploads are restored, and the conversation continues. Files the agent made in the old sandbox are not carried over, so anything worth keeping is saved to the chat as an artifact.
The first sandbox on the platform bootstraps the package set and takes a snapshot. The snapshot is cached in Redis with a 29-day TTL and refreshed before it expires, so every later sandbox starts from it.

The filesystem is the memory

The agent does not pass data between steps through a message protocol. It writes files and reads them back. The filesystem is its working memory. It pulls a Book’s analytics from the API and saves the response to a file. It downloads a document and opens it with view. It writes an intermediate result and finds it again later with ls, cat, grep, or a script. State that matters is on disk, not held in the prompt. This is why cross-domain work needs no special integration. Asked to compare bank deposits against invoices from email, the agent:
1

Pulls the invoices

Searches your Gmail for the thread, then downloads the attachments to the sandbox.
2

Pulls the Book

Fetches analytics from the Pathway API and saves the response to a file.
3

Writes one script

A Python script reads both sets of files and produces the comparison.
The email, the PDF, the parsed ledger, and the script all end up as files in the same namespace. Tools compose because they share the filesystem, the same way shell commands compose because they share stdio.

Tools

The core tools are built on two primitives: the shell and the filesystem.
The primary tool. Runs scripts, installs packages with pip or dnf, calls endpoints with curl, pipes output. Each call is a new shell that starts in the directory the last one ended in. A command is stopped after two minutes unless the agent asks for longer, up to four, and the row counts up to that limit while it runs. A command stopped at its limit is marked Timed out. For a longer job, the agent starts it in the background and waits for it or keeps working. Background jobs are listed beside the chat’s menu with their latest output; you can stop one there, and the agent is told you stopped it. Output comes back whole up to 2,000 lines or 50 KB; past that the agent gets the end of it and a file holding all of it, so nothing is lost.
Writes content to a path, creating parent directories as needed. The content is written exactly as given, so nothing needs shell escaping.
Replaces a known string in an existing file. Used to revise a script or file in place after the agent has read it.
Reads a file. Text comes back with line numbers. Images and PDFs are rendered into the model’s visual context, so the agent can actually see them. For a long PDF it can ask for a range of pages.
Reads a file from the sandbox and uploads it to permanent storage. The file appears in the chat as a card, right where the agent saved it, and you open it from there: images and PDFs in a viewer, HTML in a sandboxed frame, Excel as a live Office Online preview, everything else as a download. The tool also returns a permanent URL for use outside the chat, such as in an email or a Slack message.
Two of these serve different readers. save_artifact is for the user: a file card in the chat. view is for the agent: bytes in the context window for visual reasoning. That second one closes the loop. The agent can write a script, generate a chart or spreadsheet, view the result, fix the script, and run it again before it ever responds.

Skills

A skill is a written set of instructions for a task the agent does often: generating a PDF with Typst, extracting tables from a scanned statement, doing web research. Skills keep the agent reliable on hard tasks without bloating its context. Each skill appears in the system prompt as a single line: a name and a short description. The full instructions stay out of context until the agent decides it needs them, then it loads them with read_skill.
This is the same lazy-loading idea as the filesystem. The agent carries a small index of what it can do, and pulls the detail on demand. Skills today cover PDF generation, table extraction from PDFs, web research, and reading LinkedIn posts. For questions about Pathway itself, the agent reads these docs directly.

Extending the agent with code

The agent does not need a custom plugin for every system. It has a real computer, so reaching something new is usually just code.
  • Any API: the agent can curl an endpoint or pip install a client and call it from Python. Anything with an HTTP interface, including MCP servers, is reachable from the sandbox.
  • Reusable instructions: drop a Markdown file or a Python snippet into the Book, and the agent reads it like any other file. A documented procedure becomes something the agent can follow; a helper script becomes something it can run.
  • New packages and tools: pip install for Python, sudo dnf install for system packages. If a task needs a library that isn’t preinstalled, the agent installs it.
The point is that capability is not gated behind integration work. The sandbox is a general computer with your data in it, and most “can it do X” questions reduce to “can you do X with code,” where the answer is usually yes.

Scoped platform access

Every reply gets its own read-only API token for the current user, in the organization they are working in, written to /tmp/.api_token. It lasts as long as the reply, which can run for up to an hour, and is deleted when the reply ends. It lets the agent call Pathway’s own APIs under the user’s access control: Books, documents, analytics, funders, screening settings, intake email, and organization data. Reading your Gmail uses the same token. This is how the agent reasons across many Books without loading the whole organization into the prompt. It asks the Books list for the facts it needs, lets the server filter and sort, and runs Python over the result. See Book data.
The token is read-only. Writes return 403, and no token outlives its reply. The agent can analyze your data but cannot change it. When you ask for a change, it tells you where in the app to make it.
On GPT models, the agent searches the web when a question needs something current or outside your data: news, rates, a company, a regulation. Each search shows as a step with its query, and opens to the pages it read. The answer cites what it used as links to those pages. Searches count toward the chat’s credits. Gemini models do not search.

LendSaaS

When your organization has connected LendSaaS, the agent can read it in every chat: leads, offers, underwriting status and history, stips, funding, payments, fees, syndication and more. It can answer questions that need both systems, such as what was offered on the deals whose statements showed falling revenue, joining a Book to its lead by the lead’s id. Access is read-only, enforced in three places:
  • The agent calls a Pathway proxy, not LendSaaS. The proxy only accepts GET requests.
  • The proxy forwards only the reads in LendSaaS’s own read-only API. Any other address, including every part of LendSaaS’s write API, is refused before anything is sent.
  • The agent’s token is read-only, so Pathway’s own LendSaaS actions (create a deal, push worksheets, change a status) refuse it too.
Your LendSaaS API key stays on Pathway’s servers and never enters the sandbox. The agent can read what your LendSaaS key can read, for members and admins. Guests cannot see what connected systems hold, in chat or in the app: no LendSaaS leads, Salesforce opportunities or Gmail through the agent.

Gmail

When you connect Gmail, the agent reads your inbox through a read-only proxy, using the same API token. The proxy only accepts GET requests, so reading is read-only by design. Any Gmail read works through it: search messages, fetch a message or thread, list labels, download an attachment.
This is the pattern throughout: email is not a bespoke set of tools, it is an HTTP surface the agent reaches with code. It searches, reads the threads that matter, downloads attachments to the sandbox, and processes them with the core tools. A CSV gets loaded into pandas, a PDF gets inspected with view, an invoice image gets read visually by the model. Sending is the one exception. It runs through the send_email tool, which composes a message and attaches sandbox files, and the user must approve it before it goes out.
Reading is read-only through the proxy. Sending requires explicit user approval on each email.

Book data

The agent reads Books from the Pathway API at three depths, and picks the lightest one that answers the question.
Every parsed Book saves its metrics: about 290 named facts (revenue, balances, debt, the business, its owners, the application, the selected offer) and its screening verdict. These are the same facts screening rules, contracts, and the Books table use. GET /api/books/ returns the facts a request names, and filters and sorts on any of them, so a question over thousands of Books is one request:
Saved metrics are written when a Book is parsed, when it is opened, and when an admin refreshes them, so after a settings change they can trail the live analytics until then. Social security numbers are never part of them. When the agent mentions a Book in its reply, it links it. Click the link to open the Book over the conversation. The Book overview tab, the Salesforce sync, and the spreadsheet generator all read from this same data. The agent reads it too, with the user’s permissions. It can answer a metric question directly, or go further: cross-reference transactions across accounts, build a visualization, run a regression, or produce a report in a format the structured UI does not offer. Tags are the single input that everything downstream derives from. When you re-tag a transaction, marking a deposit as an internal transfer or assigning a payment to a position, the analytics recompute. The agent reads the updated numbers on its next call, the spreadsheets regenerate, and the Salesforce metrics update.
The parser owns the structured Book. The agent works on top of it. It does not replace deterministic parsing, reconciliation, or analytics. It gives you a way to ask new questions and produce new artifacts without waiting for a new product workflow.

Widgets

With Widgets on, the agent can draw an interactive React component in the chat: a chart you can hover, a table you can sort, a small calculator. It uses the app’s own theme, so it matches light and dark mode. A widget runs in your browser in a sandboxed frame with no network access. It cannot call the Pathway API and it never holds a token. The agent reads and computes in its sandbox first, then writes the result into the widget, so a widget is a picture of the data at the moment it was made. For the full data behind one, ask for a file.

Artifacts and the asset proxy

Every file in the platform lives in S3 and is served through one endpoint: /api/assets/{s3_key}. The key holds an unguessable UUID, so the endpoint needs no separate login. It signs a short-lived URL and returns a redirect. The frontend receives a URL, checks the mime type, and renders the matching preview: images inline, PDFs in a viewer, HTML in a sandboxed iframe, Excel in Office Online, everything else as a download link. It does not distinguish between a chart the agent just made and a spreadsheet the parser produced. Both are just files behind the same proxy.
For Excel files, adding ?embed=office returns a fresh Office Online embed URL instead of a redirect. This powers the interactive spreadsheet previews in chat, in the Book’s spreadsheet tab, and in the embed API.

State

Two things hold the state of a chat: the sandbox filesystem and the conversation history. Files on disk, messages in the database. That is the whole system. A shell, a filesystem, and two additions on top: save_artifact to publish a file, and view to let the agent see one. Simple primitives that compose into the work.