Skip to Content
ArchitectureData Flow

Data Flow

How data moves through the Intentra system.

Event Lifecycle

1. Hook Trigger

IDE detects AI action completion and fires hook:

{ "event": "ai_action_complete", "tool": "cursor", "action": "chat", "tokens": 1250 }

2. CLI Processing

CLI receives hook event:

  • Validates event format
  • Adds user context
  • Queues for submission

3. API Submission

CLI submits to backend (batched every 5 seconds):

POST /v1/events

4. Scan Aggregation

Backend aggregates events into scans:

  • Events within 30 seconds = one scan
  • Detects violations (retry loops, etc.)
  • Updates usage counters

5. Storage

Scan stored in DynamoDB with indexes for:

  • User queries
  • Organization rollups
  • Billing calculations

Latency Budget

StageTarget
Hook to CLI10ms
CLI processing5ms
API submission100ms
Total<150ms

The hook never blocks the IDE.