Second brain

One person's people, projects, notes, tasks, habits and reading, with where each piece came from.

Graph ID
brain
Sample data
A fictional person's life · 121 nodes, 228 edges
Schema
13 node types · 43 edge types
Stored queries
74 reads · 54 writes
Updated
Nov 17, 2026

[Ontology]

Drag types to rearrange · pinch or ⌘-scroll to zoom

All 13 types as a list
  • Person16 in sample

    "Me" is the Person with slug "per-self" and relation = self. `cadence_days` is the desired contact frequency *from me to them*. Semantically it belongs on a Knows edge or a per-relationship intent node. Queries can bind and project edge properties, but cadence stays on Person as a pragmatic single-user shortcut. Re-evaluate if the cookbook ever serves more than one user.

    slug · name · first_name · last_name · relation · email · phone · birthday · location · current_role · cadence_days · how_met · brief · tags · createdAt · updatedAt

    Knows → Person · RelatedToPerson → Person · LivesIn → Place · WorksAt → Organization · PersonInvolvedInProject → Project

  • Organization5 in sample

    slug · name · kind · brief · website · createdAt · updatedAt

  • Place9 in sample

    slug · name · kind · address · lat · lng · brief · createdAt · updatedAt

  • Event12 in sample

    Event covers anything time-stamped: meetings, milestones, life-events for self or others. Use kind = life-event for things like "Sarah's wedding" or "Dad's surgery" — the person it affects is linked via EventForPerson, not via AttendedBy.

    slug · name · kind · when · end_at · mood · brief · description · tags · createdAt · updatedAt

    AttendedBy → Person · HappenedAt → Place · EventForProject → Project · EventForPerson → Person

  • Note21 in sample

    One Note type carries every captured thought. The kind enum is what makes "journal entry," "principle," "preference about Sarah" distinguishable in queries. LLM guidance: Notes should be atomic — one idea, one principle, one insight per node. Use RelatedNote to connect rather than concatenating.

    slug · name · kind · content · when · tags · createdAt · updatedAt

    NoteAboutPerson → Person · NoteAboutProject → Project · NoteAboutArea → Area · NoteAboutPlace → Place · NoteAboutOrganization → Organization · NoteAboutMedia → Media · NoteFromArtifact → Artifact · NoteFromEvent → Event · RelatedNote → Note

  • Task15 in sample

    Task follows GTD. New tasks land in "inbox," then get clarified into a status. direction tracks relationship debts — "i-owe Theo a book recommendation." Who you're waiting on lives on the TaskForPerson edge, not a string property.

    slug · name · status · kind · context · priority · due · remind_at · direction · brief · tags · createdAt · updatedAt

    TaskForPerson → Person · TaskForProject → Project · TaskForArea → Area · TaskForGoal → Goal · TaskFromArtifact → Artifact · TaskFromEvent → Event · TaskDependsOnTask → Task

  • Project6 in sample

    Project = bounded effort with an end state. "exploring" subsumes Opportunity-style entries (things I'm considering but haven't committed to).

    slug · name · kind · status · brief · description · due · tags · createdAt · updatedAt

    ProjectInArea → Area · ProjectForOrganization → Organization

  • Area5 in sample

    Area = ongoing life domain with no end date. Health, career, family, etc.

    slug · name · kind · status · brief · createdAt · updatedAt

  • Goal4 in sample

    Goal = a desired outcome with a timeframe. Distinct from Project (Project = deliverable).

    slug · name · status · timeframe · target · due · brief · tags · createdAt · updatedAt

    GoalForArea → Area

  • Habit5 in sample

    Atomic Habits: cue → routine → reward. Completions are a date array; loses per-completion detail but keeps the schema small. Promote to HabitCompletion node only if you need it. `streak_current` / `streak_best` are denormalized from `completions` — keep them in sync.

    slug · name · status · frequency · cue · routine · reward · completions · streak_current · streak_best · brief · tags · createdAt · updatedAt

    HabitFromPrinciple → Note · HabitForArea → Area · HabitForGoal → Goal

  • Media12 in sample

    slug · name · kind · status · rating · url · published_date · brief · tags · createdAt · updatedAt

    MediaAuthoredBy → Person · MediaRecommendedBy → Person · MediaForProject → Project · MediaForArea → Area · MediaPartOf → Media

  • Artifact11 in sample

    Artifact = source-of-truth container for any imported content. One node, fat source enum. Email/Conversation collapse in here — use thread_id for grouping, kind=email/message for type, and InReplyTo edges for threading.

    slug · name · kind · source · source_ref · thread_id · url · content · blob · content_sha256 · timestamp · createdAt · updatedAt

    MentionsPerson → Person · ArtifactFromPerson → Person · ArtifactForProject → Project · RecordOf → Event · InReplyTo → Artifact · DerivedFromArtifact → Artifact

  • Chunk

    Immutable. Embedding-driven semantic search.

    text · chunk_index · embedding · createdAt

    ChunkOf → Artifact

[Questions it answers]

Each one is a stored query in the cookbook, written once and run by name from the CLI, the SDKs or an agent.

person_tasks_i_owe

What do I still owe this person?

Show the query +
query person_tasks_i_owe($slug: String) {
    match {
        $p: Person { slug: $slug }
        $t: Task { direction: "i-owe" }
        $t taskForPerson $p
        $t.status != "done"
        $t.status != "cancelled"
    }
    return { $t.slug, $t.name, $t.status, $t.priority, $t.due, $t.brief }
    order { $t.due }
}

