Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f7a299f
feat(integrations): add engraphis-prime-agent package and installer
Coding-Dev-Tools Aug 26, 2026
48729db
fix(review): address P1+P2 review comments on PR 174
Coding-Dev-Tools Aug 26, 2026
f971cc7
feat(prime-agent): physics tuning + opt-in recall arm-candidate-k cap…
Coding-Dev-Tools Aug 26, 2026
227c6e8
fix(lint): drop the unused os import in scripts/install_prime_agent.py
Coding-Dev-Tools Aug 26, 2026
c8b4642
test(e2e): align Galaxy physics expectations with the de917b4 calibra…
Coding-Dev-Tools Aug 28, 2026
6ee74aa
fix(review): address PR #174 review round 2
Coding-Dev-Tools Aug 28, 2026
fb54ae3
fix(test): use 300-fact corpus so the candidate_k_cap timing assertio…
Coding-Dev-Tools Aug 28, 2026
de70e86
fix(review): address PR #174 review round 3
Coding-Dev-Tools Aug 28, 2026
ce25b6c
fix(review): address PR #174 review round 4
Coding-Dev-Tools Aug 28, 2026
340addf
test(recall): make the arm-candidate-k ceiling test non-vacuous
Coding-Dev-Tools Aug 28, 2026
f1945f3
feat(galaxy): bump resting base field 1.5x so the default scene carri…
Coding-Dev-Tools Aug 28, 2026
15abd48
docs(agents): document the four-subagent internal delegation pattern
Coding-Dev-Tools Aug 28, 2026
3f716d5
fix(review): address PR #174 review round 5
Coding-Dev-Tools Aug 29, 2026
3596ffb
fix(review): address PR #174 review round 6
Coding-Dev-Tools Aug 29, 2026
bb1ee7d
fix: harden prime-agent lifecycle and tool registration
Coding-Dev-Tools Aug 29, 2026
70a644d
fix: bound galaxy orbit speeds after control
Coding-Dev-Tools Aug 29, 2026
862b518
fix prime agent lifecycle schemas and timeouts
Coding-Dev-Tools Aug 29, 2026
5ea1fab
fix prime agent shutdown and lifecycle validation
Coding-Dev-Tools Aug 29, 2026
0003910
fix prime agent lifecycle validation and tool caching
Coding-Dev-Tools Aug 29, 2026
2d1f912
support Smart lifecycle aliases and schema unions
Coding-Dev-Tools Aug 29, 2026
38d8b00
fix(prime-agent): preserve lifecycle aliases and retryability
Coding-Dev-Tools Aug 29, 2026
81177d5
fix(prime-agent): reject closed fleet reentry
Coding-Dev-Tools Aug 30, 2026
dcfebec
docs: remove unverified recall speed claim
Coding-Dev-Tools Aug 30, 2026
8a827f1
fix(prime-agent): validate lifecycle arguments
Coding-Dev-Tools Aug 30, 2026
2cadc34
fix(prime-agent): serialize calls across session rotation
Coding-Dev-Tools Aug 30, 2026
7076949
docs(prime-agent): use packaged installer in quickstart
Coding-Dev-Tools Aug 30, 2026
0e11fe4
fix(prime-agent): block calls during fleet shutdown
Coding-Dev-Tools Aug 30, 2026
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
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,14 @@ and pluggable.
This is the canonical operating manual for any AI agent working in this repo. `CLAUDE.md`
imports it. Read §0 before editing anything.

### Internal subagent delegation

When parallel delegation is appropriate for ChatGPT/Codex tasks, use exactly four bounded
subagents inside the current task and chat. Keep delegation at one level: workers return bounded
results and the parent performs the sole integration. Subagents must never be sent to Orca, Orca
orchestration, or separate user-visible threads. Before finalizing, verify that all four workers
returned and that no forbidden routing or descendant delegation occurred.

---

