SDK v1.8.1
Highlights
InteractionDirection, InteractionLoggingType, and ListRole are now available from affinity.types — previously they could only be imported from the internal affinity.models.types path. The Interaction model now also captures the logging_type field from the API instead of silently dropping it.
Bug Fixes
- Re-export
InteractionDirection,InteractionLoggingType, andListRolefromaffinity.types— these were the only public enums missing from the stable import path - Add
logging_typefield toInteractionmodel — the API returns this field but it was silently discarded
Quick Install
SDK only:
pip install affinity-sdkSDK + CLI:
pipx install "affinity-sdk[cli]"MCP Server for Claude Desktop (easiest - MCPB bundle):
- Install CLI:
pipx install "affinity-sdk[cli]" - (Optional) Pre-configure API key:
xaffinity config setup-key- If skipped, Claude Desktop will prompt for your API key during install
- Install xaffinity MCP in Claude Desktop (download and double-click)
Other MCP clients (Cursor, Windsurf, VS Code, etc.) require manual configuration - see MCP docs.