# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dctx.ai/guide/ecosystem-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
