Penfield

Stores conversations, connects ideas, remembers context: a knowledge graph for your AI assistants

Documentation

Everything you need to get started with Penfield™.

Quick Start

Get up and running with Penfield™ in under 5 minutes.

  1. Create an account at portal.penfield.app
  2. Generate an API key from the API Keys page
  3. Exchange your API key for a JWT token (see below)
  4. Start making API calls or set up MCP

MCP Setup

Penfield™ works with any AI that supports MCP.

Claude (Desktop, Mobile, Web) Claude Code

  1. Open Settings → Connectors
  2. Click Add custom connector
  3. Connector name: Penfield
  4. Remote MCP server URL: https://mcp.penfield.app
  5. Sign in with your Penfield™ account when prompted

Recommended: Native connectors work on Desktop, Mobile, and Web — no extra tooling required.

Run this command in your terminal:

claude mcp add --transport streamable-http --scope user penfield https://mcp.penfield.app

Note: Claude Code connects directly over HTTP — no proxy or mcp-remote needed.

Available Tools

ToolDescription
storeSave a memory with type, tags, and importance
recallHybrid search for relevant memories and documents
searchSearch with filters (tags, dates, source type)
connectLink memories with typed relationships
exploreTraverse the knowledge graph from a memory
reflectAnalyze recent memory patterns and topics
save_contextSave cognitive state for agent handoffs
restore_contextResume from a saved context checkpoint

API Reference

Base URL: https://api.penfield.app/api/v2

All endpoints require a valid JWT token in the Authorization header.

Authentication

The API uses a two-step authentication flow. First, exchange your API key for a JWT token (valid 24 hours), then use the token for all subsequent requests.

EndpointDescription
POST/auth/tokenExchange API key for JWT token (24h validity)

Step 1 — Exchange API Key for JWT

curl -X POST https://api.penfield.app/api/v2/auth/token \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"

// Response{"status": "success","data": {"access_token": "eyJhbGc...","token_type": "bearer","expires_in": 86400 } }

Step 2 — Use JWT for API Calls

curl -X GET https://api.penfield.app/api/v2/memories \ -H "Authorization: Bearer $JWT"

Important: Do not include trailing slashes on endpoints. Use /memories not /memories/.

Memories

Create, retrieve, update, and delete memories. Memories are automatically embedded for semantic search.

EndpointDescription
POST/memoriesCreate a new memory
GET/memoriesList memories (paginated)
GET/memories/{id}Get a specific memory
PUT/memories/{id}Update a memory
DELETE/memories/{id}Delete a memory
POST/memories/{id}/connectConnect two memories with a typed relationship

Create a Memory

curl -X POST https://api.penfield.app/api/v2/memories \ -H "Authorization: Bearer $JWT" \ -H "Content-Type: application/json" \ -d '{ "content": "The project uses PostgreSQL with pgvector", "memory_type": "fact", "tags": ["technical", "database"], "importance": 0.8 }'

Memory types: fact, insight,hypothesis, question,answer, correction,strategy

Search

Search across memories and documents using vector similarity, BM25, or hybrid search.

EndpointDescription
POST/searchHybrid search (vector + BM25)
POST/search/vectorVector similarity search only
POST/search/bm25BM25 keyword search only

Hybrid Search

curl -X POST https://api.penfield.app/api/v2/search \ -H "Authorization: Bearer $JWT" \ -H "Content-Type: application/json" \ -d '{ "query": "database architecture decisions", "limit": 10, "source_type": "memory" }'

Documents

Upload documents to make them searchable. Documents are automatically chunked, embedded, and indexed.

EndpointDescription
POST/documents/uploadUpload a document (multipart form)
GET/documentsList documents
GET/documents/{id}Get document metadata
GET/documents/{id}/downloadDownload original document
DELETE/documents/{id}Delete document and chunks

Upload a Document

curl -X POST https://api.penfield.app/api/v2/documents/upload \ -H "Authorization: Bearer $JWT" \ -F "[email protected]"

Supported formats: PDF, TXT, Markdown, and other text-based files.

Need Help?

Have questions or need support? Reach out through our contact form or email us directly. Paid plans include priority support with faster response times.

Related Servers