tasks_next

What should I do next?

Show the query +
query tasks_next() {
    match {
        $t: Task { status: "next" }
    }
    return { $t.slug, $t.name, $t.context, $t.priority, $t.due, $t.brief }
    order { $t.due }
}

reading_queue

What is on my reading list?

"Reading queue" specifically — books with status=want. For other "want" media (movies, podcasts), filter notes-by-kind or use media-by-kind.

Show the query +
// "Reading queue" specifically — books with status=want.
// For other "want" media (movies, podcasts), filter notes-by-kind or use media-by-kind.
query reading_queue() {
    match {
        $m: Media { kind: "book", status: "want" }
    }
    return { $m.slug, $m.name, $m.brief, $m.tags }
    order { $m.name }
}

media_recommended_by

Who recommended this book?

Show the query +
query media_recommended_by($slug: String) {
    match {
        $m: Media { slug: $slug }
        $m mediaRecommendedBy $p
    }
    return { $p.slug, $p.name, $p.relation }
}

[128 stored queries]

Reads answer questions; writes are the typed mutations agents and people use to change the graph, each one commit.

queries/artifacts.gq6 queries+
  • get_artifact
  • artifacts_recent
  • artifacts_by_source
  • artifacts_by_thread
  • artifact_mentions
  • artifact_derived_from
queries/events.gq8 queries+
  • get_event
  • events_recent
  • events_chronologicalAll events ordered chronologically ascending — caller filters to upcoming by date.
  • events_by_kind
  • event_attendees
  • event_place
  • event_project
  • person_life_events
queries/media.gq6 queries+
  • get_media
  • reading_queue"Reading queue" specifically — books with status=want. For other "want" media (movies, podcasts), filter notes-by-kind or use media-by-kind.
  • finished_books
  • media_by_kind
  • media_authored_by
  • media_recommended_by
queries/mutations.gq54 queries+
  • add_personwrite
  • add_eventwrite
  • add_placewrite
  • add_organizationwrite
  • add_notewrite
  • add_taskwrite
  • add_projectwrite
  • add_areawrite
  • add_goalwrite
  • add_habitwrite
  • add_mediawrite
  • add_artifactwrite
  • link_knowswrite
  • link_relatedwrite
  • link_lives_inwrite
  • link_works_atwrite
  • link_attended_bywrite
  • link_event_for_personwrite
  • link_event_for_projectwrite
  • link_happened_atwrite
  • link_note_about_personwrite
  • link_note_about_projectwrite
  • link_note_about_areawrite
  • link_note_about_placewrite
  • link_note_about_organizationwrite
  • link_note_about_mediawrite
  • link_note_from_artifactwrite
  • link_note_from_eventwrite
  • link_related_notewrite
  • link_task_for_personwrite
  • link_task_for_projectwrite
  • link_task_for_areawrite
  • link_task_for_goalwrite
  • link_task_from_artifactwrite
  • link_task_from_eventwrite
  • link_task_depends_onwrite
  • link_project_in_areawrite
  • link_project_for_organizationwrite
  • link_goal_for_areawrite
  • link_habit_for_areawrite
  • link_habit_for_goalwrite
  • link_habit_from_principlewrite
  • link_person_involved_inwrite
  • link_media_authored_bywrite
  • link_media_recommended_bywrite
  • link_media_for_projectwrite
  • link_media_for_areawrite
  • link_media_part_ofwrite
  • link_mentions_personwrite
  • link_artifact_from_personwrite
  • link_artifact_for_projectwrite
  • link_record_ofwrite
  • link_in_reply_towrite
  • link_derived_fromwrite
queries/notes.gq8 queries+
  • get_note
  • notes_recent
  • notes_by_kind
  • note_related
  • preferences_for_person
  • principles_all
  • open_questions
  • note_from_artifact
queries/people.gq16 queries+
  • get_person
  • people_all
  • people_by_relation
  • close_friends
  • family_members
  • person_knows
  • person_family
  • person_lives_in
  • person_works_at
  • person_recent_events
  • person_artifacts_mentioning
  • person_artifacts_from
  • person_tasks_i_owe
  • person_tasks_they_owe
  • person_notes
  • person_recommended_media
queries/projects.gq19 queries+
  • get_project
  • projects_active
  • projects_exploring
  • project_tasks
  • project_events
  • project_people
  • project_notes
  • get_area
  • areas_all
  • areas_active
  • area_projects
  • area_goals
  • area_habits
  • area_tasks
  • get_goal
  • goals_active
  • goal_tasks
  • habits_active
  • habit_principle
queries/tasks.gq11 queries+
  • get_task
  • tasks_next
  • tasks_inbox
  • tasks_waitingTasks blocked on something — combine with task_person for "waiting on whom"
  • tasks_waiting_on_personTasks waiting on a specific person (status=waiting + TaskForPerson)
  • tasks_someday
  • tasks_by_context
  • tasks_i_owe
  • tasks_they_owe
  • task_person
  • task_dependencies

[Run it with your agent]

Paste this into a coding agent. It installs Omnigraph if it has to, creates the graph from this cookbook, loads the sample data and runs the queries above.

Paste into
  • Claude Code
  • Codex
  • Antigravity

Read https://www.omnigraph.dev/onboarding.md and set up Omnigraph for me with the Second brain cookbook: https://github.com/ModernRelay/omnigraph-cookbooks/tree/main/second-brain

[More use cases]