Oculet
by Brendan-Lim
README.md
<a href="https://brendan-lim.github.io/Oculet/">
<picture>
<source media="(prefers-color-scheme: dark) and (max-width: 600px)" srcset="docs/images/hero-mobile-dark.webp" />
<source media="(max-width: 600px)" srcset="docs/images/hero-mobile-light.webp" />
<source media="(prefers-color-scheme: dark)" srcset="docs/images/hero-dark.webp" />
<img src="docs/images/hero-light.webp" width="100%" alt="Oculet. Many agents. One watchful eye. A pixel-art cyclops stands beside a blue business graph where a release moving from 9 to 14 December reaches a customer onboarding commitment marked as a CF-01 timeline conflict. Illustration with synthetic records." />
</picture>
</a>
<div align="center">
<br>
**Your AI agents each make sensible decisions. Oculet catches the ones that collide.**<br>
The command centre for founders running a company on AI agents, from engineering and marketing to sales and support.
<br>
[**Try the browser demo**](https://brendan-lim.github.io/Oculet/) · [**See it work**](#from-one-changed-date-to-an-approved-fix) · [**How it works**](#how-it-works) · [**Run it locally**](#run-it-locally)
<p>
<a href="pyproject.toml"><img src="https://img.shields.io/badge/Python-3.12-3776AB?style=flat&logo=python&logoColor=white" alt="Python 3.12"></a>
<a href="evidence/README.md"><img src="https://img.shields.io/badge/Relate-1.2.0-0007CB?style=flat" alt="Relate 1.2.0"></a>
<a href="docs/INTEGRATIONS.md"><img src="https://img.shields.io/badge/MCP-server_%2B_client-555555?style=flat" alt="MCP server and client"></a>
<a href="LICENSE"><img src="https://img.shields.io/github/license/Brendan-Lim/Oculet?style=flat&color=2ea44f" alt="MIT license"></a>
</p>
<sub>Free and open source · Demo runs entirely in your browser · No sign-in, no API keys</sub>
</div>
<br>
## Every agent made a reasonable decision.
Engineering's agent finds a blocker and moves Release 2.0 to 18 December. Sales' agent has already promised a customer onboarding on 15 December, and onboarding needs that release. Each agent acted sensibly on what it could see. Neither could see the other, and the founder usually finds out last.
**Oculet gives every agent, and the founder, the same picture of the business.** Agents report their decisions to Oculet over MCP, and Oculet can also read authorised sources such as GitHub and Gmail. Every record lands in one typed business graph stored in **Relate**, an embedded graph database. The moment something changes, Oculet traces it to everything that depends on it and surfaces the conflict before anyone acts on outdated information.
<br>
## From one changed date to an approved fix
**Observe → Trace → Detect → Compare → Approve**
**1 · Observe.** An agent reports a change through one of Oculet's MCP tools, such as `update_milestone` when engineering moves a release. Oculet validates the event, records its source, removes duplicates and writes a new graph revision.
**2 · Trace.** **Business Blast Radius** follows typed dependency paths in Relate from the changed record. Here the new date reaches three records: the launch campaign, its help-centre article and the customer onboarding commitment.
**3 · Detect.** Deterministic rules check what those paths reach. Onboarding is due 15 December but the release it needs arrives 18 December, so Oculet raises a confirmed **timeline conflict**, three days short.
<table>
<tr>
<td width="50%" valign="top"><img src="docs/images/step-blast-radius.webp" width="100%" alt="Stage 5, Business Blast Radius: the change reaches 3 connected records, with each dependency path listed and computed by Relate in the browser."></td>
<td width="50%" valign="top"><img src="docs/images/step-conflict.webp" width="100%" alt="Stage 6, Launch conflict detected: customer onboarding is due 15 Dec but the release arrives 18 Dec, 3 days short."></td>
</tr>
</table>
<p align="center"><sub>The Broken Launch, stages 5 and 6 of 10. Relate runs these graph queries live in your browser.</sub></p>
**4 · Compare.** **Parallel Futures** runs each possible fix in its own isolated copy of the graph and shows what it would change. Moving onboarding to 18 December clears the conflict. Withdrawing the commitment clears it too. The outcomes are not ranked: the founder chooses.
<p align="center">
<img src="docs/images/step-parallel-futures.webp" width="100%" alt="Stage 7, Parallel Futures: a shared starting point at graph revision 2 with the conflict confirmed, and two outcomes, each in its own copy of the graph, both showing the conflict cleared.">
<br>
<sub>Two outcomes from the same starting revision. Nothing in the live graph changes until the founder approves one.</sub>
</p>
**5 · Approve.** The founder approves one exact operation. Oculet checks the graph state, policy, authorisation and expiry again before applying it, then every agent reads the revised dates from Oculet instead of acting on the old ones.
<p align="center">
<img src="docs/images/step-resolved.webp" width="440" alt="Stage 10, Business context updated: the founder moved onboarding to the new release date and the timeline conflict is resolved. Release available 18 Dec, onboarding due 18 Dec, commitment active.">
<br>
<sub>One approval, and every agent now works from the same dates.</sub>
</p>
### Three guided scenarios
| Scenario | What goes wrong | Rule |
| :--- | :--- | :--- |
| [**The broken product launch**](https://brendan-lim.github.io/Oculet/#/demo/launch/1) | Engineering delays a release that a customer commitment depends on. | Timeline |
| [**The double-spent budget**](https://brendan-lim.github.io/Oculet/#/demo/budget/1) | Two agents request credits from the same 100-credit test budget. Each request fits alone; together they exceed it. | Budget |
| [**The prospect that became a customer risk**](https://brendan-lim.github.io/Oculet/#/demo/prospect/1) | A prospect asks for audit log export, and the sales agent proposes promising a capability engineering has withdrawn. | Commitment |
Every outcome is computed, not replayed. Change the numbers under **Try your own numbers** and Relate recomputes every path, conflict and outcome on the spot.
<br>
## Why use Oculet
<table>
<tr>
<td width="50%" valign="top">
<b>One source of truth for every agent</b><br>
Agents call <code>get_context</code> before acting and get the current state and dependencies of the record they are working on, not the whole company history.
</td>
<td width="50%" valign="top">
<b>Paths, not guesses</b><br>
Every finding shows the typed dependency path and source record behind it. Open <b>How Relate found this</b> on any stage to see the queries.
</td>
</tr>
<tr>
<td valign="top">
<b>Rules you can read</b><br>
Deterministic checks cover eight conflict classes, from timelines and budgets to duplicated work and contradictory claims. Each finding is marked confirmed, potential or unknown, so missing information never counts as a violation.
</td>
<td valign="top">
<b>Try a fix before you commit to it</b><br>
Parallel Futures evaluates alternatives in isolated graph copies. Nothing live changes and nothing external runs while you compare.
</td>
</tr>
<tr>
<td valign="top">
<b>You stay in charge</b><br>
Approval binds one exact operation. Writes to external systems need a separate operation permit and independent provider readback before they count as done.
</td>
<td valign="top">
<b>Runs on your machine</b><br>
The service binds to loopback with an embedded Relate store. Hosted inference is off by default, and the browser demo needs no account, key or install.
</td>
</tr>
</table>
<br>
## How it works
**Agents report. Relate connects. Rules decide. The founder approves.**
```mermaid
%%{init: {"flowchart": {"wrappingWidth": 300, "rankSpacing": 26, "nodeSpacing": 24}}}%%
flowchart TD
A["AI agents<br/>Claude Code · Codex · MCP clients"] -->|MCP tools| C
B["Authorised sources<br/>GitHub · Gmail · Wispr Flow"] -->|opt-in reads| C
C["Oculet service<br/>Validate · deduplicate · record provenance"] --> D["Relate business graph<br/>Typed records and revisions"]
D --> E["Business Blast Radius<br/>Bounded typed paths"]
E --> F{"Deterministic<br/>conflict rules"}
F -->|Conflict| G["Parallel Futures<br/>Isolated graph copies"]
G --> H["Founder approval<br/>Re-checked before apply"]
H --> I["Receipt and new revision<br/>Agents read revised context"]
```
Native mode uses embedded Relate 1.2.0 and a local Python service that serialises graph writes, versions business facts and runs the conflict and approval rules. Activity history is kept separately from the business view, so raw tool calls stay inspectable without crowding the graph.
The same React frontend also runs as a credential-free browser demo. There, Relate WASM executes the queries and branch computations on synthetic input, and external effects are simulated and labelled. The browser never contacts a provider.
[Architecture](docs/ARCHITECTURE.md) · [Integrations](docs/INTEGRATIONS.md) · [Evidence and methods](evidence/README.md) · [Third-party notices](THIRD_PARTY_NOTICES.md)
<br>
## 94% smaller on disk, with every path matched
- **94% smaller.** On the largest dense matched workload, the closed Relate store took 156,748 bytes: 94.3% less than LadybugDB and 81.0% less than indexed SQLite.
- **24 of 24 exact.** Every engine and workload combination returned exactly the expected dependency paths.
- **12–17 ms.** Median Business Blast Radius response on four synthetic workloads.
<details>
<summary><strong>Method, versions and latency</strong></summary>
The matched comparison used Relate 1.2.0, indexed SQLite 3.53.4 and LadybugDB 0.23.0 on one Apple Silicon Mac, across eight generated workloads of 100 to 1,350 records. On warm traversal of the largest dense fixture, the comparators were faster: medians of 1.140 ms for SQLite and 2.553 ms for LadybugDB against 14.083 ms for Relate. The Blast Radius figures (12.0–17.4 ms) come from a separate benchmark of the production application. All figures are from that machine; [evidence](evidence/README.md) explains how to rerun them.
</details>
## Verified with Claude Code, Codex, GitHub, Gmail and Wispr Flow
- **Claude Code and Codex** connected through their own MCP clients, reported their work to Oculet and read back context the other agent had shared.
- **GitHub:** after a founder approval, Oculet updated a real milestone and confirmed the change with an independent provider read and a durable Relate receipt.
- **Gmail:** Oculet read a test mailbox and verified an unsent draft.
- **Wispr Flow:** Oculet pulled a meeting summary straight into Relate and recognised a repeat delivery as a duplicate.
Every live test ran on dedicated test accounts, and every write was confirmed by reading it back from the provider. [Integration details](docs/INTEGRATIONS.md)
<br>
## Run it locally
You need Python 3.12.15 and Node.js 24. The reference setup uses Node.js 24.13.0 on macOS arm64.
```sh
git clone https://github.com/Brendan-Lim/Oculet.git && cd Oculet
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.lock
npm ci --prefix frontend
```
Start a disposable sample company in a directory that does not exist yet, then open the printed URL:
```sh
python scripts/launch_oculet.py sample --scenario A --dir ./sample-a --backend-port 18952 --port 18953 --no-open
```
Choose **Decisions**, select “Move the internal release earlier”, review the exact operation, confirm it and inspect the execution receipt. Proposals stay valid for eight hours from sample creation, so use a new directory for a fresh review. `--scenario B` and `--scenario C` prepare the budget and prospect samples. The sample writes a persistent Relate store to `sample-a/store/graph`.
<details>
<summary><strong>Browser demo, tests and the inspectable Relate sample</strong></summary>
Build both frontend modes and serve the public browser demo locally:
```sh
cd frontend
npm run build
npm run preview -- --host 127.0.0.1 --port 18951
```
The guided flows need no provider accounts, API keys, paid subscriptions or model installation.
Run the native tests and the benchmark arithmetic check from the repository root:
```sh
python -m pytest
python evidence/check-claims.py
```
One export test is skipped unless `WF_RELATE_CLI` points to the Relate CLI. The repository also includes a persistent synthetic Relate store, `evidence/sample.rl`, which you can query read-only with the Relate CLI. See [evidence](evidence/README.md) for the command and regeneration steps.
</details>
## Built to be trusted
- **Safe to explore.** The public demo runs a whole synthetic company in your browser. External actions are simulated and clearly labelled, so you can approve anything without touching a real system.
- **Facts, not guesses.** Oculet's rules work only from what agents report and what its integrations read. Missing information is marked unknown instead of being filled in.
- **Approvals with teeth.** Every action that runs through Oculet's integrations is re-checked against current state and policy before it runs, and only counts as done once the provider confirms it.
## What's next
- Scheduled Wispr Flow sync, a live Viktor connection (the adapter is ready) and connections to Happenstance and Grok Bot.
- Multiple company workspaces.
- Manual VoiceOver and NVDA testing alongside the automated accessibility checks.
## Credits and licence
The original Oculet source is available under the [MIT License](LICENSE). Third-party components, fonts and reference attributions are listed in [Third-party notices](THIRD_PARTY_NOTICES.md). Thanks to the Relate team for the embedded and WASM graph engine, and to the maintainers of React Flow, FastAPI and the MCP SDKs.
The cyclops and the pixel wordmark are original artwork. Built for the Relate hackathon with AI coding assistance (OpenAI Codex and Claude Code).
<br>
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/mascot-dark.svg">
<img src="docs/images/mascot.svg" width="72" alt="">
</picture>
<br>
<sub>Many agents. One watchful eye.</sub>
<br>
<sub>Built by <a href="https://github.com/Brendan-Lim">Brendan Lim</a></sub>
</div>
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues