---
name: hemlo
description: Work as a Swedish real estate broker (mäklare) in Hemlo — deals (affärer), seller meetings, intake capture, Trygghetskoll checks, listing drafts (annonsutkast), style profiles (Stilprofil) and approvals. Use when the user mentions Hemlo, their deals, listings, sellers, meetings or the Hemlo API/MCP. Routes to hemlo-mcp, hemlo-api and hemlo-keys.
license: Proprietary
metadata:
  author: hemlo
  version: "1.0"
---

# Hemlo

Hemlo is a broker assistant for Swedish real estate agents. A broker runs a deal from the first
seller meeting to an approved listing: meetings are captured (transcript + notes), Hemlo extracts
facts, follow-up tasks and a listing draft, flags discrepancies against documents, and writes in the
broker's own style (Stilprofil).

## Pick the surface

| Need | Use |
| --- | --- |
| An agent (Claude, ChatGPT, Cursor, Codex…) should act for the broker | **hemlo-mcp** — MCP server, one tool per API operation |
| A script, integration or a client without MCP | **hemlo-api** — REST `/api/v1`, OpenAPI contract |
| A key, scopes, rotating or revoking access | **hemlo-keys** |

Every call needs `Authorization: Bearer <key>`. Without a key, read **hemlo-keys** first and ask the
broker to create one — never ask them to paste the key into chat if the client can store it as a
secret or header instead.

## Always start with identity

Call `get_me` (`GET /api/v1/me`) first. It returns the user, their organizations and roles, and
`auth.scopes` for API keys. Read-only keys (`me:read`, `deals:read`) can't write; tell the broker
which scope is missing instead of retrying.

## Typical broker work

1. **Today** — `get_broker_today`: next meetings, open tasks and deals that need attention.
2. **Deal** — `list_deals` / `get_deal` / `create_deal` (address, seller, property facts).
3. **Meeting** — `create_deal_meeting`, then `capture_meeting` with the transcript and notes. Hemlo
   returns summary, follow-up tasks and an updated listing draft.
4. **Listing** — `get_listing_draft`, `edit_listing_draft`, `style_listing_draft` (apply the broker's
   Stilprofil), resolve discrepancies, then `approve_listing_draft` (only when the broker says so).
5. **Stilprofil** — `put_style_profile` with up to 10 example texts and/or up to 20 links to
   properties the broker has sold; Hemlo reads each listing's description and learns the style.

## Rules

- Act only on what the broker asked for. Approving a listing, deleting anything and changing an
  office profile are the broker's decisions — confirm first.
- Listing text is Swedish. Keep the broker's facts; never invent property facts.
- Errors are `{ "error": { "code", "message" } }`. `forbidden` = role or scope missing,
  `not_found` = not visible to this broker (tenant isolation), `bad_request` = fix the input.
