-
Notifications
You must be signed in to change notification settings - Fork 1.6k
adrs: agents are much more useful with a company context layer #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shekharkadyan
wants to merge
2
commits into
yc-software:main
Choose a base branch
from
shekharkadyan:context-layer-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+65
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # 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. | ||
|
|
||
| **To be precise about that last part:** it holds in DMs, and we've only built | ||
| for DMs. In a personal scope QM injects the speaker's own keychain credential, | ||
| so the person asking is the person whose permissions apply — we've confirmed | ||
| that end to end. In a shared conversation it works differently: your own | ||
| credential isn't injected, someone grants one to the conversation instead, and | ||
| that grant then serves whoever speaks next. For us that would mean one person's | ||
| token answering another person's question, which is the exact thing this design | ||
| exists to prevent. So we've scoped v1 to personal DMs and say so in our docs. | ||
|
|
||
| Supporting shared rooms properly would need QM to broker per speaker — inject | ||
| the credential belonging to whoever is talking, rather than one attached to the | ||
| room. We're not asking for that today; flagging it as the thing that would | ||
| unlock it. | ||
|
|
||
| **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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?