Quickstart
Run the agent locally on synthetic data, with or without an AI model, and create the first superuser.
Requirements
- Node.js 24
- pnpm through Corepack (
corepack enable)
Run it
pnpm i
pnpm devThen open http://localhost:3070. The interface is also available in Persian, Arabic, Russian and Chinese at /fa, /ar, /ru and /zh.
pnpm dev first writes the synthetic marts to data/marts/synthetic (about 1 MB, deterministic) and then starts the web app. The embedded database under .data/pglite is created and migrated on first use.
The home page is the chat. With no environment variables at all, it starts in replay mode: pick a scripted demo in the sidebar and watch the agent plan, call tools and draw charts. The tools run live on the data; the narration is templated from their results. The REST API, the MCP server and these docs work the same in every mode.
You can chat as a guest straight away. Sign up from the top bar to keep your chats: signed-in chats are saved to your history (unless you start a temporary chat) and can be searched, renamed and deleted from the sidebar.
Add a model
Create next/.env.local (it is gitignored) with your provider, for example:
AI_PROVIDER=anthropic
AI_API_KEY=your-keyRestart pnpm dev: the mode menu at the top of the chat now shows Live with your model. See Bring your own model for every provider. A superuser can also choose the model in the admin panel (Admin › Model).
Create the first superuser
The admin panel at /admin is for superusers. Create the first one in either of two ways:
-
In the browser. Add a setup token of at least 32 characters to
next/.env.localand restart:SETUP_TOKEN=... # for example the output of: openssl rand -hex 32Open http://localhost:3070/setup, enter the token, a name, an email address and a password (at least 10 characters), then log in. The page works only while no superuser exists; afterwards it shows "Page not found". Remove
SETUP_TOKENonce you are done. -
From a terminal. Stop the web app first (the embedded database allows one process at a time), then run:
pnpm --filter @alghafat-market/cli superuser --email you@example.comIt shows which database it will write to, asks for confirmation and for the password (typed without echo), and creates the account. If an account with that email already exists, it promotes it instead.
See Accounts and admin for everything the admin panel controls.
Useful commands
| Command | What it does |
|---|---|
pnpm dev | Synthetic marts, then the web app on port 3070 |
pnpm data:synthetic | Rebuild the synthetic marts (skips when up to date) |
pnpm --filter @alghafat-market/cli replays | Rebuild the scripted demos used by replay mode |
pnpm --filter @alghafat-market/cli superuser --email <email> | Create a superuser or promote an existing account |
pnpm mcp:stdio | Serve the public tools over MCP stdio |
pnpm test | Unit tests |
pnpm typecheck | TypeScript across the workspace |
pnpm evals | Deterministic evals; writes evals/results/latest.json |
Overview
An open-source agent that works through rent, buy and off-plan decisions with sourced numbers, charts and maps.
Bring your own model
Run the agent on Anthropic, OpenAI, Google, any OpenAI-compatible endpoint, or no model at all.
Code: Apache-2.0. Original docs text and diagrams: CC BY 4.0. Excluded from both: data, figures and charts derived from DLD or Data.Dubai (governed by DATA_LICENSE.md and any DLD grant); EIBOR values (CBUAE terms); third-party names and logos; and the product and operator names and logos (no trademark licence).
The default data is SYNTHETIC – not Dubai data. Nothing here is financial, legal or investment advice.