# Agent Framework

The Agent Framework represents the intelligence layer of Replicats, orchestrating complex trading strategies through a sophisticated DAG-based workflow engine.

<figure><img src="/files/qQHjCOPMXQ4FRwe6vWCh" alt=""><figcaption><p>Replicats Inteligence Framework (RIF)</p></figcaption></figure>

### DAG-Based Orchestration

* **Directed Acyclic Graph (DAG) Foundation**\
  Our Agent framework uses a DAG to coordinate tasks such as data ingestion, model inference, risk checks, and trade execution.
  * Each **node** in the DAG represents a specialized step (e.g., reading time series data, querying the knowledge graph, or calling a predictive model).
  * The **edges** define how data flows from one step to another without circular dependencies.
* **Conditional & Event-Driven Logic**
  * Agents can branch into different paths based on **probabilistic triggers** (e.g., a predicted 80% chance of price rally) or deterministic thresholds (e.g., price surpasses $30,000).
  * This flexibility allows for **complex strategies**, from simple rebalancing rules to multi-step yield farming sequences.

### Multi-Model Integration

* **Specialized AI Models for Triggers**
* **Targeted LLM Usage**
  * While specialized models handle the bulk of predictions, we still leverage LLMs (via DSPy) for **natural language queries**, high-level summaries, or user interactions.
  * The DAG calls the LLM steps only where **human-like reasoning** adds value, keeping **cost and latency** under control.


---

# 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.replicats.ai/old-technical-foundations/platform-architecture/agent-framework.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.
