MATIH Platform is in active MVP development. Documentation reflects current implementation status.
12. AI Service
Context Graph
Action Graph

Action Graph

Production - Action tracking and graph construction

The Action Graph tracks user and agent actions to build a graph of action patterns, frequencies, and sequences. This enables action recommendation and workflow optimization.


12.5.7.1Action Tracking

# Record an action
curl -X POST http://localhost:8000/api/v1/context-graph/actions \
  -H "Content-Type: application/json" \
  -H "X-Tenant-ID: acme-corp" \
  -d '{
    "action_type": "query_executed",
    "entity_id": "orders_table",
    "user_id": "user-123",
    "metadata": {"sql": "SELECT...", "execution_time_ms": 340}
  }'
 
# Get action patterns
curl "http://localhost:8000/api/v1/context-graph/actions/patterns?tenant_id=acme-corp&entity_id=orders_table"