## 0. Read this first — two architectures live in one package
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -184,12 +184,26 @@ All notable changes to Engraphis are documented here. Format loosely follows
- Folder imports report truncation explicitly: a folder with more matching files than the
ceiling now warns and returns `truncated`/`matched_total`/`unreadable` fields instead of
silently importing an alphabetically-first slice that looks complete.
- The `engraphis_prime_agent` integration now ships a fleet wrapper that boots multiple
sub-agents (researcher / coder / reviewer / writer) with one shared memory workspace,
with fleet-wide configuration via `ENGRAPHIS_REPO` and per-agent override via the
`repo=` argument; the `engraphis-prime-agent install` subcommand configures a target
prime-agent configuration file and `python -m engraphis_prime_agent install`
works directly from the installed wheel.

### Fixed

- The Every node dashboard view no longer crashes on open: a declaration-order bug in the
renderer threw during construction before anything painted. The scene canvas also keeps its
accessible role/label now instead of being hidden from assistive technology.
- Prompt-only recall now honours an opt-in `ENGRAPHIS_RECALL_ARM_CANDIDATE_K` env var (and
the matching `RecallEngine(arm_candidate_k_cap=...)` constructor argument) that clamps both
the first-page widening (`candidate_k + min(250, candidate_k*3)`) and the second-page
ceiling, so operators can trade untrusted-scope widening for latency on the new k=50
default without code changes. The accompanying benchmark test,
`test_recall_arm_candidate_k_cap.py`, uses a 300-fact trusted corpus because both requested
arm depths clamp to the same 49 rows on a smaller corpus and the timing assertion was
unreliable. Default behaviour is unchanged.
- Import previews now page the source manifest exactly like execution, so vaults whose manifest
outgrew one list page (10k identities) no longer show manifest-only files as silently absent
from the preview plan; beyond-boundary rows are reported as `missing` instead of dropped.
Expand Down
54 changes: 52 additions & 2 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -396,6 +396,51 @@ including `engraphis_check_update`, is in the [MCP tool reference](https://githu
For installation, configuration, lifecycle commands, and the local trust boundary, see the
[Pi extension guide](https://github.com/Coding-Dev-Tools/engraphis/blob/main/integrations/pi/README.md).

### Command Code SessionStart hook

`integrations/commandcode/` ships a SessionStart hook that warms up a new
session with bounded, recalled context from the local Engraphis gateway. Fails
open on timeout and is installed via `python scripts/install_cc_hook.py`.

### prime-agent fleet

`integrations/prime_agent/` ships a first-party Python package for
[PrimeIntellect prime-agent](https://github.com/PrimeIntellect-ai/prime-agent)
that exposes the same nine Smart MCP tools, with a `PrimeAgentFleet` of eight
named sub-agents (`researcher`, `planner`, `coder`, `reviewer`, `tester`,
`documenter`, `monitor`, `integrator`) sharing one `engraphis-mcp` stdio
subprocess. Install via `pip install ./integrations/prime_agent` and register
with `python scripts/install_prime_agent.py`. See the
[prime-agent integration guide](https://github.com/Coding-Dev-Tools/engraphis/blob/main/integrations/prime_agent/README.md).

**What the integration is.** A `PrimeAgentFleet` is a thin Python layer
around the same `engraphis-mcp` Smart gateway every other host uses. At
runtime the fleet holds one shared `EngraphisMcpClient`, which owns one
`engraphis-mcp` subprocess over JSON-RPC stdio. Each of the eight named
sub-agents gets its own Engraphis session (started lazily on first tool use)
and its own default `repo` scope, so per-role memory is isolated while the
local gateway stays single-process. The eight sub-agent names
(`researcher`, `planner`, `coder`, `reviewer`, `tester`, `documenter`,
`monitor`, `integrator`) are the fixed default; pass `agent_names=[...]` to
`PrimeAgentFleet(...)` for a custom set. Concurrent tool calls serialize at
the JSON-RPC frame layer through an `asyncio.Lock`, so framework-level
parallelism (eight sub-agents reasoning at once) is preserved while the
underlying MCP transport remains one ordered stream. The only integration
surface is `EngraphisPrimeAgent.register()` in
`integrations/prime_agent/src/engraphis_prime_agent/agent.py` -- that is the
single adapter point to override if prime-agent's tool-registration API
differs from the assumed `target.register_tool(name, fn, schema=...)`
contract.

The design -- eight named sub-agents, one shared stdio subprocess,
per-agent session bootstrap, and `ENGRAPHIS_*`-only environment forwarding
to the gateway -- is recorded in `~/.commandcode/plans/prime-agent-integration.md`
on the host where the integration was developed. When that host plan is not
available (other contributor machines, CI), the same design is summarized in
the PR description that introduced the integration and in the
[prime-agent integration guide](https://github.com/Coding-Dev-Tools/engraphis/blob/main/integrations/prime_agent/README.md)
("Architecture" and "Concurrency model" sections).

## Quickstart: repository graph

```bash
Expand DownExpand Up@@ -721,8 +766,8 @@ file. It never searches the working directory for `.env`, and explicit process v
| `ENGRAPHIS_ALLOW_AUTOMATIC_CRITICAL_RETENTION` | `false` | Opt in only when an LLM supervisor may automatically assign the long-lived `critical` class; explicit user-selected critical retention is unaffected |
| `ENGRAPHIS_WHISPER_MODEL` | Not set | Enables local faster-whisper audio/video transcription |
| `ENGRAPHIS_POSTGRES_DSN` | Not set | CLI-only PostgreSQL source; used for the connection and never stored |
| `ENGRAPHIS_POSTGRES_CONNECT_TIMEOUT` | `10` | PostgreSQL introspection connection timeout in seconds (bounded to 1120) |
| `ENGRAPHIS_POSTGRES_STATEMENT_TIMEOUT_MS` | `30000` | Per-introspection PostgreSQL statement timeout in milliseconds (bounded to 1300000) |
| `ENGRAPHIS_POSTGRES_CONNECT_TIMEOUT` | `10` | PostgreSQL introspection connection timeout in seconds (bounded to 1--120) |
| `ENGRAPHIS_POSTGRES_STATEMENT_TIMEOUT_MS` | `30000` | Per-introspection PostgreSQL statement timeout in milliseconds (bounded to 1--300000) |
| `ENGRAPHIS_GRAPH_TOKEN` | Not set | Bearer token for `engraphis-graph-server`; required off-loopback |
| `ENGRAPHIS_GRAPH_HOST` / `ENGRAPHIS_GRAPH_PORT` | `127.0.0.1` / `8720` | Read-only graph/recall server bind address |
| `ENGRAPHIS_LLM_PROVIDER` | `openai` | `openai \| anthropic \| google \| openrouter \| custom` |
Expand All@@ -743,6 +788,11 @@ file. It never searches the working directory for `.env`, and explicit process v
| `ENGRAPHIS_CLOUD_ACCESS_TOKEN` | Not set | Optional short-lived access token for ephemeral jobs |
| `ENGRAPHIS_MANAGED_COMPUTE_CONSENT` | *(auto)* | Operator override only; default follows whether a cloud session is configured (connected = allowed, local-only = never). `0` opts a connected installation out; `1` permits local snapshot preparation but does not create a cloud credential or authorize an upload |

Evaluated offline on the bundled retrieval gates (`eval/datasets/sample.jsonl`,
`codemem.jsonl`, k=5): enabling the optional cross-encoder reranker kept hit@5 at 1.0 with
zero per-question regressions, raised MRR@5 from 0.889→0.944 (sample) and 0.962→0.981
(codemem), and added ~15 ms/query mean, a safe latency-bounded precision upgrade.

See `.env.example` for the full variable inventory. Supply those values through the process
environment or the trusted config file above; copying it to an arbitrary `./.env` does not make
Engraphis load it.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading