> For the complete documentation index, see [llms.txt](https://docs.replicats.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.replicats.ai/old-technical-foundations/platform-architecture/agent-framework.md).

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