# Architecture Overview

<figure><img src="/files/cTOEXtMhoImQAeeiUqaZ" alt=""><figcaption></figcaption></figure>

OmniFlux follows a modular client-server architecture:Directory Structure

```
├── src/                   # Core source code
│   ├── agents/            # Agent management and specialization
│   ├── swarms/            # Swarm intelligence and optimization
│   ├── blockchain/        # Solana blockchain interactions
│   ├── dex/               # DEX operations (Raydium, Orca)
│   ├── storage/           # Decentralized storage (Arweave, IPFS)
│   └── api/               # HTTP API server and endpoints
├── packages/              # TypeScript/JavaScript packages
│   ├── cli/               # Interactive CLI implementation
│   ├── python-wrapper/    # Python interface for OmniFlux
│   └── wallets/           # Wallet integrations (Phantom, Solflare)
├── server.js              # Main HTTP server (port 8052)
├── .env                   # Environment variables (not committed)
├── README.md              # This file
└── ...                    # Config, Docker files, etc.
```

Key Architecture Points

* Modular Design: Separate modules for agents, swarms, blockchain, and DEX operations.
* Client-Server Model: Node.js server (port 8052) with a TypeScript CLI and Python wrapper.
* Solana Backend: Handles trading, blockchain interactions, and swarm optimization.
* TypeScript CLI: User-friendly interface for managing trades and agents.
* Python Wrapper: Provides programmatic access with AI integrations.


---

# 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://omniflux-ai.gitbook.io/omniflux-ai/architecture-overview.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.
