> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

The Archetype platform is built around the concept of [Lenses](/core-concepts/lenses/overview). Developers can stream data in and out of a lens by attaching one or more [data streams](/core-concepts/streams/data-streams) to each lens.

```mermaid theme={"system"}
graph LR
    subgraph inputs [Developer Sensors]
      A(Sensor A) --> InputConnector1(Connector #1)
      B(Sensor B) --> InputConnector2(Connector #2)
    end

    subgraph core [Archetype Platform]
      InputConnector1 --> InputStreams
      InputConnector2 --> InputStreams
      InputStreams(Input Streams) --> Lens((Lens))
      Lens --> OutputStreams(Output Streams)
    end
    
    subgraph outputs [Developer Applications]
      OutputStreams --> OutputConnector1(Output Connector #1) --> F(Alert System)
      OutputStreams --> OutputConnector2(Output Connector #2) --> G(Robotic Controller)
      OutputStreams --> OutputConnector3(Output Connector #3) --> H(Human Operator)
    end
    
    style InputConnector1 fill:#9EBBFF,stroke:none
    style InputConnector2 fill:#9EBBFF,stroke:none
    style InputStreams fill:#9EBBFF,stroke:none
    style Lens fill:#9EBBFF,stroke:none
    style OutputStreams fill:#9EBBFF,stroke:none
    style OutputConnector1 fill:#9EBBFF,stroke:none
    style OutputConnector2 fill:#9EBBFF,stroke:none
    style OutputConnector3 fill:#9EBBFF,stroke:none
```

The Archetype platform uses a unified **events protocol** to send data in and out of a Lens and to control and query various aspects of the platform.

The events protocol is built on a JSON structure, with every event being identified by a **type** key, paired with a corresponding **event\_data** key.

# Event Types and Event Data

Every event consists of two fields:

1. **type**: a string to identify the event type
2. **event\_data**: a dictonary containing dedicated data for the corresponding type

For example, a developer can query the status of an active lens session using the following event:

```yaml theme={"system"}
type: session.status
event_data: {}
```

# Event Types

Common event types are as follows.

<CardGroup cols={2}>
  <Card title="Session Events" icon="eye" href="/core-concepts/streams/events/session-events">
    Session Events allow a developer to query and control the state of an active lens session.
  </Card>

  <Card title="Data Events" icon="eye" href="/core-concepts/streams/events/data-events">
    Data Events allow a developer to specify and package multimodal sensor data sent in/out of a lens.
  </Card>

  <Card title="Input Stream Events" icon="eye" href="/core-concepts/streams/events/input_stream_events">
    Input Stream Events allow a developer to connect or disconnect specific input streams to/from a lens.
  </Card>

  <Card title="Output Stream Events" icon="eye" href="/core-concepts/streams/events/stream-events#output-streams">
    Output Stream Events allow a developer to connect or disconnect specific output streams to/from a lens.
  </Card>
</CardGroup>
