Skip to main content
Engram provides a simple JSON REST API for storing and retrieving observations from AI coding sessions. All endpoints return JSON responses.

Base URL

The API runs locally on your machine:
http://127.0.0.1:7437
The default port is 7437. You can configure this via:
  • ENGRAM_PORT environment variable
  • Command line argument: engram serve 8080

Authentication

Engram runs locally and does not require authentication. All API endpoints are accessible without credentials.

Request Format

All POST/PATCH requests expect JSON bodies with Content-Type: application/json.
curl -X POST http://127.0.0.1:7437/sessions \
  -H "Content-Type: application/json" \
  -d '{"id": "session-123", "project": "my-app"}'

Response Format

All responses are JSON. Successful responses return appropriate HTTP status codes (200, 201, etc.) with data. Errors return 4xx/5xx codes with an error message:
{
  "error": "session_id and content are required"
}

Common Status Codes

  • 200 OK - Request succeeded
  • 201 Created - Resource created successfully
  • 400 Bad Request - Invalid request parameters
  • 404 Not Found - Resource not found
  • 500 Internal Server Error - Server error

Health Check

Check if the server is running:
curl http://127.0.0.1:7437/health

Response

{
  "status": "ok",
  "service": "engram",
  "version": "0.1.0"
}

API Endpoints

The API is organized into the following sections:

Data Types

Timestamps

All timestamps are in ISO 8601 format (UTC):
2024-03-15 14:30:00

Nullable Fields

Optional fields are omitted or set to null in responses.

Rate Limits

There are no rate limits for the local API.

Privacy

Engram supports <private>...</private> tags to prevent sensitive data from being stored. Content within these tags is automatically stripped and replaced with [REDACTED] before persistence.
{
  "content": "API key: <private>sk-1234567890</private>"
}
Stored as:
{
  "content": "API key: [REDACTED]"
}

Build docs developers (and LLMs) love