Save current conversation context as a memory
Saves key conversation context and insights to a knowledge base for future reference.
/plugin marketplace add geojaz/graphiti-context-hub/plugin install graphiti-context-hub@geojaz-graphiti-pluginsSave important context, decisions, or patterns to the Graphiti knowledge base.
Extract relevant context from the current conversation and save it using Graphiti.
Step 1: Load config and detect repo
[ -f "$HOME/.config/claude/graphiti-context-hub.conf" ] && source "$HOME/.config/claude/graphiti-context-hub.conf"
[ -f ".context-hub.conf" ] && source ".context-hub.conf"
GROUP_ID="${GRAPHITI_GROUP_ID:-main}"
REPO_NAME=$(git remote get-url origin 2>/dev/null | sed 's/.*\///' | sed 's/\.git$//' || basename "$PWD")
echo "group_id: $GROUP_ID"
echo "repo: $REPO_NAME"
Step 2: Save to Graphiti with repo context
Ask user what to save (title and content), then:
# Format episode body with repo prefix
episode_body = f"""Repo: {REPO_NAME}
{content_from_user}
"""
# Save episode using GROUP_ID from Bash
result = mcp__graphiti__add_memory({
"name": title_from_user,
"episode_body": episode_body,
"group_id": GROUP_ID,
"source": "context-hub",
"source_description": f"Manual save from {REPO_NAME}"
})
episode_id = result.get('episode_id', result.get('uuid', 'unknown'))
print(f"✓ Saved to group '{GROUP_ID}' with repo tag '{REPO_NAME}'")
print(f" Episode ID: {episode_id}")
What to save:
What NOT to save:
Clearly communicate what was saved:
✅ Saved: <title>
Content: <brief summary>
Group: <group-id>
Graphiti will automatically extract entities and relationships from this memory.