Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions adrs/agent-context-layer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Agents are much more useful with a company context layer — and two bugs are blocking it

Hi — we're PipesHub. We do context layer for agents and enterprise search for humans across Drive, Slack, Gmail, Jira,
Confluence and internal knowledge bases, with each entities's permissions enforced
on every query.

**Why we think this matters for QM.** A QM agent with a sandbox can already do
real work. What it can't do is know anything about the company it works for — so
people spend the first half of every conversation pasting in context, and the
agent still reasons from a fragment. The obvious fix is to connect data sources.
The reason that usually goes wrong is permissions: an agent that can read every
document in the company is a fundamentally different and much riskier product
than one that reads exactly what the person asking can already read.

A context layer solves the second problem, which is what makes solving the first
one safe. We think that's a general pattern worth QM having a view on, not just
a PipesHub thing.

**What we built.** A CLI installed into the sandbox, plus a `tool.json` and a
`SKILL.md`. Deliberately QM-native — no core changes, no plugin, no MCP
attachment. Each person supplies their own token from their own keychain, so
answers stay bounded by their own access.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QM only injects a person’s own keychain automatically in their personal scope. In an ordinary shared conversation, the speaker’s own credential is not injected; credentials must instead be granted to the conversation, and a standing grant can then be reused by subsequent participants. I reproduced this with the focused keychain end-to-end tests and confirmed the controlling condition in src/core/orchestrator.ts. As written, “answers stay bounded by their own access” is therefore true for DMs but not established for shared rooms, which is important because permission preservation is the proposal’s central safety claim. Could this describe the per-speaker credential-brokering mechanism that prevents cross-participant reuse, or explicitly limit the integration to personal DMs?


**What we're asking:**

1. **Fix the two bugs below** — they're the only thing stopping this working.
2. **Tell us whether "context layer" is a pattern you want to support** — as in,
documented as a thing QM deployments can have. If yes we'll write whatever's
useful and keep our side maintained against your releases.

**The two bugs:**

- **#272** — with `sandbox.backend: "sprites"`, a published `sandbox.image` is
silently ignored and the stock base boots. We published a 3.7 GB image with
our CLI at `/usr/local/bin`; the sandbox came up with a 2.4 MB overlay and an
empty `/usr/local/bin`.
- **#350** — on `aws`, there's no way to get a tool's program into a Lambda
MicroVM at all. The deployment layer only carries `tool.json` and skills.

Normally a tool's program goes into the sandbox image, so every sandbox just
has it. Both bugs above break that. The only route left is for the agent to
install our CLI itself, inside its own sandbox, the first time someone uses it:

npm install -g @pipeshub-ai/mcp

That does work — the sandbox has Node and npm and can reach the npm registry,
and the install survives after the message ends, so each person pays it once
rather than on every message. But it's a workaround. We don't want it to be the
setup instructions we hand people.

Happy to test against a branch.