Skip to content

Configure

analects init --me ada \
        --pack datacenter@0.1 \
        --title "UK data centres" \
        --about "Every data centre planned or built in Great Britain."

analects init creates the graph and a default analects.yaml. It records in the graph what the graph is (D68): - --pack: the packs it is built on, with what they import (analects schema show lists the packs there are); - --title and --about: what its pages lead with.

An agent with the Analects skill can do this with you (Research with an agent). A graph that records no packs loads every pack. Run analects init again to change any of these. It refuses to drop a pack whose types the graph already holds.

It says where each thing is:

What Where Change it with
the graph (graph.db, SQLite) the nearest folder, starting at the current one, that has a graph.db or a packs/ folder holding a pack; the current folder if none does --db, $ANALECTS_DB
the config (analects.yaml) ~/.analects/analects.yaml $ANALECTS_CONFIG
the packs the ones Analects ships with, plus a project's own packs/ folder (analects schema new) $ANALECTS_PACKS

A packs/ folder counts only when it holds a pack (a <name>@<version>/pack.yaml), so a folder of other files that happens to be called packs/ is ignored. analects init prints the path it chose.

Analects was called kg. An old ~/.kg/kg.yaml, the kg command and any $KG_… setting still work; a $ANALECTS_… setting wins over its $KG_… twin (D69).

Keep graph.db out of git: it is your working graph and may hold private work. Work you share goes into a dataset.

The settings that matter first

me: ada                  # your handle; an agent works as ada/<agent>
write_policy: confirm    # ask about judgements, let well-evidenced writes land
fetch: off               # analects makes no outbound request unless you allow it
private_terms: []        # words that must never leave in an export
  • write_policy — confirm (the default) holds anything that is a judgement — a new entity, a merge, a value that contradicts one held — for you to review with analects review; auto lands everything that passes the rules; per-operation overrides go under policy:.
  • fetch — off by default: Analects reads only the text you give it. record lets Analects fetch a page while a research run is being recorded; on lets --fetch read pages on request. Importers that read the web need record or on.
  • private_terms — a list of words (a client's name, a private project) that mark private work. An export that would carry one is refused, and a source you may not share is kept with --local-only channels and analects keep-local.

The full default file, with scoring weights and resolver thresholds, is in the design.

Keys

Some importers need a key, read from the environment or from .env beside analects.yaml (never from analects.yaml itself):

Variable For
COMPANIES_HOUSE_API_KEY analects import companies-house-api

Next: your first research run.