Introduction¶
The MindFlight AI Server is the brain of the MindFlight framework. It manages all automation logic, orchestrates complex workflows, stores and retrieves data, schedules tasks, and ensures each action happens in the right order. Its mission is to coordinate multiple agents and services seamlessly.
This component is written in Go and is designed to be modular, scalable, and extensible, allowing developers to plug in new features easily. It connects upstream to Clients (which issue requests and interact with the system) and downstream to Providers (which handle concrete tasks like accessing APIs, databases, or external tools).
Why this server matters¶
In a typical AI automation flow, you need a robust system that:
- Receives and authenticates requests.
- Divides tasks into clear steps (workflows).
- Delegates specialized work to external systems (Providers).
- Tracks progress and sends notifications to users or other systems.
The MindFlight AI Server centralizes these roles, offering a reliable way to manage complex, distributed AI tasks.
Key concepts¶
Before diving into the architecture and usage, let's clarify some essential terms:
Concept | Definition |
---|---|
Workflow | A sequence of tasks that need to be executed in a specific order. |
Provider | A module that interfaces with external systems (e.g., email service, database, LLM API). |
Client | Any application or interface that sends requests to the server (e.g., a chatbot UI, API call). |
Job Manager | The part of the server that handles background tasks and asynchronous processing. |
Notification System | Handles events internally (Pub/Sub) and externally (Webhooks). |
Memory | A key-value store to persist temporary or session-based data. |
High-level architecture¶
Here's a simple Mermaid diagram to illustrate how the MindFlight AI Server interacts with Clients and Providers:
flowchart LR
Client1[Client 1] -->|API Request| Server
Client2[Client 2] -->|API Request| Server
subgraph MindFlight AI Server
Server(Server Core)
JobManager(Job Manager)
NotificationSystem(Notification System)
end
Server -->|Workflow Execution| JobManager
Server -->|Trigger| NotificationSystem
Server -->|Delegates Tasks| Provider1[Provider: Unipile]
Server -->|Delegates Tasks| Provider2[Provider: Notion]
NotificationSystem -->|Webhook Push| Client1
NotificationSystem -->|Webhook Push| Client2
In this diagram:
- Clients send API requests to the Server.
- The Server processes the request, possibly triggering workflows or delegating tasks to Providers.
- Providers execute specialized tasks (e.g., syncing emails, processing files).
- Events generated during workflows are handled by the Notification System, which can push updates to subscribed clients via webhooks.