# Ecosystem Flow

### Flow Diagram (Conceptual)

```
[ Off-chain Events / Data ] ←────┐
                                 │
                             [Context Oracles]
                                 │
                                 ▼
                          [DMCP Smart Contracts]
                                 │
      ┌──────────────────────────┼───────────────────────────┐
      ▼                          ▼                           ▼
[Context Graph]         [Context Registry]           [Context Modules]
      │                          │                           │
      ▼                          ▼                           ▼
[AI Agents]               [Smart Contracts]              [dApps / UI]
      ▲                          │
      └────────── [Agent Context Interface] ─────────────────┘
```

### Step-by-Step Flow

#### 1. **Context Creation**

* Developers define a **context schema** (e.g., user.reputation, dao.activity).
* This schema is registered on-chain through the **DMCP**.

#### 2. **Data Injection**

* **Context Oracles** push off-chain or on-chain event data into the Decontext system.
* This data is written into the **Context Graph** using the defined schema.

#### 3. **Context Management**

* The **DMCP** validates and stores all context entries with versioning and signatures.
* The **Context Registry** maintains all schemas and active modules.

#### 4. **Agent Consumption**

* **AI agents** use the **Agent Context Interface (ACI)** to query, subscribe, and reason with context.
* Context is injected into LLM prompts or agent memory to guide intelligent behavior.

#### 5. **Smart Contract Execution**

* **Smart contracts** import context modules and use real-time context in logic execution (e.g., access control, dynamic pricing, gamified features).

#### 6. **dApp Interaction**

* **Frontends and users** interact with context-aware features in real-time.
* Users may view, approve, or even generate **ZK proofs** tied to private context.
