# forgeprint/evomem architecture

> Architecture diagram of the GitHub repository forgeprint/evomem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/forgeprint/evomem
- Repository: https://github.com/forgeprint/evomem

## Overview

Evomem is local-first memory infrastructure for coding agents: notes are ingested or added, stored locally, then searched and recalled through the CLI or MCP; agent suggestions remain proposals until a person reviews them. Its other documented capabilities include HTTP/webhook ingestion, audio transcription, organization and clusters, external-source connections, and one-way PostgreSQL sync. The graph includes these product branches, but sampled source is incomplete; dashed, uncited edges mark relationships that are documented only broadly or not verified in excerpts.

Main entry points: [`shared/database/notes.go`](https://github.com/forgeprint/evomem/blob/main/shared/database/notes.go) (Note storage), [`cmd/evomem/main.go`](https://github.com/forgeprint/evomem/blob/main/cmd/evomem/main.go) (CLI), [`core/api/server.go`](https://github.com/forgeprint/evomem/blob/main/core/api/server.go) (HTTP API), [`core/mcp/tools.go`](https://github.com/forgeprint/evomem/blob/main/core/mcp/tools.go) (Memory tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entrypoints"]
  node_cli["CLI<br/>[main.go]"]
  node_http["HTTP API<br/>[server.go]"]
  node_mcp["MCP server<br/>[server.go]"]
end

subgraph group_ingest["Ingestion and enrichment"]
  node_webhooks["Webhook adapters<br/>[telegram.go]"]
  node_jira_adapter["Jira adapter<br/>[jira.go]"]
  node_audio_api["Audio intake<br/>[audio.go]"]
  node_transcription["Transcription<br/>[run.go]"]
  node_organization["AI organization<br/>[run.go]"]
  node_connections["Source connections<br/>[connect.go]"]
  node_jira_pull["Jira source pull<br/>[jira.go]"]
end

subgraph group_recall["Recall and review"]
  node_mcp_tools["Memory tools<br/>[tools.go]"]
  node_search["Full-text search<br/>[search.go]"]
  node_proposals[("Proposal review<br/>[proposals.go]")]
  node_clusters[("Note clusters<br/>[clusters.go]")]
end

subgraph group_storage["Memory and sync"]
  node_note_model["Note model<br/>[note.go]"]
  node_note_store[("Note storage<br/>[notes.go]")]
  node_audio_store[("Audio files<br/>[audio.go]")]
  node_sync_worker["One-way sync<br/>[sync.go]"]
  node_postgres_transport["PostgreSQL transport<br/>[postgres.go]"]
  node_sync_state[("Sync state<br/>[sync.go]")]
  node_archive["Archive thinning<br/>[archive.go]"]
end

node_person(("Person"))
node_agent(("Coding agent"))
node_automation(("Automation sources"))
node_jira(("Jira"))
node_telegram(("Telegram"))
node_postgres[("PostgreSQL mirror")]

node_person -->|"runs commands"| node_cli
node_agent -->|"uses tools"| node_mcp
node_mcp -.->|"dispatches tools"| node_mcp_tools
node_mcp_tools -->|"reads notes"| node_note_store
node_mcp_tools -.->|"searches notes"| node_search
node_mcp_tools -.->|"proposes notes"| node_proposals
node_person -->|"posts notes"| node_http
node_automation -->|"sends content"| node_http
node_http -->|"creates notes"| node_note_store
node_jira -->|"sends webhook"| node_http
node_telegram -->|"sends webhook"| node_http
node_http -->|"routes webhooks"| node_webhooks
node_http -->|"routes webhooks"| node_jira_adapter
node_webhooks -.->|"stores notes"| node_note_store
node_jira_adapter -->|"builds notes"| node_note_model
node_person -.->|"uploads recordings"| node_audio_api
node_audio_api -->|"stores recordings"| node_audio_store
node_audio_store -.->|"provides recordings"| node_transcription
node_transcription -.->|"creates notes"| node_note_store
node_cli -.->|"runs organization"| node_organization
node_organization -.->|"updates memory"| node_note_store
node_cli -.->|"manages clusters"| node_clusters
node_cli -->|"manages sources"| node_connections
node_connections -.->|"pulls Jira issues"| node_jira_pull
node_jira_pull -.->|"returns notes"| node_note_store
node_person -->|"reviews proposals"| node_cli
node_cli -->|"accepts or rejects"| node_proposals
node_proposals -.->|"acceptance creates note"| node_note_store
node_cli -->|"starts sync"| node_sync_worker
node_sync_worker -->|"tracks cursors"| node_sync_state
node_sync_worker -->|"pushes changes"| node_postgres_transport
node_postgres_transport -->|"writes mirror"| node_postgres
node_cli -->|"archives notes"| node_archive
node_archive -->|"thins stored notes"| node_note_store
node_cli -->|"adds and reads notes"| node_note_store
node_note_store -->|"stores notes"| node_note_model
node_note_store -.->|"indexes notes"| node_search

click node_cli "https://github.com/forgeprint/evomem/blob/main/cmd/evomem/main.go"
click node_http "https://github.com/forgeprint/evomem/blob/main/core/api/server.go"
click node_mcp "https://github.com/forgeprint/evomem/blob/main/core/mcp/server.go"
click node_mcp_tools "https://github.com/forgeprint/evomem/blob/main/core/mcp/tools.go"
click node_note_model "https://github.com/forgeprint/evomem/blob/main/shared/models/note.go"
click node_note_store "https://github.com/forgeprint/evomem/blob/main/shared/database/notes.go"
click node_search "https://github.com/forgeprint/evomem/blob/main/shared/database/search.go"
click node_proposals "https://github.com/forgeprint/evomem/blob/main/shared/database/proposals.go"
click node_webhooks "https://github.com/forgeprint/evomem/blob/main/core/api/adapters/telegram/telegram.go"
click node_jira_adapter "https://github.com/forgeprint/evomem/blob/main/core/api/adapters/jira/jira.go"
click node_audio_api "https://github.com/forgeprint/evomem/blob/main/core/api/audio.go"
click node_audio_store "https://github.com/forgeprint/evomem/blob/main/shared/audio/audio.go"
click node_transcription "https://github.com/forgeprint/evomem/blob/main/core/transcribe/run.go"
click node_organization "https://github.com/forgeprint/evomem/blob/main/core/organize/run.go"
click node_clusters "https://github.com/forgeprint/evomem/blob/main/shared/database/clusters.go"
click node_connections "https://github.com/forgeprint/evomem/blob/main/core/connect/connect.go"
click node_jira_pull "https://github.com/forgeprint/evomem/blob/main/core/connect/jira.go"
click node_sync_worker "https://github.com/forgeprint/evomem/blob/main/core/sync/sync.go"
click node_postgres_transport "https://github.com/forgeprint/evomem/blob/main/core/sync/postgres.go"
click node_sync_state "https://github.com/forgeprint/evomem/blob/main/shared/database/sync.go"
click node_archive "https://github.com/forgeprint/evomem/blob/main/cmd/evomem/archive.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_http,node_mcp toneBlue
class node_webhooks,node_jira_adapter,node_audio_api,node_transcription,node_organization,node_connections,node_jira_pull,node_postgres toneAmber
class node_mcp_tools,node_search,node_proposals,node_clusters toneMint
class node_note_model,node_note_store,node_audio_store,node_sync_worker,node_postgres_transport,node_sync_state,node_archive toneRose
class node_person,node_agent,node_automation,node_jira,node_telegram toneIndigo
```

## Components

### User entrypoints

- [CLI](https://github.com/forgeprint/evomem/blob/main/cmd/evomem/main.go): `cmd/evomem/main.go`
- [HTTP API](https://github.com/forgeprint/evomem/blob/main/core/api/server.go): `core/api/server.go`
- [MCP server](https://github.com/forgeprint/evomem/blob/main/core/mcp/server.go): `core/mcp/server.go`

### Ingestion and enrichment

- [Webhook adapters](https://github.com/forgeprint/evomem/blob/main/core/api/adapters/telegram/telegram.go): `core/api/adapters/telegram/telegram.go`
- [Jira adapter](https://github.com/forgeprint/evomem/blob/main/core/api/adapters/jira/jira.go): `core/api/adapters/jira/jira.go`
- [Audio intake](https://github.com/forgeprint/evomem/blob/main/core/api/audio.go): `core/api/audio.go`
- [Transcription](https://github.com/forgeprint/evomem/blob/main/core/transcribe/run.go): `core/transcribe/run.go`
- [AI organization](https://github.com/forgeprint/evomem/blob/main/core/organize/run.go): `core/organize/run.go`
- [Source connections](https://github.com/forgeprint/evomem/blob/main/core/connect/connect.go): `core/connect/connect.go`
- [Jira source pull](https://github.com/forgeprint/evomem/blob/main/core/connect/jira.go): `core/connect/jira.go`

### Recall and review

- [Memory tools](https://github.com/forgeprint/evomem/blob/main/core/mcp/tools.go): `core/mcp/tools.go`
- [Full-text search](https://github.com/forgeprint/evomem/blob/main/shared/database/search.go): `shared/database/search.go`
- [Proposal review](https://github.com/forgeprint/evomem/blob/main/shared/database/proposals.go): `shared/database/proposals.go`
- [Note clusters](https://github.com/forgeprint/evomem/blob/main/shared/database/clusters.go): `shared/database/clusters.go`

### Memory and sync

- [Note model](https://github.com/forgeprint/evomem/blob/main/shared/models/note.go): `shared/models/note.go`
- [Note storage](https://github.com/forgeprint/evomem/blob/main/shared/database/notes.go): `shared/database/notes.go`
- [Audio files](https://github.com/forgeprint/evomem/blob/main/shared/audio/audio.go): `shared/audio/audio.go`
- [One-way sync](https://github.com/forgeprint/evomem/blob/main/core/sync/sync.go): `core/sync/sync.go`
- [PostgreSQL transport](https://github.com/forgeprint/evomem/blob/main/core/sync/postgres.go): `core/sync/postgres.go`
- [Sync state](https://github.com/forgeprint/evomem/blob/main/shared/database/sync.go): `shared/database/sync.go`
- [Archive thinning](https://github.com/forgeprint/evomem/blob/main/cmd/evomem/archive.go): `cmd/evomem/archive.go`

### Other components

- **Person**
- **Coding agent**
- **Automation sources**
- **Jira**
- **Telegram**
- **PostgreSQL mirror**

## Connections

- Person → CLI: runs commands (evidence: `cmd/evomem/main.go`)
- Coding agent → MCP server: uses tools (evidence: `README.md`)
- MCP server → Memory tools: dispatches tools
- Memory tools → Note storage: reads notes (evidence: `core/mcp/tools.go`)
- Memory tools → Full-text search: searches notes
- Memory tools → Proposal review: proposes notes
- Person → HTTP API: posts notes (evidence: `README.md`)
- Automation sources → HTTP API: sends content (evidence: `README.md`)
- HTTP API → Note storage: creates notes
- Jira → HTTP API: sends webhook (evidence: `README.md`)
- Telegram → HTTP API: sends webhook (evidence: `README.md`)
- HTTP API → Webhook adapters: routes webhooks (evidence: `core/api/server.go`)
- HTTP API → Jira adapter: routes webhooks (evidence: `core/api/server.go`)
- Webhook adapters → Note storage: stores notes
- Jira adapter → Note model: builds notes (evidence: `core/api/adapters/jira/jira.go`)
- Person → Audio intake: uploads recordings
- Audio intake → Audio files: stores recordings (evidence: `core/api/audio.go`)
- Audio files → Transcription: provides recordings
- Transcription → Note storage: creates notes
- CLI → AI organization: runs organization
- AI organization → Note storage: updates memory
- CLI → Note clusters: manages clusters
- CLI → Source connections: manages sources (evidence: `cmd/evomem/main.go`)
- Source connections → Jira source pull: pulls Jira issues
- Jira source pull → Note storage: returns notes
- Person → CLI: reviews proposals (evidence: `README.md`)
- CLI → Proposal review: accepts or rejects
- Proposal review → Note storage: acceptance creates note
- CLI → One-way sync: starts sync (evidence: `README.md`)
- One-way sync → Sync state: tracks cursors (evidence: `core/sync/sync.go`)
- One-way sync → PostgreSQL transport: pushes changes (evidence: `core/sync/sync.go`)
- PostgreSQL transport → PostgreSQL mirror: writes mirror (evidence: `README.md`)
- CLI → Archive thinning: archives notes (evidence: `README.md`)
- Archive thinning → Note storage: thins stored notes (evidence: `cmd/evomem/archive.go`)
- CLI → Note storage: adds and reads notes (evidence: `cmd/evomem/main.go`)
- Note storage → Note model: stores notes (evidence: `shared/database/notes.go`)
- Note storage → Full-text search: indexes notes
