# Seekr Documentation > This file is very large and may be truncated. For an index of this content, please refer to https://docs.seekr.com/llms.txt instead. # Access SeekrFlow Source: https://docs.seekr.com/flow/app/access-seekrflow System requirements, account setup, and sign-in instructions for SeekrFlow. > [!NOTE] > > **Self-managed deployments** > > Your administrator provides your SeekrFlow URL and may create accounts on your behalf or use a different authentication method. Contact your administrator for access instructions. ## System requirements SeekrFlow runs entirely in your web browser. No software installation is required. | Requirement | Details | | - | - | | Device | Desktop only | | Screen width | 1024px minimum | | Browser | Chrome, Firefox, Safari, or Edge (current version and two prior versions) | | Internet | Stable internet connection | ## Create your account **Step 1** Go to [apps.seekr.com/flow](https://apps.seekr.com/flow). **Step 2** Click **Create Account**. **Step 3** Fill in your name, role, industry, email, and password. **Step 4** Review and agree to the Privacy Policy and Terms and Conditions. **Step 5** Click **Sign Up**. **Step 6** Check your email for a confirmation message and confirm within one hour. After confirming your email, sign in to request access or contact sales to get started with SeekrFlow. ## Sign in **Step 1** Go to [apps.seekr.com/flow](https://apps.seekr.com/flow). **Step 2** Enter your **Email** and **Password**. **Step 3** Click **Sign In**. The Dashboard appears after a successful sign-in. ## Sign out **Step 1** Click your profile icon in the top-right corner. **Step 2** Select **Sign Out**. Sign out when you finish working, especially on shared devices. # Agent Builder Source: https://docs.seekr.com/flow/app/agent-builder Create and manage agents in the SeekrFlow user interface. Agent Builder provides a no-code interface for building and managing agents and tools. ## In this section * [Agents](/flow/app/agents) – Create and manage agents * [Tool Library](/flow/app/tool-library) – Create and manage custom tools for your agents # Agents Source: https://docs.seekr.com/flow/app/agents Create and manage agents in the SeekrFlow user interface. An agent is an AI system that reasons through problems and executes tasks autonomously. Agents are configured by specifying models, tools, instructions, and reasoning approach—providing everything needed to accomplish tasks from simple workflows to complex, open-ended objectives. For more information, see [Agents](/flow/components/agents). To build agents using the SDK, see [Agents SDK reference](/flow/sdk/agents). ## In this section * [Create an agent](/flow/app/create-an-agent) – Build a new agent with models and tools * [Manage agents](/flow/app/manage-agents) – View, activate, and deactivate agents # AI-Ready Data Source: https://docs.seekr.com/flow/app/ai-ready-data Generate training data from your unstructured documents to fine-tune a model. The AI-Ready Data page lists your data generation jobs and their current status. Each job processes your uploaded documents and generates a training dataset you can use to fine-tune a model. ![AI-Ready Data Jobs list view showing job IDs, statuses, and creation dates.](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/docs/912cdd7b59037d71d8c7ffd52b28bb586875e0a367602043e3cb13f0ad5bd9b3-ai-ready-data-jobs.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=55d1a09059c90c541cf6fdc171c5b843) ## Create an AI-Ready Data job **Step 1** Navigate to **Data Engine > AI-Ready Data**. **Step 2** Click **+ Create Job**. **Step 3** In the **Define Goal and Upload Data Sources** step: * Enter your fine-tuning goal. Describe the outcome you want to achieve with your fine-tuned model. For example: "I'm developing a chat assistant that must align with the ethical standards and organizational values of my company brand." * Upload your data source files. Drag and drop or click **Browse**. You can upload up to 10 files at a time. Accepted file formats: PDF, Word, Markdown, JSON. Maximum size 100 MB per file. **Step 4** Click **Next** to review your setup. **Step 5** On the **Confirm and Start Job** page, review your fine-tuning goal and data sources, then click **Start Job**. > [!NOTE] > > **Ingestion mode** > > AI-Ready Data jobs always use speed-optimized ingestion. To use accuracy-optimized ingestion, use the SDK instead. ## Job status Each job moves through the following states: | Status | Description | | - | - | | Queued | Job is in line to start | | Running | Documents are being processed and training data is being generated | | Completed | Training data has been generated and is ready to use | | Failed | Something went wrong — review your files and try again | ## Output Once a job completes, the generated training dataset is automatically saved to: * The **AI-Ready Data** page * **Data Engine > Storage** No download is required. When creating a fine-tuning job, you can select the dataset directly from your saved files in SeekrFlow. ## Next steps * [Create a fine-tuning job](/flow/app/fine-tuning) – Use your generated dataset to train a model * [Storage](/flow/app/storage) – View and manage your files and generated outputs # Chat with an agent Source: https://docs.seekr.com/flow/app/chat-with-an-agent Test agents in Agent Chat. Use Agent Chat to interact with agents and test their behavior before integrating them into your applications. ## Start a conversation **Step 1** Navigate to **Playground > Agent Chat** in the sidebar. **Step 2** Select an agent from the dropdown. Only active agents appear in the list. **Step 3** Type a message and press **Send**. The agent processes your message and returns a response. If the agent has tools configured, each tool call is surfaced as it begins running, and tools that run in parallel are surfaced as running in parallel. When an agent delegates to a sub-agent, the sub-agent's execution is surfaced while it runs. ## Manage threads Each conversation with an agent creates a thread. Previous threads are saved and accessible from the thread list on the left. To start a new conversation, click the **+** button. ## Model parameters Use the model parameters panel to adjust how the agent generates responses: | Parameter | Description | | - | - | | Temperature | Controls response randomness. Lower values produce more predictable responses; higher values produce more varied responses. | | Top P | Controls the range of tokens the model considers. Lower values narrow the selection to more likely tokens. | | Frequency Penalty | Reduces repetition of tokens based on how often they have appeared in the response so far. | | Presence Penalty | Reduces repetition of tokens that have already appeared in the response, regardless of frequency. | Click **Reset All to Default** to restore all parameters to their default values. # Create a tool Source: https://docs.seekr.com/flow/app/create-a-tool Build a new custom tool in the SeekrFlow Tool Library. This guide walks through creating a tool in the SeekrFlow UI. ## Create the tool **Step 1** Navigate to **Agent Builder > Tool Library** in the sidebar. **Step 2** Click **Create Tool**. **Step 3** Enter the tool details: * **Tool Name** – A unique name for the tool. * **Configure Tools** – Select the tool type: * **File Search Tool** – Retrieves results from files you have indexed in a vector store. * **Web Search Tool** – Retrieves results from live web sources. **Step 4** If using **File Search Tool**, configure the additional settings: * **Select Vector Store** – Choose the vector store the tool will search. You can select one vector store per File Search tool. * **Tool Instructions** – Describe what the tool does and when the agent should use it. * **Search Parameters**: * **Top K** – Number of results to retrieve (5–10 for precision, 20–50 for broader coverage). * **Score Threshold** – Minimum similarity score for returned results (0.7–0.9 for strict relevance, 0.2–0.5 for exploratory searches). **Step 5** If using **Web Search Tool**, enter: * **Tool Instructions** – Describe what the tool does and when the agent should use it. **Step 6** Click **Create Tool**. ## Next steps * [Manage tools](/flow/app/manage-tools) – View, edit, clone, and delete tools * [Create an agent](/flow/app/create-an-agent) – Add your tool to an agent # Create an agent Source: https://docs.seekr.com/flow/app/create-an-agent Build a new agent with models and tools in the SeekrFlow UI. This guide walks through creating an agent in the SeekrFlow UI. ## Before you begin * Decide which model to use – see [Generative models](/flow/components/models/generative-models) for guidance on base models and fine-tuned deployments. * If using file search, create a vector store first – see [Create a vector store](/flow/app/vector-stores). ## Create the agent **Step 1** Navigate to **Agent Builder > Agents** in the sidebar. **Step 2** Click **Create Agent**. **Step 3** Enter the agent details: * **Name** – A unique identifier for the agent * **Instructions** – The system prompt that defines how the agent responds. Be specific about the task, expected behavior, and any constraints. * **Reasoning mode** – Choose based on your use case: * **Speed-optimized** – For straightforward tasks requiring quick responses * **Performance-optimized** – For complex tasks requiring deeper analysis For more on reasoning modes, see [Agents](/flow/components/agents). **Step 4** Select a model: * **Base models** – Pre-trained models hosted on the SeekrFlow platform * **Deployments** – Your fine-tuned models (must have an active deployment) **Step 5** Configure tools (optional). For available tools, see [Tools](/flow/components/agents/tools). For each tool, provide **tool instructions** that tell the agent when to use it. If adding file search: a. Select a **vector store** containing your documents.\ \ b. Set **Top K** – Number of results to retrieve (5–10 for precision, 20–50 for broader coverage).\ \ c. Set **Score threshold** – Minimum similarity score (0.7–0.9 for strict relevance, 0.2–0.5 for exploratory searches). **Step 6** Review your configuration and click **Create Agent**. The agent appears in your agents list with a **Pending** status while SeekrFlow provisions it. After a few minutes, the status changes to **Active** and the agent is ready to use. ## Next steps * [Manage agents](/flow/app/manage-agents) – Activate, deactivate, or modify agents * [Chat with an agent](/flow/app/chat-with-an-agent) – Test your agent in Agent Chat # Dashboard Source: https://docs.seekr.com/flow/app/dashboard Your home screen for quick actions, recent work, and deployment stats. ![SeekrFlow dashboard with numbered callouts](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/docs/aa568e89552704e2f380f39cef1d75db437298e12210d47ae8c19c42f590659d-seekrflowdashboard012026.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=cc2f915ad78d14e1580e2bf492d6b0ae) | # | Region | Purpose | | - | - | - | | 1 | Agent Builder | Build and manage AI agents and tools. Includes Agents and Tool Library. | | 2 | Data Engine | Create AI-ready training data. Includes AI-Ready Data and Storage. | | 3 | Model Development | Fine-tune and deploy models. Includes Fine-Tuning, Deployments, and Model Library. | | 4 | Playground | Test models and agents. Includes Model Chat and Agent Chat. | | 5 | Welcome cards | Quick actions to start core workflows: Create an Agent, Generate AI-Ready Data, Fine-Tune a Model, Go to Playground. | | 6 | Getting Started | Onboarding content: Quickstart Guide, Intro to the Data Engine, Explore Use Cases. Click **X** to dismiss. | | 7 | Recent Work | Tabs showing your most recent Agents, AI-Ready Data, and Fine-tuning jobs. | | 8 | Deployments | Deployment counts by status, active deployments, and inference token metrics. | | 9 | User menu | Access account settings and generate API keys. | # Data Engine Source: https://docs.seekr.com/flow/app/data-engine Manage files, generate training datasets, and build vector stores for fine-tuning and retrieval. The data engine transforms raw content into structured, AI-ready data. It manages the complete data lifecycle from file ingestion through preparation for training and retrieval workflows. ## In this section * [AI-Ready Data](/flow/app/ai-ready-data) – Generate structured datasets for fine-tuning and retrieval * [Storage](/flow/app/storage) – Upload and manage files, and create vector stores # Deployments Source: https://docs.seekr.com/flow/app/deployments Deploy and manage model endpoints for real-time inference from the SeekrFlow Deployment Dashboard. ## Deployment Dashboard The Deployment Dashboard provides a real-time view of all your deployments and their performance. At the top of the page: * **Status** — A donut chart showing total deployment count broken down by status: Active, Pending, Failed, and Inactive. * **Active Deployments** — Count of currently active deployments and total active hours to date. * **Inference Tokens** — Total input and output tokens consumed across all deployments to date. The deployments table lists all deployments with the following columns: **Deployment Name**, **Status**, **Model Type**, **Total Input Tokens**, **Total Output Tokens**, and **Last Modified**. Hover a row to reveal inline actions. Available actions depend on status: | Status | Meaning | Available actions | | - | - | - | | Pending | Deployment requested, provisioning underway. | Pause · Delete | | Active | Serving traffic. | Pause · Delete | | Inactive | Paused; no inference traffic. | Resume · Delete | | Failed | Error during start-up or runtime. | Delete | ## Create a deployment Click **+ Create Deployment** to open a four-step wizard. **Step 1** **Deployment Details** — Name (up to 100 characters) and describe (up to 1000 characters) the deployment. **Step 2** **Select Model** — Choose a model to make available for inference. Use the **Fine-Tuned Models** tab to select from your completed fine-tuning jobs, or the **Base Models** tab for open-source and partner models. Each card shows the provider, model name, and license tags (Open Source, Warning). **Step 3** **Select Hardware Configuration** — Set the number of AMD Instinct MI300X instances for your deployment. You can choose up to 50 instances. **Step 4** **Confirm and Start Deployment** — Review your deployment details and model and hardware configuration. Accept the selected model's license terms, then click **Start Deployment**. After submitting, a success screen confirms "Your model is deploying." The process may take a few minutes; track status in the Deployment Summary. Click **Go to Deployment** to navigate there directly, or navigate away — the deployment continues in the background. ## Deployment Summary Click any deployment name to open its summary page. The summary includes: * **Deployment Details** — Name (editable), ID, Model Type, Status, Date Created, Date Deployed, and description (editable). * **Integrating Deployment for Inference** — Quickstart Guide with instructions for setting up the SDK, sending API requests, and integrating your deployment. * **Data Sources & Training Prompt** — Training file and prompt from the originating fine-tuning job. * **Model, Hardware, and Hyperparameters** — The exact configuration running for this deployment. * **Fine-Tuning Job Details** — Link back to the source fine-tuning job. * **Agent Details** — Agents linked to this deployment and their statuses, if applicable. * **Event Timeline** — Right-hand feed of deployment lifecycle events (e.g., Deployment Pending, Deployment Complete). ## Pause and resume a deployment Click **Pause** on the summary page or from the inline row action in the dashboard to stop traffic without deleting the endpoint. Resume from the deployments table when ready to serve traffic again. ## Delete a deployment Deployments can be deleted from the inline row actions in the deployments table. # File Storage Source: https://docs.seekr.com/flow/app/file-storage Upload, organize, and manage the source documents and system-generated files used across SeekrFlow. File Storage is where you upload and manage all source documents used throughout the platform, including files for training data, vector stores, and agents. ## Supported file types Accepted formats depend on the file purpose selected at upload. **Raw Data** | File type | Notes | | - | - | | `.pdf` | Converted to Markdown when used in AI-Ready Data or vector store workflows | | `.docx` | Converted to Markdown when used in AI-Ready Data or vector store workflows | | `.ppt` | Converted to Markdown when used in AI-Ready Data or vector store workflows | | `.md` | Used as-is | | `.json` | Must follow SeekrFlow's tree-like JSON structure – see [JSON formatting requirements](#json-formatting-requirements) below | **Fine-tuning Data (Instruction Tuning Data and Reinforcement Tuning Data)** | File type | Notes | | - | - | | `.jsonl` | Used as-is | | `.parquet` | Used as-is | Upload limits: 20 files at a time, maximum 150 MB per file. Files in unsupported formats or exceeding size limits are rejected with an error. ## Upload files **Step 1** Navigate to **Data Engine > Storage**, then select the **Files** tab. **Step 2** Click **Upload Files**. **Step 3** Select a file purpose: * **Raw Data** – unstructured data used to power vector stores or generate AI-ready fine-tuning data * **Instruction Tuning Data** – data with instructions and responses for domain-specific fine-tuning * **Reinforcement Tuning Data** – data for reinforcement-based fine-tuning to optimize outputs against reference answers **Step 4** Click **Next**, then drag and drop your files or browse your device to select them. **Step 5** SeekrFlow validates the files and shows any issues. **Step 6** Click **Upload Files** to confirm. Your uploads begin immediately and appear in the file list. ## File list Each file in storage displays: * **File name** * **Source type** – how the file entered the system: * `Uploaded` – manually uploaded by the user * `Converted` – created via ingestion from a PDF, DOCX, or PPT * `Generated` – created by a SeekrFlow process, such as an alignment parquet file * **File type** * **Date added** ## File details Click any file to open its details panel, which shows: * **ID** * **File size** * **File purpose** – the purpose selected at upload (Raw Data, Instruction Tuning Data, or Reinforcement Tuning Data) * **Source type** * **Date added** * **Used by** – any deployments, fine-tuning jobs, AI-Ready Data jobs, or vector stores that reference this file * **Delete** – remove the file if it is not actively used elsewhere ## System-generated files SeekrFlow automatically adds files to your storage as part of platform workflows: * **Converted markdown files** – When a PDF, DOCX, or PPT is used in a workflow requiring ingestion (AI-Ready Data or vector stores), SeekrFlow saves the converted `.md` output with source type `Converted`. * **Parquet datasets** – When an AI-Ready Data job completes, the generated parquet file is saved with source type `Generated`. Generated and converted files behave like any other file and can be reused in future jobs, vector stores, or fine-tuning workflows. ## File formatting requirements Before uploading, ensure your files are properly formatted. **PDF and DOCX** – Use clear headings and ensure text content is structured logically for conversion. Avoid images without surrounding context. **Markdown** – Use correct header hierarchy (`# H1`, `## H2`, `### H3`, etc.), limit headers to six levels, and ensure all sections have meaningful content. Avoid empty or skipped header levels. > [!NOTE] > > Google Docs users can export files as Markdown, PDF, or DOCX. ### JSON formatting requirements JSON files must follow a tree-like structure where each node represents a section of content and may contain nested child sections. Required fields for each node: * **`label`** – A short title or question for the section. * **`content`** – The main body text for the section. * **`children`** – An array of child objects with the same structure. Use an empty array (`[]`) if there are no children. * **`level`** – The depth of the section in the hierarchy: `"0"` for root, `"1"` for first-level child, and so on. ```json JSON theme={null} { "label": "Seekr Ingestion Rules", "content": "This document explains seekr ingestion...", "children": [ { "label": "JSON Example", "content": "You can upload json files...", "children": [], "level": "1" } ], "level": "0" } ``` ## Next steps * [Vector Stores](/flow/app/vector-stores) – Create semantic indexes from your uploaded files * [AI-Ready Data](/flow/app/ai-ready-data) – Generate training datasets from your files # Fine-Tuning Source: https://docs.seekr.com/flow/app/fine-tuning Create and manage fine-tuning projects and jobs through the SeekrFlow web interface. For conceptual background on fine-tuning methods, training requirements, and when to use each approach, see [Fine-tuning](/flow/components/fine-tuning). ## Fine-Tuning Projects The Fine-Tuning page lists all your projects with the following columns: **Project Name**, **Jobs**, **Date Created**, and **Last Modified**. From here you can create new projects and open existing ones. ## Create a project Click **+ Create Project** to open the Create Fine-Tuning Project modal. Enter a name (up to 100 characters) and description (up to 1000 characters), then click **Create Project**. Once created, click **Go to Project** to open the project and start adding jobs. ## Create a fine-tuning job From inside a project, click **+ Create Job**. The wizard walks through the following steps: **Step 1** **Job Details** — Name and describe the job, then select a fine-tuning method: * **Instruction Tuning** (Standard) — Fine-tune with domain-specific instructions and responses. Best for reliable outputs that reflect expert knowledge. * **Reinforcement Tuning** (Advanced) — Optimize outputs through reinforcement learning. Best for tasks with clear, verifiable answers. **Step 2** **Select Data for Fine-Tuning** — Choose an existing file from your storage or upload a new one. Accepted formats: JSONL or Parquet. Maximum file size: 150 MB. For reinforcement tuning, download a sample dataset to see the expected format: [Download sample dataset](/samples/numina-math-dataset-small.json) **Step 3** **Select Model** — Choose a base model to build upon. **Step 4** **Select Hardware Configuration** — Choose compute resources on AMD Instinct MI300X hardware: * **1 Instance** — Ideal for fine-tuning a smaller model with a lighter dataset. * **8 Instances** — Recommended for fine-tuning a larger model with an extensive dataset. > [!NOTE] > > SeekrFlow checks the configuration against the selected hardware when you start the job, and refuses jobs that cannot fit. If job creation fails, select 8 instances and try again. Larger models require 8 instances. **Step 5** **Tune Hyperparameters** — Adjust training parameters: * **Number of Epochs** — Default 1, integer from 1 to 2000. * **Batch Size** — Default 1, integer from 1 to 1024. * **Learning Rate** — Default 1e-05, number between 0 and 1. **Step 6** **Confirm and Start Job** — Review your configuration (job details, data sources, model, hardware, and hyperparameters). Accept the selected model's license terms, then click **Start Job**. ## Monitor training progress Each job has a summary page with the following sections: **Job Details** — Job name, ID, status, method, creation and completion timestamps, and description. **Loss Metrics** — Training loss and validation loss values with a chart tracking both over steps and epochs. Select **How to Read This Chart** for an explanation of the values. **Accuracy Metrics** — Training accuracy and validation accuracy values with a chart tracking both over steps and epochs. Select **How to Read This Chart** for an explanation of the values. **Data Sources** — Training file, training data type, and training prompt used for the job. **Model, Hardware, and Hyperparameters** — Base model, hardware configuration, and the full set of parameters used for the run. **Reward Function** — Shown for Reinforcement Tuning jobs. Displays the reward criteria (e.g., Math Accuracy, String Check, Text Similarity) with their weights and operations. **Deployment Details** — Table of all deployments created from this job, showing Deployment Name, Status, Date Created, and Last Modified. ## Deploy a fine-tuned model After a job completes, deploy the resulting model for inference directly from the job summary page. Existing deployments and their statuses appear in the Deployment Details table at the bottom of the summary. ## Demote a deployment Active deployments can be demoted (undeployed) when no longer needed, freeing infrastructure resources. # Manage agents Source: https://docs.seekr.com/flow/app/manage-agents View, edit, activate, and deactivate agents in the SeekrFlow UI. This guide covers managing agents after creation. ## View agents Navigate to **Agent Builder > Agents** to see all your agents. Each agent displays its name, status, date created, and last modified date. Click an agent to view its full configuration: * Name and ID * Status * Date created and date deployed * Agent instructions * Reasoning configuration * Model details ## Agent statuses | Status | Description | | - | - | | Active | Ready to serve requests | | Pending | Transitioning between states | | Inactive | Not deployed, requires activation | | Failed | Deployment or update failed | > [!NOTE] > > An agent is demoted to **Inactive** after two weeks of inactivity. Creating, deploying, or running an agent resets the two-week period, but updating one does not. The agent's definition is retained. Activate the agent to return it to **Active**. ## Activate an agent **From the agents list:** **Step 1** Click the **more** menu (⋮) next to the agent. **Step 2** Click **Start**. **From the agent summary:** **Step 1** Click the agent to open its summary. **Step 2** Click **Start**. The agent status changes to **Pending** while SeekrFlow provisions it. After a few minutes, the status changes to **Active**. ## Deactivate an agent **From the agents list:** **Step 1** Click the **more** menu (⋮) next to the agent. **Step 2** Click **Pause**. **From the agent summary:** **Step 1** Click the agent to open its summary. **Step 2** Click **Pause**. The agent status changes to **Pending**, then **Inactive**. Inactive agents do not serve requests. ## Edit an agent You can edit an agent's configuration at any time regardless of its status. **From the agents list:** **Step 1** Click the **more** menu (⋮) next to the agent. **Step 2** Click **Edit**. **From the agent summary:** **Step 1** Click the agent to open its summary. **Step 2** Click **Edit**. ## Delete an agent Agents must be inactive before they can be deleted. **From the agents list:** **Step 1** Click the **more** menu (⋮) next to the agent. **Step 2** Click **Delete**. **Step 3** Confirm the deletion. **From the agent summary:** **Step 1** Click the agent to open its summary. **Step 2** Click the trash can icon. **Step 3** Confirm the deletion. Deleted agents cannot be recovered. # Manage permissions Source: https://docs.seekr.com/flow/app/manage-permissions Set up your organization, invite members, and manage team access in SeekrFlow. For background on organizations, teams, and roles, see [Role-based access control](/flow/role-based-access-control). Organization settings are accessible from the user profile menu in the top right corner of the SeekrFlow interface. ## Your organization The **Organization** page shows your organization name, your role, the date the organization was created, and a summary of your members and teams. The **Role Definitions** section at the bottom describes what each organization and team role can do. Owners can edit the organization name by clicking the name field directly. ## Add and remove members The **People** page lists all members in your organization. To access it, click **View People** from the Organization page, or select **People** under **Organization** in the left navigation. ### Invite a member Only owners can invite new members. **Step 1** Click **+ Invite Member**. **Step 2** Enter the member's email address. **Step 3** Select an organization role — **Member** or **Owner**. **Step 4** Click **Send Invitation**. The invitation appears under the **Invitations** tab until the member accepts. You can cancel a pending invitation from that tab. ### Change a member's organization role **Step 1** Click the member's name to open their details. **Step 2** Click the role badge next to their name and select a new role. **Step 3** Confirm the change. ### Remove a member **Step 1** Click the member's name to open their details. **Step 2** Select **Remove from Organization** from the actions menu. **Step 3** Confirm the removal. Removing a member revokes their access to all teams and resources in the organization. ## Create and manage teams The **Teams** page lists all teams in your organization. To access it, click **View Teams** from the Organization page, or select **Teams** under **Organization** in the left navigation. ### Create a team Only owners can create teams. **Step 1** Click **+ Create Team**. **Step 2** Enter a team name (up to 100 characters). **Step 3** Click **Create Team**. The new team appears in the teams list. Click the team name to open its details and add members. ### Add a team member Only team admins can add members to a team. Organization owners with a Creator role on the team cannot add members. **Step 1** Open the team by clicking its name. **Step 2** Click **+ Add Team Member**. **Step 3** Enter the member's email address. **Step 4** Select a team role — **Creator** or **Admin**. **Step 5** Click **Add Team Member**. The member must already belong to the organization. To invite someone new, invite them to the organization first. ### Change a team member's role **Step 1** Open the team by clicking its name. **Step 2** Find the member in the **Team Members** list and click their role badge. **Step 3** Select a new role and confirm. ### Remove a team member **Step 1** Open the team by clicking its name. **Step 2** Find the member in the **Team Members** list and open the actions menu. **Step 3** Select **Remove from Team** and confirm. ### Delete a team Only owners can delete teams. **Step 1** Open the team by clicking its name. **Step 2** Click **Delete Team**. **Step 3** Confirm the deletion. Teams with active or running resources cannot be deleted until those resources are stopped or reassigned. ## Find a team ID The **Teams Settings** page lists every team you belong to along with its ID. You need a team's ID to scope SDK or API requests to a specific team. For how to use it, see [Work with teams](/flow/sdk/teams). ## Switch your active team If you belong to multiple teams, a team switcher appears in the breadcrumb bar at the top of the page. Click your current team name to open the switcher, then: * Select a different team to switch to it. All resource lists — agents, fine-tuning jobs, deployments, files, and vector databases — update to show only what belongs to the selected team. * Select **Team Settings** to manage the current team's members and roles. # Manage tools Source: https://docs.seekr.com/flow/app/manage-tools View, edit, clone, and delete tools in the SeekrFlow Tool Library. This guide covers managing tools after creation. ## View tools Navigate to **Agent Builder > Tool Library** to see all your tools. Each tool displays its name, status, date created, and last modified date. If you have no tools yet, click **[Create Tool](/flow/app/create-a-tool)** to get started. ## Tool statuses | Status | Description | | - | - | | Active | Tool is deployed and available to assigned agents | | Inactive | Tool exists but has no active agent assignments | | Pending | Tool is transitioning between states | | Pausing | Tool is being deactivated | | Failed | Tool deployment or update failed | Tool status reflects the state of the agents it is assigned to. Available actions depend on the current status. ## View tool details Click a tool to open its summary panel. The panel shows: * **Name**, **ID**, and **Status** * **Tool Type** – File Search, Web Search, Agent as Tool, Code Interpreter, or Custom Tool * **Date Created** and **Last Modified** * **Author** * **Tool Description** * **Agents Used** – Number of agents currently using this tool * **Used In** – Table of assigned agents with their status, date created, and last modified date > [!NOTE] > > Only File Search and Web Search tools can be created in the UI. Tools of other types created via the API will also appear here. ## Edit a tool To edit a tool, use one of the following methods: **From the tools list:** **Step 1** Click **More options** (**⋮**) next to the tool. **Step 2** Select **Edit**. **Step 3** Update the tool configuration in the Tool Details modal. **Step 4** Click **Save Tool** to confirm. **From the tool summary:** **Step 1** Click the tool to open its summary panel. Click **Edit**. **Step 2** Update the tool configuration in the Tool Details modal. **Step 3** Click **Save Tool** to confirm. Editing a tool affects all agents currently using it. ## Clone a tool To clone a tool, use one of the following methods: **From the tools list:** **Step 1** Click **More options** (**⋮**) next to the tool. **Step 2** Select **Clone**. **From the tool summary:** **Step 1** Click the tool to open its summary panel. **Step 2** Click **Clone**. A copy of the tool appears in your Tool Library. ## Delete a tool To delete a tool, use one of the following methods: **From the tools list:** **Step 1** Click **More options** (**⋮**) next to the tool. **Step 2** Select **Delete**. **Step 3** Confirm the deletion. **From the tool summary:** **Step 1** Click the tool to open its summary panel. **Step 2** Click the trash can icon. **Step 3** Confirm the deletion. Deleted tools cannot be recovered. # Model Development Source: https://docs.seekr.com/flow/app/model-development Fine-tune, deploy, and browse base models in SeekrFlow. Model Development provides tools for training custom models on your data, deploying them for inference, and browsing the library of available base models. ## In this section * [Fine-Tuning](/flow/app/fine-tuning) – Create and manage fine-tuning jobs * [Deployments](/flow/app/deployments) – Deploy models and manage inference endpoints * [Model Library](/flow/app/model-library) – Browse available base models for fine-tuning and deployment # Model Library Source: https://docs.seekr.com/flow/app/model-library Browse and deploy available base models for fine-tuning and inference. The Model Library is a browsable catalog of base models available on SeekrFlow. Use it to explore what's available before starting a fine-tuning job, or to deploy a base model directly for inference. For the full list of supported models and their specifications, see [Models](/flow/components/models). ## Model cards Each model is shown as a card displaying: * **Provider** – The organization that published the model. * **Model name** – The full model identifier. * **Country of origin** – A flag and the name of the country the model originated from. Models with mixed origins show no flag. See [Country of origin](/flow/components/models#country-of-origin). * **Warning** – Shown for every model that did not originate in the United States, including models with mixed origins. Review a model's provenance before using it in a deployment that restricts model provenance. * **Deployment availability** – An icon indicates that the model is not available to deploy. See [Deployments](/flow/app/deployments). ## Deploy a base model To deploy a base model directly for inference, click **+ Create Deployment**. This opens the deployment wizard — see [Deployments](/flow/app/deployments) for a full walkthrough. # Playground Source: https://docs.seekr.com/flow/app/playground Test models and agents in SeekrFlow. Use the Playground to test models and chat with agents before integrating them into your applications. ## In this section * [Test a model](/flow/app/test-a-model) – Send prompts to models directly * [Chat with an agent](/flow/app/chat-with-an-agent) – Test agents and review their responses * [Understand a response](/flow/app/understand-a-response) – Use Source Trace to see which sources influenced a response # Report a bug Source: https://docs.seekr.com/flow/app/report-bug Send the Seekr support team a bug report from the SeekrFlow app. Use the bug report form to tell Seekr about a problem you encounter in SeekrFlow. **Step 1** Open the **Report a Bug** dialog from the avatar menu or from the sidebar. > [tab] Avatar menu > > Click your avatar, then click **Report a Bug**. > > ![The SeekrFlow avatar menu with the Report a Bug option highlighted between My Account and Sign Out.](https://mintcdn.com/seekr/e9pLQ0_YLxKOtbJe/images/docs/seekrflow-avatar-menu-report-a-bug.png?fit=max\&auto=format\&n=e9pLQ0_YLxKOtbJe\&q=85\&s=8c78aa76374973e4d2b7f29cea915c2b) > [tab] Sidebar > > Click **Help & Support**. In a collapsed sidebar, click the question mark icon. > > ![The bottom of the SeekrFlow sidebar with Help & Support highlighted.](https://mintcdn.com/seekr/e9pLQ0_YLxKOtbJe/images/docs/seekrflow-help-support-sidebar.png?fit=max\&auto=format\&n=e9pLQ0_YLxKOtbJe\&q=85\&s=7dc34de560d3b97796c97a5992309521) > > On the **Report a Bug** card, click **Report Bug**. > > ![The Report a Bug card on the Help & Support page with the Report Bug button highlighted.](https://mintcdn.com/seekr/e9pLQ0_YLxKOtbJe/images/docs/seekrflow-report-bug-card.png?fit=max\&auto=format\&n=e9pLQ0_YLxKOtbJe\&q=85\&s=eaf4529cb42f5e8e3c20de0423ffaf4a) **Step 2** Complete the three required fields. **Send Report** stays unavailable until you do. ![The Report a Bug dialog with empty Summary, Expected vs. Actual Behavior, and Steps to Reproduce fields, a Supporting Files drop area, and Cancel and Send Report buttons.](https://mintcdn.com/seekr/e9pLQ0_YLxKOtbJe/images/docs/seekrflow-report-a-bug-dialog.png?fit=max\&auto=format\&n=e9pLQ0_YLxKOtbJe\&q=85\&s=a15e7d018f3c54e0453dda45dcb57b7e) | Field | Limit | What to include | | - | - | - | | **Summary** | 1,000 characters | A short description of the issue. | | **Expected vs. Actual Behavior** | 10,000 characters | What you expected to happen and what happened instead. Include details like error messages or job IDs. | | **Steps to Reproduce** | 10,000 characters | The steps that lead to the issue. | **Step 3** Optionally, add files that show the problem. Drag files into the **Supporting Files** area, or click the area and choose files from your computer. You can attach up to 10 files, with a combined size of 11 MB. SeekrFlow accepts images (PNG, JPG, GIF), videos (MP4, MOV), and documents (PDF, Word, PowerPoint, Excel, Markdown, TXT, JSON). **Step 4** Click **Send Report**. A confirmation message appears at the bottom of the page. > [!TIP] > > To help the support team act quickly: > > * Name the agent, model, or job involved, and copy any error message exactly as it appears. > * Submit a separate report for each issue. > * Attach a screenshot or screen recording when you can. # Storage Source: https://docs.seekr.com/flow/app/storage Upload and manage source files, and create vector stores for retrieval and grounding. Storage is where SeekrFlow manages all content used across the platform, including files for training data, vector stores, agents, and evaluations. ## In this section * [File Storage](/flow/app/file-storage) – Upload, organize, and manage source documents and system-generated outputs * [Vector Stores](/flow/app/vector-stores) – Create semantic indexes from your files for retrieval and context grounding # Test a model Source: https://docs.seekr.com/flow/app/test-a-model Send prompts directly to models in Model Chat. Model Chat lets you send prompts directly to models and compare responses side by side. ## Start a conversation **Step 1** Navigate to **Playground > Model Chat** in the sidebar. **Step 2** Select **Deployments** or **Base Models** to choose the type of model to test. **Step 3** Select up to two models using the checkboxes. **Step 4** Type a message and press **Send**. ## View influential training data For a deployed fine-tuned model, you can see which training examples shaped a response. See [Training data attribution](/flow/components/explainability/training-data-attribution). For a continued fine-tune, the examples come only from that model's own training data, not from the fine-tunes it builds on. **Step 1** Select a deployed fine-tuned model under **Deployments** and send a prompt. **Step 2** Click **Influential Data** above the response. **Step 3** Review the training examples. Each one shows an influence level and the question-answer pair it came from. **Step 4** Click **Done** to close. Each model in a side-by-side comparison has its own **Influential Data** link, so you can compare what shaped each response. > [!NOTE] > > The link appears for any deployed fine-tuned model, including when the model has no relevant training data for the prompt. In that case the list is empty. ## Next steps * [Chat with an agent](/flow/app/chat-with-an-agent) – Test agents in Agent Chat # Tool Library Source: https://docs.seekr.com/flow/app/tool-library Create and manage tools for your agents in the SeekrFlow user interface. Tools extend what agents can do. While models provide reasoning capabilities, tools allow agents to take actions—accessing external systems, querying knowledge stores, executing code, or performing web searches to accomplish tasks. Tool Library provides a no-code interface for creating and managing tools that extend agent capabilities. Tools you create here are available to assign when building agents in Agent Builder. For more information about tools, see [Tools](/flow/components/agents/tools). To create tools using the SDK, see [Tools](/flow/sdk/agents/tools). ## In this section * [Create a tool](/flow/app/create-a-tool) – Build a new tool * [Manage tools](/flow/app/manage-tools) – View, edit, clone, and delete tools # Understand a response Source: https://docs.seekr.com/flow/app/understand-a-response Use source trace to see which sources influenced an agent's response. Use source trace to see which documents and data influenced an agent's response, and which parts of the response each source contributed to. For more information, see [Context attribution](/flow/components/explainability/context-attribution). ## Open source trace After an agent responds in Agent Chat, click **Run Source Trace** at the bottom of the response. SeekrFlow opens the response in a full-screen view and begins finding sources. Loading takes between 5 and 15 seconds. ## Read the highlighted response Once sources load, the response is divided into segments. Each segment is highlighted to show how strongly it was influenced by sources. The **Sources** panel on the right lists sources sorted by influence score, highest first. To hide the highlights, toggle **Influence Highlights** off in the toolbar. ## Explore by segment Hover over a segment to emphasize it and dim the others. Click a segment to select it. The Sources panel updates to show only the sources for that segment. Click anywhere outside the response to deselect. ## Trace a specific portion To find sources for a specific part of the response: **Step 1** Select the text you want to trace. **Step 2** Click **Run Source Trace For This**. This runs source trace on the selected text only, regardless of the granularity setting. ## Adjust parameters Click the **Parameters** tab in the Sources panel to configure how the response is segmented before running the trace. After changing a parameter, **Run Source Trace** becomes active again. ## View source content Click a source in the Sources panel to view the sentence or chunk from that source that contributed to the response. Web search sources may show a short snippet or a longer passage depending on whether the agent fetched the full page. ## No sources returned If the Sources panel is empty, the response was not grounded in documents or tools. This is expected for responses based on general knowledge. ## Exit Click **Exit** in the breadcrumb to return to Agent Chat. The view scrolls back to the response you were viewing. Source trace results are not saved. # Vector Stores Source: https://docs.seekr.com/flow/app/vector-stores Create semantic indexes from your documents to power retrieval and agents. Vector stores are semantic indexes built from your documents. They allow language models to retrieve contextually relevant information, powering workflows like agents and assistants. Each chunk of your documents is converted into a vector embedding, making content searchable by semantic similarity rather than keywords. ## Create a vector store **Step 1** Navigate to **Data Engine > Storage**, then select the **Vector Stores** tab. **Step 2** Click **Create Vector Store**. **Step 3** Enter the vector store details: * **Name** (required, 100 characters max) * **Description** (optional, 500 characters max) * **Embedding model** – select from the available models, each shown with its country of origin Choose the embedding model before creating the store. It is fixed once the store exists and cannot be changed afterward without re-embedding your files. For each model's dimensions, input limits, language support, and country of origin, see [Embedding models](/flow/components/models/embedding-models). **Step 4** Click **Create Vector Store**. The new store appears in the vector stores list with its name, file count, total size, and date modified. ## Vector store details Click any vector store to open its details view, which displays: * **ID** * **Model** – the embedding model used * **Size** * **File Count** * **Date Created** * **Last Modified** * **Description** – editable after creation * Files currently embedded in the store * Option to add more files ## Add files to a vector store **Step 1** Open the vector store details view. **Step 2** Click **Add Files**. **Step 3** In the modal, use **Select Files** to choose from existing files in File Storage, or switch to **Upload Files** to upload new files directly. **Step 4** Optionally expand **Advanced Embedding Options** to configure chunking behavior. **Step 5** Click **Add Files** to confirm. Supported file types: `.pdf`, `.docx`, `.ppt`, `.md`, `.json` Upload limits: 20 files at a time, maximum 150MB per file. > [!NOTE] > > `.jsonl` and `.parquet` files cannot be added to a vector store. ### Advanced Embedding Options Expand this section to configure how content is segmented before embedding: * **Chunk Size (Tokens)** — Maximum token count per chunk. Default: 800. * **Chunk Overlap (Tokens)** — Token overlap between adjacent chunks to reduce information loss at boundaries. Default: 400. ## File processing Once you click **Add Files**, SeekrFlow handles the rest automatically: 1. **Ingesting** — Converts compatible files to Markdown if needed. > [!NOTE] > > **Ingestion mode** > > Files added through the UI are always ingested using speed-optimized mode. To use accuracy-optimized ingestion, use the SDK instead. 2. **Chunking** — Breaks content into segments based on your settings. 3. **Embedding** — Transforms each chunk into a vector. 4. **Indexing** — Stores vectors into the semantic index. When processing completes, files appear in the details view with their name, processing status, and size. If a file fails to process, an error is shown with guidance for resolution. ## File status | Status | Description | | - | - | | Queued | File is waiting to be processed | | Ingesting | File is being converted to Markdown | | Chunking | Content is being segmented | | Embedding | Chunks are being converted to vectors | | Complete | File is indexed and ready for retrieval | ## Manage vector stores From the details view you can add or remove files, monitor file processing status, and rebuild the store when content changes. ## Next steps * [AI-Ready Data](/flow/app/ai-ready-data) – Generate context-grounded training data using a vector store * [Create an agent](/flow/app/create-an-agent) – Attach a vector store to an agent for retrieval-augmented memory # Release notes – 2024 Source: https://docs.seekr.com/flow/changelog/2024 **December 2024** > Improvements & Bug Fixes ### Tooltip for Icon Buttons in Model Library We’ve improved the user experience in the Model Library. Icon buttons in base model cards now display a hover tooltip with descriptive text, ensuring users clearly understand the available actions. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_dec_2025_1.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=2939e039a5fbf671b779a9f8f15c9556) ### Faster Response Rendering in Sandbox The simulated typing animation for sandbox responses now matches the speed of token count updates. This enhancement delivers quicker rendering, offering a more seamless and accurate representation of response generation. ### Run Description Added to Run Summary The run summary now displays the description entered during the run creation wizard, enhancing clarity and alignment with the design specifications. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_dec_2025_2.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=529793cc0093c54980ba6d72f527e4cc) ### Minor Bug Fixes and Stability Improvements This release includes several minor bug fixes and performance enhancements across SeekrFlow™ to ensure a smoother and more reliable user experience. **November 2024** November’s release introduces new features designed to give users greater control and efficiency over their AI workflows—from optimizing model outputs to managing large-scale deployments. For more details, read our full release blog. > New Features ### Sandbox Input Parameters We have added new input parameters to the Sandbox environment: Temperature, Top P, and Max Tokens. These options give more control over inference outputs, allowing users tailor responses for specific tasks and use cases. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_nov_2024_1.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=733c48bdfdd227edb5e332803aedec57) ### Enhanced Inference Engine for Faster Inference With the integration of vLLM, inference speeds have dramatically improved, making your AI workflows faster and more efficient. This integration ensures that even complex models deliver faster results, helping users achieve more in less time. We conducted performance testing to compare TGI and vLLM on Intel Gaudi2 accelerators. * **TGI**: tgi-gaudi v2.0.4 * **vLLM**: vllm-fork v0.5.3.post1-Gaudi-1.17.0 On average, the enhanced inference engine performed 32% faster when compared to TGI for the RAG experiments (full interaction traces, 10 concurrent requests) using Meta-Llama-3.1-8B-Instruct Significant latency improvements in load testing with 100 concurrent users: * **Meta-Llama-3-8B-Instruct**: \~45% faster * **Meta-Llama-3.1-8B-Instruct**: \~39% faster ### Enhanced OpenAI compatibility features Our inference engine now seamlessly integrates with OpenAI’s ecosystem, expanding workflow capabilities and enhancing usability. * **Log Probabilities**: New support for log_probs and top_logprobs, providing insights into model decision-making, aiding debugging, and improving output accuracy. * **Dynamic Tool Calling**: Custom functions can now be automatically invoked by the model based on context, streamlining business logic integration. ### Try it yourself! The example code below shows you how to leverage the OpenAI client and SeekrFlow's inference engine to create a custom unit conversion tool that can be configured dynamically. #### Create the client and make an API request ```python Python expandable theme={null} import os import openai # Set the API key os.environ["OPENAI_API_KEY"] = "Paste your API key here" # Create the OpenAI client and retrieve the API key. client = openai.OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key=os.environ.get("OPENAI_API_KEY") ) # Send a request to the OpenAI API to leverage the specified Llama model as a unit conversion tool. response = client.chat.completions.create( model="meta-llama/Llama-3.1-8B-Instruct", stream=False, messages=[{ "role": "user", "content": "Convert from 5 kilometers to miles" }], max_tokens=100, tools=[{ "type": "function", "function": { "name": "convert_units", "description": "Convert between different units of measurement", "parameters": { "type": "object", "properties": { "value": {"type": "number"}, "from_unit": {"type": "string"}, "to_unit": {"type": "string"} }, "required": ["value", "from_unit", "to_unit"] } } }] ) ``` #### Register a function from JSONNext, define and register a Python function from JSON data. ```python Python theme={null} # Parse json and register def register_from_json(json_obj): code = f"def {json_obj['name']}({', '.join(json_obj['args'])}):\n{json_obj['docstring']}\n{json_obj['code']}" print(code) namespace = {} exec(code, namespace) return namespace[json_obj["name"]] ``` #### Run the unit conversion toolThis function executes the tool call, given an LLM response object. ```python Python theme={null} # Execute our tool def execute_tool_call(resp): tool_call = resp.choices[0].message.tool_calls[0] func_name = tool_call.function.name args = tool_call.function.arguments func = globals().get(func_name) if not func: raise ValueError(f"Function {func_name} not found") if isinstance(args, str): import json args = json.loads(args) return func(**args) execute_tool_call(response) ``` #### Sample output This is the output expected in response to the request made earlier to convert 5 kilometers to miles. ```python Python theme={null} 3.106855 ``` ### Federated Login with Intel Intel® Tiber™ AI Cloud users can now access SeekrFlow™ with a new federated login feature First-time users: Start by using your Intel® Tiber™ AI Cloud credentials, which will auto-populate the sign-up form for quick and easy access to SeekrFlow. Returning users: Simply log in with your Intel® Tiber™ AI Cloud credentials for direct access to SeekrFlow. This integration simplifies user management and access for those connected to Intel® Tiber™ AI Cloud. > Improvements & Bug Fixes ### Streaming in Sandbox We have enabled streaming for chat responses in the Sandbox, delivering results incrementally so users can utilize results without a delay. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_nov_2025_2.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=a0e3227f916bf9cdff7b8cf79d6540d4) ### Clear and Restart Button Fix We have resolved an issue where the “Clear and Restart” button in Sandbox didn’t function. A dialog box now appears, confirming that chat history will be cleared, allowing you to start fresh. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_nov_2025_3.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=8a2736ede659f690915a9137a8b883c7) ### Dataset Directory Update Uploaded file improvements in the Create Run Modal * Successfully uploaded files immediately appear in the dataset directory. * Switching to the directory view auto-selects the newly uploaded file. * Radio buttons now remain active, ensuring smooth file selection. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_nov_2025_4.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=e52ead4ddddbffe3058c4f88802a76af) > UI/UX Enhancements We have made several updates to improve the user experience and provide clearer guidance across the platform * **Sandbox**: Updated language to better support the new model parameter settings for improved clarity. * **Deployment Dashboard**: Enhanced explanations of cost transparency features for better understanding of resource usage. * **Projects**: Cancellation dialogs now show detailed cost information related to token usage, offering users more visibility into their resource consumption. These updates aim to make SeekrFlow’s interface more intuitive and user-friendly, enhancing navigation and overall clarity. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_nov_2025_5.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=f889c7121e2cad31743982a731f614c0) **October 2024** > UI/UX Enhancements ### Quickstart Card Reorganization We have reorganized the Quickstart cards to improve navigation and help users find essential features and tools faster, making it easier to get started and accelerate the time to deployment. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_oct_2024_1.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=b4e3d69b45c561f8d225ce1d798201e0) ### New Icons and Tooltips New icons and tooltips have been introduced across the platform. These provide quick access to relevant documentation without interrupting your workflow, ensuring that users can reference helpful resources whenever needed. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_oct_2024_2.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=dde19eddd6a97b3f5e28edbe26ddace7) ### Enhanced User Guidance We have updated the user guidance system to provide clearer instructions throughout the process, with a focus on alignment and data creation. Users will now find an embedded documentation tab within the UI, offering step-by-step instructions and best practices for principle alignment and data creation. These updates are designed to support users of all technical backgrounds, helping them navigate the platform with confidence and accelerate their AI model deployment. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_oct_2024_3.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=9fd89643d41dc9e4eafa8d6063349389) **September 2024** ### The New SeekrFlow™ Self-Service Enterprise AI Platform SeekrFlow™ is now available as a complete, self-service platform that empowers enterprises to train, validate, deploy, and scale trusted AI applications with ease. This includes: * **Lifecycle Management**: Manage the entire AI lifecycle through a single API call, SDK, or no-code interface. * **Principle Alignment**: An intelligent agent that simplifies the process of aligning AI models to domain-specific knowledge, such as company policies, industry regulation,s or brand guidelines. This feature enhances the accuracy and relevance of base model responses by 3x and 6x respectively, at 90% reduced cost compared to traditional data preparation methods. * **Five-step Deployment**: Simplify and accelerate the deployment process with an intuitive, guided workflow. * **Model Validation Tools**: Ensure model accuracy with advanced validation features, including side-by-side comparisons and token-level confidence scoring. * **Real-time Monitoring**: Monitor model performance and production health to maintain reliability and optimize outcomes. * **Flexible Cloud and Hardware Deployment**: Deploy models seamlessly on all leading cloud providers and hardware platforms, offering the flexibility to scale based on your needs. For more details, read the full blog [here](https://www.seekr.com/the-new-seekrflow-self-service-enterprise-ai-platform/). ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_sep_2024.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=189fd1a85f689ca8e4a86f3d4a1a9dd6) # Release notes – 2025 Source: https://docs.seekr.com/flow/changelog/2025 **December 2025** ### LoRA fine-tuningFeature Seekr-managed instance Supported on UI API SDK SeekrFlow now supports low-rank adaptation (LoRA) support for parameter-efficient fine-tuning. LoRA trains small adapter layers while keeping the base model frozen, enabling faster training cycles and reduced computational costs compared to full fine-tuning. **Capabilities:** * Fine-tune models using LoRA with SFT and GRPO workflows * Lower GPU memory requirements enable fine-tuning of larger models * Reduced risk of catastrophic forgetting * Configure via `lora_config` parameter in `TrainingConfig` (includes `rank`, `alpha`, and advanced fields) ### User interface parity with Seekr-managed instanceImprovement Self-hosted instance Self-hosted instances now include all features and improvements released to Seekr-managed instances through September 2025. This release brings self-hosted deployments to feature parity with the managed interface, including SeekrFlow Explainability, Agent Observability Platform, Docstring Validation, AI Ready Data Engine quality enhancements, and SeekrFlow Helm Chart v2.0. **November 2025** ### Faster file ingestionImprovement Seekr-managed instance Supported on UI API SDK Significantly faster document processing across all file sizes and ingestion modes (speed and accuracy optimized). **Performance improvements:** * 5 MB PDFs: complete in under 35 seconds * Small text-based documents: complete in under 6 seconds Actual ingestion times vary based on file size and content. Both speed and accuracy modes now process documents substantially faster regardless of workload, ### Chunking strategies for document ingestionFeature Seekr-managed instance Supported on UI API SDK Multiple chunking strategies for vector database ingestion, enabling optimized document processing based on content type and use case. **Available strategies:** * **Manual chunking**: Use custom delimiters (`---DOCUMENT_BREAK---`) to define chunk boundaries, ideal for resume collections or document compilations where each document should remain intact. * **Semantic chunking**: Group content based on semantic similarity using embedding models, maintaining coherence for long-form content. * **Sliding window chunking**: Simple fixed-size chunks with configurable overlap, suitable for uniform processing without content-aware splitting. * **Markdown chunking** (existing): Split documents based on markdown heading hierarchy while preserving table structures. All strategies respect token limits and include fallback handling for sections exceeding maximum token counts. **September 2025** > New Feature ### SeekrFlow Explainability SeekrFlow now brings transparency to model outputs by surfacing the five most influential Q\&A pairs that shaped each response. Generated by the AI-Ready Data Engine, these pairs can be traced directly without relying on file downloads or custom scripts. This gives users immediate visibility into the training data behind their fine-tuned models, supporting validation, debugging, and trust in model behavior. The feature is available in the SDK through get_influential_finetuning_data() and in Model Chat within the SeekrFlow UI. View documentation [here](/flow/components/explainability) ### Agent Observability Platform SeekrFlow now includes an observability platform that gives developers full visibility into agent execution. Through detailed traces, spans, and performance metrics, users can see how agents process inputs, make decisions, and produce outputs—step by step. **Key Capabilities** * Automatic trace and span collection for all agent operations. * Capture of tool calls, LLM inferences, and execution flows. * SDK access for querying and analyzing agent runs. This update removes the “black box” from agent behavior, enabling validation, auditability, and performance optimization. With complete observability, teams can deploy Seekr agents in production with confidence and transparency. ### Docstring Validation for Custom Functions This update enhances the performance and reliability of SeekrFlow Agent Custom Tools by introducing docstring validation, a system that automatically checks function documentation before deployment. **Key capabilities** * Validates Python function docstrings against the Google format during create() or update(). * Ensures all parameters, types, and return values are correctly defined. * Consolidates documentation into a single source of truth, removing duplicate or conflicting descriptions. Docstring validation improves both development clarity and runtime performance. Clear, validated function definitions help agents determine when to invoke tools, accurately map parameters, and reduce execution errors—resulting in faster, more predictable performance and a smoother user experience. View documentation [here](/flow/sdk/agents/custom-tools) ### SeekrFlow Now Available in AWS GovCloud (US) SeekrFlow™ is now available in AWS GovCloud (US), joining its existing AWS Marketplace listing to give federal agencies and regulated customers one-click, subscription-based access to agentic AI in a secure, sovereign cloud environment. This deployment enables organizations including the U.S. Department of War to run AI workflows that protect Controlled Unclassified Information (CUI) and other high-value assets while accelerating modernization and mission-critical outcomes. Federal customers can now procure SeekrFlow faster and deploy it for FedRAMP High and DoW SRG IL5 workloads, all while leveraging existing AWS Enterprise Discount Program (EDP) credits. This simplifies procurement, optimizes costs, and allows agencies to adopt AI with full confidence in compliance, data protection, and security. Learn more [here](https://www.seekr.com/blog/seekrflow-agentic-ai-platform-now-available-in-aws-govcloud-us/) > Improvements & Bug Fixes ### SeekrFlow Helm Chart v2.0 This release introduces major upgrades to the SeekrFlow Helm Chart, bringing unified MLOps deployment, expanded environment support, and stronger compliance for enterprise and government users. **Supported Environments** * AWS Commercial * AWS GovCloud **Key Capabilities** * Unified serving, ingestion, and training in one deployment. * Built-in tools for Web Search, File/Vector Search, and Code Execution. * vLLM-powered model serving for faster inference and better GPU efficiency. * FIPS-enabled containers, hardened security baselines, and upgraded secrets management. * Simplified configuration via refactored values.yaml and improved observability across all components. This update strengthens deployment flexibility and compliance posture especially for customers operating in regulated and government environments, while simplifying operations and improving performance across the entire MLOps stack. ### AI Ready Data Engine Quality Enhancements We’ve made several improvements to question-generation and evaluation to increase data diversity and overall fine-tuning quality. **Key enhancements** * Expanded question coverage by generating from summaries, extracted facts, and source text. * Introduced question evolution, producing multiple forms of similar questions for richer variation. * Implemented explicit instruction-based evaluation for each generated pair. * Shifted from a fixed number of questions per node to dynamic generation determined at runtime. These updates produce more accurate and contextually varied Q/A pairs, improving both data quality and model alignment for fine-tuning workflows. **August 2025** > New Feature ### GRPO Fine-Tuning We’ve introduced Group Relative Policy Optimization (GRPO) Fine-Tuning in SeekrFlow, a powerful reinforcement learning technique that unlocks advanced reasoning capabilities in Large Language Models (LLMs). GRPO fine-tuning transforms models from passive information retrievers into active problem-solvers, capable of handling complex, verifiable tasks with greater precision and reliability. This method is effective in domains where answers can be definitively validated, such as mathematics, coding, and other structured problem-solving scenarios. GRPO training follows a similar process to standard fine-tuning, with a few targeted modifications, and is now fully supported in SeekrFlow. Read the blog [here](https://www.seekr.com/blog/introducing-grpo-fine-tuning-in-seekrflow/) View Documentation [here](/flow/components/fine-tuning/grpo) ### Custom Tools for SeekrFlow AgentsSeekr Flow Agents now support Custom Tools, enabling developers to extend agent capabilities with purpose-built logic tailored to their specific workflows. Custom Tools are developer-defined Python functions that can be seamlessly integrated alongside built-in tools like Web Search or File Search. Agents dynamically reason over tool descriptions, their instructions, and user input to decide when to invoke them to automatically map context to parameters, execute the function, and return results. Key capabilities: * Custom business logic: Implement organization-specific workflows and operations. * Data transformation: Clean, format, and enrich text, numerical, or structured data. * External integrations: Connect agents to APIs, databases, Slack, Outlook, and other business systems. * Proprietary data access: Leverage internal knowledge stores and company-specific repositories. View documentation [here](/flow/sdk/agents/custom-tools) > Improvements & Bug Fixes ### Model Library Super-Size The SeekrFlow Model Library just got a major expansion—15 new models are now available for use. This update significantly broadens your model options, offering a mix of small, mid, and large-scale LLMs across multiple providers. Whether you’re experimenting with reasoning, vision tasks, or enterprise-scale workloads, SeekrFlow now gives you more flexibility to choose the right model for the job. #### New Models Added:- meta-llama/Llama-3.2-90B-Vision-Instruct * NousResearch/Yarn-Mistral-7B-128k * mistralai/Mistral-7B-Instruct-v0.2 * mistralai/Mistral-Small-24B-Instruct-2501 * google/gemma-2b * google/gemma-2-9b * google/gemma-3-27b-it * Qwen/Qwen3-8B-FP8 * Qwen/Qwen3-32B-FP8 * Qwen/Qwen3-30B-A3B-FP8 * Qwen/Qwen3-235B-A22B-FP8 * Qwen/Qwen2-72B * mistralai/Mamba-Codestral-7B-v0.1 * microsoft/Phi-3-mini-4k-instruct * meta-llama/Llama-4-Scout-17B-16E * meta-llama/Llama-4-Scout-17B-16E-Instruct #### Refreshed Models:- meta-llama/Llama-3.2-1B-Vision-Instruct * meta-llama/Llama-3.2-3B-Vision-Instruct Where to use them: * API / SDK: Call the new models directly for inference. * Playground > Model Chat: Pick any of the new additions and start chatting immediately. ### Content Moderation Models in SeekrFlowSeekr Flow now includes content moderation models to help teams build safety and scoring pipelines directly into their applications. #### Available Models: ##### Seekr ContentGuard * Purpose-built for podcast moderation, using the same scoring system that powered SeekrAlign. * Includes GARM category classification and the Seekr Civility Score™. * Ideal for scoring podcast transcripts, detecting attacks, labeling tone, and surfacing ad risk. Learn more [here](/flow/seekr-contentguard-sdk) ##### Meta Llama Guard 3 * General-purpose moderation model that classifies unsafe content across 22 MLCommons taxonomy categories. * Best for moderating LLM outputs, chat messages, or any user-generated text. * With these models, users can design their own safety and scoring apps or pipelines that can: Learn more [here](/flow/llama-guard-sdk) With these models, users can design their own safety and scoring apps or pipelines that can: * Detect unsafe or brand-unsafe content. * Score tone and civility. * Add guardrails for LLM agents and assistants. * Apply moderation filters at scale. This update expands SeekrFlow into media, safety, guardrails, and governance use cases—broadening how teams can ensure responsible, brand-safe, and transparent AI deployments. View documentation [here](/flow/components/content-moderation) ### Built-in Tools for SeekrFlow Agents (Now in the SeekrFlow UI) You can now configure agent tools directly from the SeekrFlow UI, making it easier to extend agent capabilities. #### Available Tools:- File Search: Let agents retrieve and reason over files ingested into SeekrFlow. * Web Search: Enable agents to pull in fresh information from the web to complement their knowledge base. This update gives you more control and flexibility in building agents straight from the browser. With built-in File Search and Web Search, teams can quickly prototype, evaluate, and operationalize agents that connect to both internal and external sources. ### AI-Ready Data Engine: New Ingestion & Chunking Methods This release introduces powerful new ingestion and chunking options, giving users more control over speed, accuracy, and structure when preparing data for AI workflows. Available in UI, API, and SDK. #### Ingestion Methods: ##### Accuracy-Optimized (API/SDK default) * Highest-fidelity output with exact hierarchy and table preservation. * Best for long technical docs, contracts, research papers, and compliance data where precision is critical. * May take more time to process very large files (100+ pages). #### Speed-Optimized (SaaS UI default) * Delivers fast results with strong accuracy—ideal for everyday files, batch runs, or time-sensitive workflows. * Handles large files efficiently while maintaining usability. View documentation [here](/flow/sdk/data-engine/file-ingestion#the-method-paramter) #### Chunking Methods: ##### Manual Window Chunking (API/SDK) * Fixed-size sliding window with overlap and support for ---DOCUMENT_BREAK--- markers. * Predictable, user-controlled splits for more consistent chunking. * Ideal for resumes, multi-doc compilations, unstructured PDFs, narratives, or evaluation workflows. View documentation [here](/flow/sdk/data-engine/create-and-populate-a-vector-database) With these new options, you can adapt ingestion to the needs of each workflow: * Speed-Optimized mode processes massive batches of files, RFPs, or discovery documents in just minutes, perfect when turnaround time matters most. * Accuracy-Optimized mode preserves every detail in contracts, compliance records, or research papers, ensuring the cleanest structure and hierarchy extraction. * Manual Chunking gives you complete control over splitting less structured content, including resumes, multi-document compilations, and narratives. This ensures consistent chunks for vector databases and downstream workflows. ### Minor Bug Fixes & Stability Improvements This release includes a series of behind-the-scenes updates to improve overall platform performance, usability, and reliability. From small interface refinements to enhanced error handling and support resources, these updates ensure a smoother and more consistent experience across SeekrFlow. **July 2025** > New Feature ## Agent Structured Outputs You can now define structured response formats for SeekrFlow™ agents, available through the API and SDK. This capability allows developers to enforce specific schemas for agent outputs, ensuring integration-ready responses from the first generation. By eliminating the need for post-processing or custom parsers, structured outputs simplify development and enable more reliable downstream workflows View Documentation [here](/flow/sdk/agents/structured-outputs) > Improvements & Bug Fixes ### New SeekrFlow UI We’ve launched one of the biggest SeekrFlow updates to date: a redesigned UI that makes agent creation and experimentation more accessible, and intuitive. * Agents for Everyone: You can now create, configure, and chat with agents directly in the UI. * Guided forms simplify model, tool, and policy selection. * Built-in conversation scaffolding means no manual thread setup. * Test agents instantly in the new Agent Chat sandbox. #### New SeekrFlow Dashboard:: * Quick-Start tiles let you jump directly into creation: AI-Ready Data, Fine-Tune, Create an Agent, and Playground. * Tabbed Recent Work view for Fine-Tuning and Agents, complete with status badges. * Deployment snapshot panel showing current deployment counts and live token usage meters. #### UI Enhancements: * A complete visual reskin for a modern, polished look. * Reorganized left navigation aligned to real workflows: * Data Engine: New Storage section for managing files and vector stores * Development: Fine-Tuning, Agents, Deployments, and Model Library * Playground * Refreshed layout and graphics to improve clarity and usability. * Inline “Learn More” links for quick, contextual guidance. This update makes SeekrFlow more accessible to both technical and non-technical users, enabling fast agent prototyping and evaluation straight from the browser. The new dashboard supports faster onboarding, agent-first workflows, and one-screen deployment health checks. It also lays the foundation for future platform capabilities. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_july_2025.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=d247d96a9f15e0cf0bbfdfd268c63755) ### Minor Bug Fixes & Stability Improvements This release includes a number of behind-the-scenes updates, bug fixes, performance tuning, and workflow stability improvements to ensure a smoother, more reliable experience across SeekrFlow. **June 2025** > New Feature ### SeekrFlow™ AgentsToday, we’re launching SeekrFlow™ Agents, a full-stack solution for building and deploying intelligent agents that operate autonomously, securely, and at scale. With SeekrFlow Agents, enterprises can deploy agents that are secure, explainable, and optimized for their specific tasks and industry. With SeekrFlow, you get the flexibility to run agents across cloud and on-premises—delivering the infrastructure and control needed to embed agentic AI into real-world workflows.​ Read the full blog: [here](https://www.seekr.com/blog/introducing-seekrflow-agents/)\ View documentation: [here](/flow/app/agent-builder) ### Seekr partners with Oracle Cloud InfrastructureSeekr has signed a multi-year agreement with Oracle Cloud Infrastructure (OCI) to accelerate AI deployments and support the development of next-gen models and agents. This collaboration brings together Seekr’s secure AI platform, OCI’s high-performance infrastructure, and AMD Instinct™ MI300X GPUs to enable faster model training, scalable deployment, and support for mission-critical environments. Learn more: [here](https://www.seekr.com/blog/seekr-selects-oracle-cloud-infrastructure/) ### Agent performance configurationsSeekrFlow Agents now offer three performance configurations, giving you control over the speed-latency tradeoff based on your use case requirements. Configuration selection available through API, SDK, and UI Choose from three agent configurations when creating or deploying agents: * Performance optimized: Highest quality responses with comprehensive reasoning (current default) * Speed optimized: Fastest response times for time-sensitive applications Learn more: [Agents](/flow/components/agents) ### Code interpreter tool for agentsSeekrFlow Agents can now execute Python code dynamically using the code interpreter tool, enabling agents to perform calculations, data analysis, and programmatic tasks on demand. * Execute Python code within agent workflows to handle computational tasks * Access to common Python packages for data processing and analysis * Agents automatically determine when to invoke Code Interpreter based on user queries * Available alongside File Search and Web Search tools when configuring agents * Full tool management through the UI, including status tracking and usage instructions * Code Interpreter expands agent capabilities beyond information retrieval, allowing them to perform quantitative analysis, generate visualizations, and solve mathematical problems programmatically. Learn more: [Code Interpreter](/flow/sdk/agents/custom-tools) **May 2025** > New Feature ### SeekrFlow™ Available in AWS Marketplace We’re excited to announce that SeekrFlow™, is now available on AWS Marketplace. This listing gives AWS customers a streamlined way to deploy SeekrFlow directly within their environments, accelerating AI adoption while maintaining full control over security, compliance, and procurement. Read the launch blog [here](https://www.seekr.com/blog/seekrflow-now-available-in-aws-marketplace/) > Improvements & Bug Fixes ### General Improvements and Workflow Stability We’ve made several updates to improve platform reliability and user experience. This includes enhanced model cards that now display model-specific information, and updated links to our Privacy Policy and Terms & Conditions to ensure greater transparency. These refinements, along with ongoing stability and performance enhancements, help ensure a smoother and more trustworthy workflow across SeekrFlow. **April 2025** > Improvements & Bug Fixes ### Multi-Factor Authentication (MFA) Seekr now supports MFA for all user sign-ins. After entering their credentials, users are guided to select and complete a second-factor verification via: * TOTP (Time-based one-time password) through authenticator apps * SMS one-time codes * Email one-time codes This adaptive login flow automatically directs users to their configured method (or lets them choose if multiple factors are set up), ensuring a seamless yet secure sign-in experience. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_april_2025_1.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=f21c28062773687c4f964cf265457ae4) ### In-App Help & Support AccessWe have made it easier for users to access help right when they need it. A new “Help” label now appears next to the question icon in the top navigation bar. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_april_2025_2.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=5128c35b424900f798938a05201133ab) ### Editable Project Titles and Descriptions We have introduced inline editing for project titles and descriptions on the Project Details page, making it faster and easier to manage key project information. * Titles can now be updated inline and are limited to 100 characters. * Descriptions support multiline editing and are capped at 1,000 characters. These updates provide a more flexible and user-friendly way to keep project details accurate and up to date. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_april_2025_3.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=687428e085e05832bf4693de51905e4d) **March 2025** > New Feature ## Multi-file Ingestion Today, we’re introducing multi-file ingestion, a new feature within SeekrFlow™. This capability simplifies and accelerates the process of automatic generation of a fine-tuning dataset. With multi-file ingestion, you can now upload a set of files across multiple formats, all in one step. SeekrFlow automatically converts, merges, and structures the content into markdown (.md) that is AI-ready, eliminating the need for manual formatting or stitching files together. To learn more, read the [launch blog](https://www.seekr.com/multi-file-ingestion-in-seekrflow/). > Improvements & Bug Fixes ## General Improvements and Workflow Stability We have implemented several small bug fixes and performance enhancements to improve the data creation workflow, including updated instructional copy, clearer conversion progress indicators, refined exit warnings, and a more streamlined experience from upload to completion. **February 2025** > New Feature ### Vector databases for enhanced retrieval SeekrFlow introduces vector database capabilities that give you complete control over document ingestion, chunking, and semantic search for retrieval-augmented generation (RAG) workflows. * Create and manage vector databases with configurable embedding models, dimensions, and distance metrics. * Ingest documents using flexible chunking strategies—choose automatic chunking with smart defaults or define custom parameters for chunk size and overlap. * Search across ingested documents using hybrid retrieval that combines semantic and keyword-based search. * Fine-tune search results with ranking options and relevance thresholds to control response quality. * Ingest multiple documents at once by organizing files into collections. This release gives developers the infrastructure needed to build production RAG applications with precise control over how documents are processed and retrieved. For more information, see the [launch blog](https://www.seekr.com/blog/enhanced-retrieval-teaching-ai-to-structure-and-prioritize-retrieved-knowledge/) and [Vector Stores](/flow/app/vector-stores). ### AI Ready Data EngineWe have launched the Seekr AI-Ready Data Engine, a powerful new system within the SeekrFlow™ platform that transforms diverse enterprise data into a structured, AI-ready format—faster, more accurately, and at a lower cost. This intelligent, end-to-end pipeline eliminates manual bottlenecks, ensuring seamless integration and deployment of high-quality, trustworthy AI applications. To learn more, read the [launch blog](https://www.seekr.com/introducing-the-seekr-ai-ready-data-engine/). ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_march_2025_1.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=dba1ab709097d930fade8b7ac9b5a967) ### API Key Management Users can generate their own API keys directly from their profile. This enhancement streamlines access management and improves user autonomy and security, ensuring a seamless developer experience. ### How to create your API Key * Users can generate an API key by clicking the “+ Generate Key” button in their profile. * The system will securely generate and return a unique API key. * Once generated, users will be prompted to save their key before exiting. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_march_2025_2.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=cb9482fc56a8a85f492576aaf6a870bf) > Improvements & Bug Fixes ### Updated User Profile Page with Navigation The SeekrFlow user profile page has been redesigned with a new sub-navigation component, improving accessibility and ease of use. The page is now labeled "My Account" and includes two sections: * Profile: which serves as the default landing page * API Key: where users can generate and manage their API access. This update provides a more intuitive way to navigate account settings. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_march_2025_3.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=618551b1b4b829c1e324eb981e4d2d10) ### Bug Fixes and Stability Improvements We have implemented several small bug fixes and performance enhancements to further optimize SeekrFlow. These updates improve the platform’s overall stability and ensure a smoother, more reliable experience for users. > UI/UX Enhancements ### Improved User Profile Experience Enhanced the User Profile experience with a new User Details section, including profile editing, password updates, sign-out functionality, and cookie settings management. **January 2025** > New Feature ### Training Loss Chart in Run Details We have added a dynamic training loss chart to the Run Details page, providing users with critical insights into model performance during fine-tuning: * **Y-Axis**: Displays loss values to indicate model performance trends. * **Upper X-Axis**: Shows the number of epochs selected during run creation. * **Lower X-Axis**: Represents "steps," calculated as:\ Total Steps = (Total Number of Samples ÷ number of instances \* Batch Size) × Number of Epochs This new feature enables users to track loss convergence and make informed adjustments, reducing the number of repeated fine-tuning cycles needed to optimize results. By minimizing fine-tuning runs, it saves time, compute resources, and associated costs. ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/changelog/release_notes_jan_2025.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=9151a207502827010465886f8141ecec) > Improvements & Bug Fixes ### Enhanced Data Ingestion Users can now upload ***Markdown, PDF, and Word*** files as valid file types for data ingestion during data creation. This update, available on API and SDK, makes working with diverse data formats easier, streamlining the ingestion process and reducing the need for file conversions. ### Expanded Base Model Library The base model library now includes the **Mistral-7B-Instruct-v0.2** model from Mistral AI. This model is available for fine-tuning, inference, and testing in the Sandbox, offering more options to tailor your AI solutions. ### Bug Fixes and Stability Improvements Small bug fixes and performance updates to make SeekrFlow™ smoother and more reliable for users. # Release notes – 2026 Source: https://docs.seekr.com/flow/changelog/2026 **November 5, 2026** ## Report bugs directly from the app Supported on UI API SDK You can report a bug without leaving SeekrFlow. Click your avatar, then click **Report a Bug**, or open **Help & Support** and click **Report Bug**. The form asks for a summary, expected versus actual behavior, and steps to reproduce. You can attach up to 10 files, such as screenshots or screen recordings. For details, see [Report a bug](/flow/app/report-bug). **October 21, 2026** ## Alignment endpoints sunset date extended to November 9 Supported on UI API SDK The sunset date for the deprecated alignment endpoints moved from October 14, 2026 to November 9, 2026. SeekrFlow will remove them on that date. Migrate to the data jobs endpoints before then. **October 21, 2026** ## Context-grounded fine-tuning sunset date extended to November 9 Supported on UI API SDK The sunset date for context-grounded fine-tuning moved from October 14, 2026 to November 9, 2026. SeekrFlow will remove it on that date. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). **October 8, 2026** ## Alignment endpoints sunset date extended Supported on UI API SDK The sunset date for the deprecated alignment endpoints moved from September 30, 2026 to October 14, 2026. SeekrFlow will remove them on that date. Migrate to the data jobs endpoints before then. **October 8, 2026** ## Context-grounded fine-tuning sunset date extended Supported on UI API SDK The sunset date for context-grounded fine-tuning moved from September 30, 2026 to October 14, 2026. SeekrFlow will remove it on that date. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). **October 6, 2026** ## Model serving engine upgrade speeds up inference and improves tool calling Supported on UI API SDK SeekrFlow upgraded the model serving engine to vLLM 0.29 for a set of hosted models. Fine-tuned LoRA adapters and several embedding models run faster, and tool calling improves on GPT-OSS 120B and three Qwen3 models. Your requests, endpoints, and model IDs stay the same. ### LoRA serving Fine-tuned LoRA adapters generate output faster and respond sooner on these base models: * Llama 3.3 70B Instruct * Llama 3.1 8B Instruct * Llama 3.2 3B Instruct * Mistral 7B Instruct v0.3 ### Embedding model performance * `Linq-AI-Research/Linq-Embed-Mistral` handles substantially more requests with much lower worst-case response times. * `BAAI/bge-base-en-v1.5` handles more requests. `BAAI/bge-m3` also runs on the upgraded engine, with throughput unchanged. Embedding outputs don't change for any of the three models. Your existing vector databases remain valid, and you don't need to re-embed. ### Tool calling * `openai/gpt-oss-120b` honors a named `tool_choice`, which forces a specific tool. Tool-calling requests also complete faster. * `Qwen/Qwen3-8B-FP8`, `Qwen/Qwen3-32B-FP8`, and `Qwen/Qwen3-235B-A22B-FP8` support automatic tool choice with `tool_choice: "auto"`. ### Qwen3 Coder reliability `Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` handles requests more reliably under load. See [Generative models](/flow/components/models/generative-models) and [Embedding models](/flow/components/models/embedding-models). **August 19, 2026** ## Context-grounded fine-tuning sunset date extended Supported on UI API SDK The sunset date for context-grounded fine-tuning moved from July 17, 2026 to September 30, 2026. You can keep using it until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). **August 14, 2026** ## Follow agent execution as it happens in Agent Chat Supported on UI API SDK Agent Chat surfaces work as it happens rather than after it finishes. * Tool calls appear when they begin executing, not only once results return * Parallel tool calls are surfaced as running in parallel * Sub-agent execution is surfaced while it runs, giving visibility into multi-agent workflows that take longer to complete * Text streams continuously rather than arriving in large chunks A long-running operation is distinguishable from a stalled one. See [Chat with an agent](/flow/app/chat-with-an-agent). **August 14, 2026** ## More reliable sub-agent tool calls Tool execution runs on a model better suited to the task, resolving instability in sub-agent tool calls. **August 14, 2026** ## Mermaid charts render correctly in Agent Chat Supported on UI API SDK Mermaid charts render without errors in agent responses. **August 7, 2026** ## Review the country of origin for any model in the catalog Supported on UI API SDK Every model in the catalog reports a country of origin, for use in deployments with model provenance requirements. Models with no single country of origin, such as a model with a corporate parent and a development lab in different countries, report mixed origins. The models endpoint returns `country_of_origin` for each model. In the Model Library, each model card surfaces its country of origin, and any model that did not originate in the United States carries a warning. See [Country of origin](/flow/components/models#country-of-origin). **August 7, 2026** ## Create vector databases with three additional embedding models Supported on UI API SDK Three additional embedding models are available when you create a vector database, each with a United States country of origin. * `ibm-granite/granite-embedding-311m-multilingual-r2` – 768 dimensions, 32768 max input tokens * `ibm-granite/granite-embedding-97m-multilingual-r2` – 384 dimensions, 32768 max input tokens * `Snowflake/snowflake-arctic-embed-l-v2.0` – 1024 dimensions, 8192 max input tokens See [Embedding models](/flow/components/models/embedding-models). **August 7, 2026** ## Vector database creation uses a new default embedding model Supported on UI API SDK `ibm-granite/granite-embedding-311m-multilingual-r2` is now the default embedding model for vector databases. Creating a vector database without specifying a model uses the default. `intfloat/e5-mistral-7b-instruct` remains available as a selectable option. > [!NOTE] > > Existing vector databases keep the embedding model they were created with. See [Embedding models](/flow/components/models/embedding-models). **July 31, 2026** ## Catch fine-tuning configurations that cannot fit before a job runs Supported on UI API SDK Fine-tuning jobs are validated at submission. SeekrFlow estimates the configuration against the requested hardware and refuses jobs that cannot fit, instead of consuming accelerator time and failing partway through with an out-of-memory error. Memory checking covers the full configuration, including measuring dataset images for vision-language jobs. Dataset schemas and file types are validated at the same point, so malformed training files are rejected with an actionable message. A refused job returns a 400 with a `gpu_memory_rejection` object describing the configuration that was evaluated and the changes that would make it fit. > [!NOTE] > > In the Python SDK, a refusal raises `InvalidRequestError` carrying the API message. See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job). **July 30, 2026** ## Faster and more consistent context attribution response times Context attribution requests are distributed across model replicas, and the data each request needs is retrieved in parallel. Attribution responses return faster and vary less between requests. **July 24, 2026** ## Follow training job progress through severity-tagged log entries Supported on UI API SDK Training job status is surfaced as a structured log of timestamped entries in the job event timeline, rather than a single status string. Processed log entries appear alongside the nine lifecycle events as **Status Update**, **Warning**, and **Error** events, with severity carried in event metadata. New informational messages cover details that were not visible before, including skipped document sections and dataset completion details that explain a smaller-than-expected dataset. Terminal reasons for a failed or stopped job are carried in that event's message. > [!NOTE] > > The status message field changes shape. Update to the current SDK for the revised typed model. **July 24, 2026** ## Failed training jobs explain what went wrong Supported on UI API SDK When a training job fails, SeekrFlow analyzes the failure logs and surfaces a plain-language explanation of the cause alongside the job, instead of a status alone. **July 22, 2026** ## Fine-tuning jobs fill in hyperparameter defaults automatically Supported on UI API SDK Requires seekrai 0.31.0 Fine-tuning jobs compute default hyperparameters for you. Omit `batch_size`, `learning_rate`, `max_length`, or `gradient_checkpointing` from a `TrainingConfig` and SeekrFlow derives each from the selected algorithm, model size, and dataset size. Set any of them to override its default. `n_epochs` remains required. See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job). **July 20, 2026** ## Track ingestion progress for every file in a job Supported on UI API SDK Each file in an ingestion job reports its own progress through document conversion and vector database ingestion, so a job with one slow file is distinguishable from a job that has stalled. Every file record carries a confirmed progress value and a projected one, each with a timestamp. Confirmed progress moves only when a step completes, so it never goes backwards and reaches 100% only when the file is genuinely finished. Projected progress advances between confirmations, which keeps a long step such as table extraction on a large PDF from appearing frozen. See [Track per-file progress](/flow/sdk/data-engine/monitor-ingestion#track-per-file-progress). **July 20, 2026** ## Data job timelines report every milestone a job reached Supported on UI API SDK The data job timeline is driven by the timestamps of what happened, so every milestone a job reached appears in order. Jobs that stopped or were cancelled get their own terminal events, and the reason a job failed, stopped, or was cancelled is carried in the event's `metadata.status_message`. See [Read the timeline](/flow/sdk/data-engine/monitor-ingestion#read-the-timeline). **July 20, 2026** ## Clearer errors for unsupported context attribution requests Context attribution returns a specific, actionable error when a request is not supported, instead of failing without explanation. **July 20, 2026** ## Manage alignment jobs through the data jobs endpoints Supported on UI API SDK Alignment endpoints that duplicate data jobs functionality are deprecated in favor of their data jobs equivalents. Deprecated endpoints remain functional until **September 30, 2026**. * `POST /alignment/{id}/cancel` – `POST /data-jobs/{id}/cancel` * `GET /alignment` – `GET /data-jobs` * `GET /alignment/{id}` – `GET /data-jobs/{id}` * `POST /alignment/ingestion` – `POST /data-jobs/{id}/add-files` * `GET /alignment/ingestion` and `GET /alignment/ingestion/{id}` – included in data jobs list and detail responses * `DELETE /alignment/{id}` – `DELETE /data-jobs/{id}` Deprecated endpoints return `Deprecation`, `Sunset`, and `Link` response headers. The `Alignment` and `Ingestion` SDK resources emit a `DeprecationWarning` naming the `DataJobs` equivalent. **July 10, 2026** ## Platform improvements and fixes This release includes the following improvements and fixes: * Intermittent ingestion failures caused by periodic restarts of the ingestion service have been eliminated. * The AI-ready data engine draws on more context when recursively summarizing long documents, improving summary quality. * Ingestion memory usage and processing speed have been optimized. **July 9, 2026** ## Clone an existing data job Supported on UI API SDK Requires seekrai 0.27.0 Clone any existing data job into a new, editable job pre-populated from the original's configuration. The clone starts fresh as an editable job you can adjust before starting alignment, and you can give it a new name or reuse the original's. Cloning is useful for iterating on instructions or reusing a file set across related datasets. See [Clone a data job](/flow/sdk/data-engine/manage-data-jobs#clone-a-data-job). **July 8, 2026** ## Trace agent instructions as a context attribution source Supported on UI API SDK Requires seekrai 0.25.0 Context attribution now traces influence from a new source type, agent instructions. When a statement in an agent's response is shaped by the agent's own system prompt rather than retrieved content, attribution results surface the specific prompt segment and its influence score. Sources of type `system_prompt` carry the core attribution fields: `source_type`, `id`, `text`, `attribution`, and `offset`. See [Context attribution](/flow/components/explainability/context-attribution) for the full list of source types, or the [SDK guide](/flow/sdk/explainability/context-attribution) for the response structure. ## View snippets and full page content for web search sources Supported on UI API SDK Context attribution represents web search results under a single source type that covers both search result snippets and full fetched page content. The source text reflects what the agent retrieved, so a web search source may surface a short snippet or a longer passage. See [Context attribution](/flow/components/explainability/context-attribution) for source types, the [SDK guide](/flow/sdk/explainability/context-attribution) for the response structure, or [Understand a response](/flow/app/understand-a-response) for the Sources panel. ## Trace agent responses to MCP tool outputs Supported on UI API SDK Requires seekrai 0.25.0 Context attribution now traces influence from MCP (Model Context Protocol) tool responses. When an agent calls an MCP tool during a response, such as querying a CRM or an issue tracker, the tool's response becomes an attributable source, so you can see which integrations shaped specific statements. This includes sub-agents the agent invokes as tools, which appear as MCP tool sources. See [Context attribution](/flow/components/explainability/context-attribution) for the full list of source types. **June 26, 2026** ## Submit large file batches for ingestion in a single call Supported on UI API SDK Ingestion accepts large file batches in a single submission, including batches of 5,000 files or more. Submission time stays constant regardless of batch size. Large batches no longer need to be split into smaller ones to keep submissions responsive. See [Prepare and ingest files](/flow/sdk/data-engine/file-ingestion). **June 26, 2026** ## Ingest plain-text files and rely on automatic file healing Supported on UI API SDK The AI-ready data engine accepts plain-text (`.txt`) files for ingestion, alongside Markdown, PDF, Word, and PowerPoint. It also corrects common formatting problems automatically. Markdown files with headers deeper than six levels are accepted instead of rejected, and files with missing or malformed elements are repaired where possible. When a file can't be used, the job stops and names the file and the issue to fix before resubmitting. This covers a file the engine can't repair, and a file that was deleted or became unavailable after the job was created. These jobs no longer fail with a generic error that reads like a platform fault. See [Prepare and ingest files](/flow/sdk/data-engine/file-ingestion). **June 26, 2026** ## Data jobs stop early when they can't produce useful data Supported on UI API SDK SeekrFlow validates each data job before it begins generating data and stops the job early when it can't produce useful results, avoiding token usage on a job that wouldn't succeed. A job is stopped when its instructions are empty, its instructions can't be interpreted as a data-generation task, its uploaded documents don't match the instructions, or no document content is relevant enough to the instructions. Each case sets a distinct `status_message` describing the cause and the adjustment to make before resubmitting. SeekrFlow also emails you when a job is stopped this way, with the job ID, source file, reason, and steps to resubmit. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). **June 26, 2026** ## Summarize the metadata in a vector database Supported on UI API SDK A metadata snapshot summarizes the user-defined metadata across a vector database's chunks, capturing the most common keys, their most frequent values, and each key's inferred type. Generate a snapshot to see what metadata your ingested documents carry. The snapshot captures up to the 100 most common keys, with up to the 10 most common values each. It refreshes automatically after an ingestion job adds documents, and can be regenerated or retrieved on demand. See [Generate a metadata snapshot](/flow/sdk/data-engine/generate-metadata-snapshot). **June 23, 2026** ## Guide dataset generation with data job instructions Supported on UI API SDK Data jobs accept an `instructions` field that describes the task your generated dataset should support. Alignment uses it to shape the examples it produces, such as the topics and the kinds of questions a fine-tuned model should be able to handle. Set instructions when you create a data job, or update them on an existing job. Data jobs no longer include a separate `description` field. For details, see [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning) and [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs). ## Track alignment job progress in real time Supported on UI API SDK The alignment job status endpoint returns richer progress data, so you can follow a running job from start to finish. Each response from `GET /v1/flow/alignment/{alignment_job_id}` surfaces the current processing step, progress through that step, overall completion, a projected completion time, estimated minutes remaining, and a human-readable status message. ## Platform improvements and fixes Supported on UI API SDK This release includes the following improvements and fixes: * Requesting data job outputs before a job completes now returns a clear error instead of partial results. * Stuck ingestion jobs restart automatically. * Model serving reliability and performance improvements. * General platform stability improvements. ## Context-grounded fine-tuning is deprecated Supported on UI API SDK SeekrFlow is deprecating context-grounded fine-tuning and will remove it on July 17, 2026. You can keep using it until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). **June 22, 2026** ## Score reinforcement tuning outputs with an LLM judge Supported on UI API SDK Reinforcement tuning reward functions can now use an LLM grader (LLM-as-a-judge) to score candidate responses. The judge compares each response to the reference answer and rates how closely it matches in meaning and quality. This suits open-ended or subjective outputs where deterministic graders such as string check and text similarity are too rigid. The LLM grader takes no operation. It accepts optional generation parameters (temperature, top_p, seed, and max_completion_tokens) that control how the judge produces its scores, and it combines with other graders through weights like the existing grader types. For details, see [reinforcement tuning](/flow/components/fine-tuning/grpo) and the [reinforcement tuning SDK guide](/flow/sdk/fine-tuning/grpo-fine-tuning). **June 19, 2026** ## Add, filter, and edit custom chunk metadata Supported on UI API SDK You can attach user-defined metadata to the chunks in a vector database and use it to refine retrieval. Add a flat set of fields, such as year, document type, or confidentiality level, when you ingest files, then list or filter chunks by those fields using exact matches or range operators. Metadata on existing chunks can also be edited, targeted by chunk or by file. Filtering by metadata improves retrieval precision on large, mixed collections where time period, document type, or business unit matters. For details, see [Manage chunk metadata](/flow/sdk/data-engine/manage-chunk-metadata) and [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database). **June 12, 2026** ## Trace agent responses back to their source documents Supported on UI API SDK Source tracing connects an agent response to the exact location in the document it came from. When a file is ingested into a vector database, provenance metadata is captured for every chunk, including its line range, character offsets, heading hierarchy, and source page. File search results carry this metadata, and a chunk endpoint returns the full provenance record, including the original file ID, so you can follow a response from model output back to the source document. This supports auditability, compliance, and chain-of-custody workflows. For details, see the [source tracing overview](/flow/components/explainability/source-tracing) and the [source tracing developer guide](/flow/sdk/explainability/source-tracing). **June 9, 2026** ## Partially update agents and tools Supported on UI API SDK New PATCH endpoints for agents and tools update individual fields without requiring the full configuration. Only the fields included in the request are changed; omitted fields remain unchanged. Use the corresponding diff endpoints to preview changes before applying them. * Update an agent: [SDK](/flow/sdk/agents/create-agents#update-an-agent) | [API](/flow/reference/patch_v1_flow_agents__agent_id__patch) * Preview an agent update: [SDK](/flow/sdk/agents/create-agents#preview-an-agent-update) | [API](/flow/reference/diff_v1_flow_agents__agent_id__diff_patch) * Update a tool: [SDK](/flow/sdk/agents/tools#update-a-tool) | [API](/flow/reference/patch_tool_v1_flow_tools__tool_id__patch) * Preview a tool update: [SDK](/flow/sdk/agents/tools#preview-a-tool-update) | [API](/flow/reference/diff_tool_changes_v1_flow_tools__tool_id__diff_patch) **May 28, 2026** ## Control agent reasoning with effort levels and temperature Improvement Supported on UI API SDK Agents support finer control over how they reason through a request. * `reasoning_effort` accepts `low`, `medium`, or `high`, with `medium` as the default. The `speed_optimized` and `performance_optimized` values remain supported as legacy options. * `temperature` controls the predictability of the agent's reasoning, accepting a value from `0` to `2` with a default of `0.6`. Lower values produce more consistent results, and higher values introduce more variation. See [Configure reasoning effort](/flow/sdk/agents/create-agents#configure-reasoning-effort) for details. **May 21, 2026** ## Edit agents directly in the UI Supported on UI API SDK You can now edit an agent's configuration directly from the UI. Select an agent from the agents list and click **Edit** to update its name, instructions, model, or tools. For details, see [Manage agents](/flow/app/manage-agents). **May 7, 2026** ## MCP connector support for agents Supported on UI API SDK Agents can now connect to external Model Context Protocol (MCP) servers using the MCP connector tool. SeekrFlow routes outbound requests through a secure internal gateway and handles authentication and token refresh automatically. To set up an MCP connector tool, create it via the API or SDK with your MCP server URL. Three authentication modes are supported: * Servers with dynamic client registration (DCR) * OAuth servers without DCR (bring your own `client_id` and `client_secret`) * Unauthenticated servers OAuth-based modes require a one-time authorization step before the tool becomes active. Once active, the tool can be linked to any agent. For more information, see [MCP connector](/flow/sdk/agents/mcp-connector). **April 29, 2026** ## Role-based access control for team collaboration Supported on UI API SDK SeekrFlow now supports role-based access control (RBAC), opening up team-based development across the platform. Resources — including agents, fine-tuning jobs, deployments, files, and vector databases — are owned by teams and accessible to all members of that team based on their assigned role. Key concepts: * **Organization** – The top-level container. All users belong to one organization. * **Teams** – Where work happens. Resources are scoped to a team. * **Roles** – Organizations have Owner and Member roles; Teams have Admin and Creator roles. Users can belong to multiple teams and switch between them using the team switcher in the UI. > [!NOTE] > > Agent conversation history (threads) remains user-owned and is not shared with team members. **Existing users:** All users have been migrated into an organization, and existing resources now live in a private team scoped to you. Select users have been assigned the Owner role. To get started, create a Team for a shared workstream, add members, assign roles, and use the team switcher to move between contexts. See [Role-based access control](/flow/role-based-access-control) and [Managing permissions](/flow/app/manage-permissions) for details. **April 8, 2026** ## Track file and vector database dependencies across your environment Supported on UI API SDK New usage endpoints surface file and vector database dependencies across tools, agents, and data jobs in your SeekrFlow environment. **File usage endpoints** return the downstream dependencies of a given file: * `GET /files/{file_id}/vector-dbs` – Vector databases that ingested this file. * `GET /files/{file_id}/data-jobs` – Data jobs that reference this file. * `GET /files/{file_id}/derived-files` – Derived files produced from this file. **Vector database usage endpoints** return what depends on a given database: * `GET /vectordb/{database_id}/tools` – File search tools that reference this database. * `GET /vectordb/{database_id}/data-jobs` – Data jobs with this database set as the vector database. With the `GET /tools/{tool_id}/agents` endpoint, you can trace the full dependency chain from a file or vector database to the agents that surface it. Use these endpoints to understand usage before deleting or migrating resources, or to audit data lineage across your workflows. For more information, see [File usage](/flow/components/data-engine/storage#file-usage). **April 2, 2026** ## Manage the full AI-ready data pipeline through a single job ID Supported on UI API SDK The Data Jobs API and SDK introduce a unified way to manage the full AI-ready data pipeline — from file upload and ingestion through alignment — under a single job ID, replacing fragmented multi-call workflows. * Create and manage data jobs via REST endpoints (`/v1/flow/data-jobs`) and Python SDK helpers (`client.data_jobs.*`). * Attach files with automatic ingestion using accuracy- or speed-optimized modes. * Remove files or failed records before alignment to keep workflows clean. * Edit job metadata, system prompt, and vector database ID at any time. * Start, cancel, and monitor alignment with pre-flight validation and structured error responses. * Track per-file ingestion status, queue position, and suggested fixes through a single job record. * Supports three job types: principle files, context-grounded files, and context-grounded vector DB. **March 12, 2026** ## Create and manage tools from Agent Builder Feature Supported on UI API SDK The Tool Library is now accessible from the SeekrFlow web interface, giving you a dedicated workspace to create and manage tools without writing code. Navigate to Agent Builder > Tool Library in the sidebar. From the Tool Library you can: * **Create tools** – Build File Search and Web Search tools directly in Agent Builder, including tool instructions and, for File Search, source files and search parameters. * **View and manage tools** – See all your tools in one place with status indicators, creation dates, and last modified dates. * **Inspect tool details** – Click any tool to see its full configuration, model information, and which agents are using it. * **Edit, clone, and delete** – Manage tools from either the list view or the tool summary panel. ## Trace agent responses to their sources Feature Supported on UI API SDK Each sentence or chunk of an agent's response is shaded to reflect how heavily it relied on retrieved context. Clicking any sentence surfaces its top contributing sources ranked by influence score. Attribution covers vector DB retrieval and web search. Controls for evidence depth, granularity, and influence filtering are user-configurable and persist per agent thread. Attribution can run automatically alongside a response at inference time, or be applied post-inference to any existing output. > [!NOTE] > > Attribution currently covers vector DB retrieval and web search tool results. Custom tools and sub-agents are not in scope for this release. ## Parallel tool execution for agents Improvement Supported on UI API SDK SeekrFlow agents now support parallel execution of tool plans, improving efficiency for runs that involve multiple independent tool calls. The planner can express execution dependencies between steps, so tool calls without dependencies are executed concurrently. **Capabilities:** * Planner-generated execution plans support dependency-aware step ordering * Independent tool calls can be executed in parallel rather than strictly sequentially * Executor automatically resolves execution order based on planner-defined dependencies This improves the efficiency of agent runs that require multiple tool invocations, particularly when steps can be performed independently. **February 2026** ## Preference tuning (DPO) Feature Supported on UI API SDK Model alignment using direct preference optimization (DPO), training models from comparison data rather than ground truth or reward functions. Preference tuning trains models to increase the likelihood of generating preferred responses over rejected ones. **Capabilities:** * Upload preference datasets containing prompt, chosen response, and rejected response * Automatic schema validation on upload * Optional `beta` hyperparameter to control KL-divergence strength * Compatible with all base models supported by SeekrFlow * Training loss tracking identical to supervised fine-tuning Preference tuning supports alignment for subjective criteria like brand tone, compliance standards, and customer experience preferences where correctness is context-dependent. > [!NOTE] > > Preference datasets must be user-provided. The AI-ready data engine does not > yet generate preference datasets. ## Reinforcement tuning reward functions Feature Supported on UI API SDK Configurable reward functions for reinforcement tuning jobs, enabling users to control which behaviors get reinforced during training. Reward functions are built from graders—individual scoring operations that can be used alone or combined into weighted, linear rewards. **Capabilities:** * Grader types: math accuracy, string check, and text similarity * Reward composition: single grader or weighted linear combination of multiple graders * Optional format reward weight to control `` / `` formatting enforcement * Built-in weight validation and normalization This release also rebrands "GRPO" to "Reinforcement Tuning" in the API and SDK. Reward functions enable customers to explicitly reinforce task-specific objectives like correctness, policy adherence, or stylistic consistency, establishing the foundation for future evaluation platform capabilities. **January 2026** ## Vision-language fine-tuning Feature Supported on UI API SDK Instruction fine-tuning for vision-language models (VLMs) that reason jointly over images and text. Users can now fine-tune multimodal models using datasets combining visual inputs and natural language through the same fine-tuning workflows used for text-only models. **Capabilities:** * Upload and validate vision-language datasets with messages-based schema and image support * Fine-tune supported VLMs: `Qwen2.5-VL-7B-Instruct` and `Llama-3.2-11B-Vision-Instruct` * Automatic schema validation and seamless job creation * Standard instruction tuning workflow with no separate multimodal configuration required > [!NOTE] > > This release supports instruction tuning only. Reinforcement learning and > preference tuning are not yet supported for vision-language models. ## Tools library Feature Supported on UI API SDK Centralized workspace for managing agent tools across your organization. The tool library serves as a single source of truth where users can create, update, delete, and duplicate tools independently of agent configuration. **Capabilities:** * Create and manage web search and file search tools with custom configurations. * View code interpreter and custom function tools (read-only). * Duplicate existing tools to create variations with modified configurations. * Automatic propagation of tool updates to all agents using that tool. * Select pre-created tools during agent creation or create new tools inline. * Query tools by type and status, and view which agents are using specific tools. Tool changes automatically redeploy linked active agents to reflect updates across your organization. ## Ingestion insights Feature Supported on UI API SDK Real-time visibility into file ingestion status across Alignment and VectorDB endpoints. Every uploaded file receives its own persistent ingestion record that tracks progress through conversion, alignment, and vectorization. **Capabilities:** * Per-file status tracking (queued, running, completed, failed) with queue position and timestamps. * Plain-language error messages with suggested fixes. * Structured metadata through file_records view showing which files are processing, completed, or blocked. * Consistent response schema across Alignment and VectorDB endpoints. This visibility layer enables faster self-service debugging and reduces support escalations during onboarding, proofs of concept, and production workflows. ## Multi-node fine-tuning Feature Supported on UI API SDK Distributed training across multiple compute nodes for improved fine-tuning performance and scalability. Multi-node fine-tuning distributes training jobs across multiple physical nodes (each with 8 GPUs), enabling parallel execution rather than single-machine training. **Capabilities:** * Support for 1–4 nodes (up to 32 GPUs total) * Configure node count via n_node parameter in InfrastructureConfig * Automatic distributed orchestration and synchronization * Immediate validation of supported n_node / n_accel combinations This enables reduced training time for larger datasets, better compute allocation matching dataset size and training needs, and establishes the foundation for future support of larger models. # Components Source: https://docs.seekr.com/flow/components Detailed overview of SeekrFlow's key components and architecture. This section provides conceptual information about SeekrFlow's core components and how they work together to enable end-to-end AI development. ## Understanding components SeekrFlow components are the building blocks of the platform. Each component serves a specific purpose in the AI development lifecycle, from preparing data to deploying production models. Understanding how these components work—both individually and together—helps you design effective AI solutions. ## Core components > [card] [Models](/flow/components/models) > > The catalog of generative and embedding models available on the platform, with each model's type, capabilities, and country of origin. You select a model when you configure an agent, start a fine-tuning job, or create a vector database. > > **When to use:** Choosing which model to run an agent on, fine-tune, or build a vector database with. > [card] [Agents](/flow/components/agents) > > Configurable AI systems that reason through problems and execute tasks autonomously. Agents combine models and tools to handle everything from simple workflows to complex, open-ended objectives. > > **When to use:** Building AI systems that need to make decisions, use tools, and take actions to accomplish goals. > [card] [Data engine](/flow/components/data-engine) > > Transforms raw content into structured, AI-ready datasets for training and retrieval. Includes file storage, vector databases, and automated data preparation workflows. > > **When to use:** Preparing your data before fine-tuning models or creating retrieval systems for agents. > [card] [Fine-tuning](/flow/components/fine-tuning) > > Automates the creation of training datasets to adapt pre-trained models to specific domains or use cases. Supports instruction fine-tuning, reinforcement tuning, and preference tuning. > > **When to use:** Customizing model behavior for domain-specific knowledge or specialized tasks. > [card] [Deployments](/flow/components/deployments) > > Launch, monitor, and manage model endpoints for real-time inference. Provides deployment automation and production monitoring dashboards. > > **When to use:** Making trained or fine-tuned models available for production use. > [card] [Explainability](/flow/components/explainability) > > Understand model outputs by tracing responses to the sources and training data that influenced them. Surfaces which retrieved context or training examples contributed to specific model responses. > > **When to use:** Debugging model outputs, auditing decisions, or building trust in AI systems. > [card] [Content moderation](/flow/components/content-moderation) > > Evaluate text safety and brand risk with specialized moderation models including Seekr ContentGuard and Meta Llama Guard. > > **When to use:** Assessing content safety, brand suitability, or policy compliance. > [card] [Observability](/flow/components/observability) > > Monitor agent performance by capturing a record of every run, including timing, model usage, token consumption, and errors. > > **When to use:** Monitoring agent health, investigating failed runs, or understanding usage and costs. ## How components work together A typical AI development workflow connects multiple components: 1. **Models** – Choose a generative or embedding model from the catalog 2. **Data engine** – Upload and prepare your source data 3. **Fine-tuning** – Train models with your prepared data (optional) 4. **Deployments** – Deploy trained models for inference 5. **Agents** – Build AI systems using deployed models and tools 6. **Explainability** – Understand and validate model outputs 7. **Content moderation** – Ensure outputs meet safety standards 8. **Observability** – Monitor agent performance and investigate runs Not every workflow uses all components. Simple use cases might only use agents with base models, while complex enterprise applications might leverage the full platform. # Agents Source: https://docs.seekr.com/flow/components/agents Configurable AI systems that reason through problems and execute tasks autonomously. Supported on UI API SDK An agent is an AI system that reasons through problems and executes tasks autonomously. Agents are configured by specifying models, tools, instructions, and reasoning approach—providing everything needed to accomplish tasks from simple workflows to complex, open-ended objectives. > [card] [Agents UI guide](/flow/app/agent-builder) > > Create and manage agents through the SeekrFlow web interface. > [card] [Agents SDK guide](/flow/sdk/agents) > > Create and manage agents programmatically with the Python SDK. ## Agent primitives Agents are built from two core primitives: > [card] [Models](/flow/components/models/generative-models) > > A model serves as the agent's cognitive engine, providing the reasoning capabilities needed to understand tasks, determine the best course of action, and generate responses. SeekrFlow supports both base models and fine-tuned models. > [card] [Tools](/flow/components/agents/tools) > > Tools are modular components that extend an agent's capabilities beyond built-in reasoning. With tools, agents can take actions, access external systems, or query knowledge stores. ## Agent configuration When creating an agent, you configure several key properties: | Property | Description | | - | - | | **Name** | Identifier for the agent | | **Instructions** | System prompt that guides how the agent operates and generates its response (also called developer message) | | **Model** | Which model to use for generating responses (can be a base model or fine-tuned model) | | **Tools** *(optional)* | Which tools the agent can access | | **Reasoning effort** *(optional)* | Controls how much reasoning the agent uses. Default is `medium`. | | **Temperature** *(optional)* | Controls the predictability of the agent's reasoning. Lower values produce more consistent results, and higher values introduce more variation. Default is `0.6`. | ## Reasoning effort Reasoning effort controls how much reasoning the agent uses when working through a request. The default is `medium`. | Level | Description | | - | - | | **Low** | Prioritizes speed. Best for simple, latency-sensitive tasks with a small tool set. | | **Medium** | Balances speed and thoroughness. A good starting point for most use cases. | | **High** | Prioritizes thoroughness. Best for complex workflows with many tools where accuracy matters more than speed. | ## Agent status Each agent has a status that indicates its deployment state: | Status | Description | | - | - | | **Active** | Ready to serve requests | | **Pending** | Transitioning between states. Either recently promoted and moving to active, or recently demoted and moving to inactive. | | **Updating** | An update is in progress. Returns to active once changes take effect. | | **Inactive** | Not currently deployed. Must be promoted before serving requests. | | **Failed** | Deployment failed. The agent cannot serve requests. To recover, address the issue and promote the agent manually. | > [!NOTE] > > An agent is demoted to **Inactive** after two weeks of inactivity. Creating, deploying, or running an agent resets the two-week period, but updating one does not. The agent's definition is retained. Promote the agent to deploy it again and return it to **Active**. ## Multi-agent workflows Agents can delegate subtasks to other agents using the agent-as-tool pattern. A supervisor agent remains in control throughout a run, invoking sub-agents as callable tools to handle specialized tasks and then integrating their results into a unified response. This enables composable, multi-agent systems where each agent focuses on a specific capability. For implementation details, see [Agent as tool](/flow/sdk/agents/agent-as-tool). # Tools Source: https://docs.seekr.com/flow/components/agents/tools Supported on UI API SDK Tools extend what agents can do. While models provide reasoning capabilities, tools allow agents to take actions—accessing external systems, querying knowledge stores, executing code, or performing web searches to accomplish tasks. > [card] [Tool Library UI guide](/flow/app/tool-library) > > Create and manage tools through the SeekrFlow web interface. > [card] [Tools SDK guide](/flow/sdk/agents/tools) > > Create and manage tools programmatically with the Python SDK. ## How tools work When an agent receives a task, it evaluates which tools (if any) are needed and invokes them autonomously based on its instructions and the input. Each tool includes a description that helps the agent understand when and how to use it. Agents can use multiple tools within a single task to accomplish complex objectives. ## Tool configuration In the UI, tools are configured when creating or updating an agent. The agent has access only to the tools explicitly provided during configuration. The selection of which specific tools to invoke for any given task is determined by the agent based on its instructions and the task requirements. ## Tool library The tool library is a centralized workspace where you create and manage tools independently of agents. Instead of defining tools inline during agent creation, you create tools in the library and then link them to agents by tool ID. This approach lets you: * **Reuse tools** across multiple agents without duplicating configuration. * **Update a tool once** and have the change propagate to all agents using it. * **Manage tools centrally** — create, retrieve, list, update, duplicate, and delete tools from a single workspace. * **View linked agents** to see which agents use a given tool before making changes. ## Available tools SeekrFlow provides several tools for agents: | Tool | Description | Best for | | - | - | - | | [FileSearch](/flow/sdk/agents/filesearch-tool) | Semantic search and retrieval across vector databases. Results include source tracing fields (`chunk_id`, `page`, `lines`, `section`) for full provenance tracing back to the original uploaded file. | RAG applications, internal documentation search, knowledge base queries | | [WebSearch](/flow/sdk/agents/websearch-tool) | Real-time information retrieval from web sources | Research tasks, fact-checking, trend analysis, current events | | [Custom Tools](/flow/sdk/agents/custom-tools) | Developer-defined Python functions for specialized business logic, with built-in code execution for data analysis, calculations, and visualizations | External system integrations, proprietary data access, data analysis, specialized workflows | | [Agent as Tool](/flow/sdk/agents/agent-as-tool) | Delegate subtasks to another agent and return the result to the supervisor | Multi-agent workflows, task decomposition, specialized sub-agents | | [MCP connector](/flow/sdk/agents/mcp-connector) | Connect to external MCP providers through a secure gateway with OAuth-based authentication | Third-party service integrations, external data sources, cross-platform workflows | # Content moderation Source: https://docs.seekr.com/flow/components/content-moderation Evaluate text safety and brand risk with specialized moderation models. Supported on UI API SDK Content moderation provides access to specialized models for evaluating text safety and brand risk. These models classify content across various safety categories, supporting use cases from general-purpose text moderation to domain-specific brand safety assessment. ## Available models SeekrFlow provides multiple content moderation models for different content types and contexts: ### Seekr ContentGuard ContentGuard is a purpose-built model for podcast transcript analysis. It evaluates diarized audio chunks for brand safety risk and civility scores. **Classification types:** * GARM brand safety (13 categories) * Civility and hostility scoring **Best for:** Podcast content moderation, brand safety assessment for spoken audio content ### Meta Llama Guard 3 Llama Guard 3 is a general-purpose text moderation model supporting all content types. It classifies text using the MLCommons 22-category taxonomy. **Classification types:** * Safe/unsafe binary classification * MLCommons taxonomy (22 categories) **Best for:** LLM output filtering, agent guardrails, general text moderation ## Use cases Content moderation supports several workflows: **LLM guardrails** – Filter agent outputs and user inputs for safety violations **Brand safety** – Assess content suitability for brand association and advertising **Compliance** – Screen content for regulatory requirements and platform policies **User protection** – Detect harmful content in user-generated text ## Model selection Choose models based on content type and classification needs: | Content type | Recommended model | | - | - | | Podcast transcripts | Seekr ContentGuard | | LLM outputs | Meta Llama Guard 3 | | User-generated text | Meta Llama Guard 3 | | Brand safety scoring | Seekr ContentGuard | ## Integration Content moderation models are deployed as endpoints and accessed through the SeekrFlow API. Models accept text input and return classification results with category labels and confidence scores. # Data engine Source: https://docs.seekr.com/flow/components/data-engine Transform raw content into structured, AI-ready datasets for training and retrieval. Supported on UI API SDK The data engine transforms raw content into structured, AI-ready data. It manages the complete data lifecycle from file ingestion through preparation for training and retrieval workflows. ## Core capabilities The data engine provides two primary functions: > [card] [Storage](/flow/components/data-engine/storage) > > Storage manages raw content through file ingestion and vector database creation, with ingestion insights that surface real-time processing status and diagnostics. Vector databases transform these files into searchable knowledge bases through chunking and embedding, with support for user-defined chunk metadata. > [card] [AI-ready data](/flow/components/data-engine/ai-ready-data) > > AI-ready data generates and transforms datasets, converting raw content into training-ready formats. These jobs produce structured outputs optimized for model fine-tuning and alignment, including standard instruction datasets and context-grounded datasets. ## Data workflow The typical data engine workflow: **Step 1** Upload raw content files to storage. **Step 2** Create vector stores for retrieval applications. **Step 3** Generate AI-ready datasets from selected files. **Step 4** Use outputs for fine-tuning, agent knowledge bases, or evaluations. ## Integration points Data engine outputs integrate across SeekrFlow: * **Fine-tuning** – AI-ready datasets feed model training pipelines * **Agents** – Vector stores power FileSearch tool for knowledge retrieval * **Evaluations** – Structured datasets support model testing and validation # AI-ready data Source: https://docs.seekr.com/flow/components/data-engine/ai-ready-data Generate structured training datasets from raw content for model fine-tuning. Supported on UI API SDK AI-ready data generates and transforms datasets, converting raw content into training-ready formats. These jobs produce structured outputs optimized for model fine-tuning and alignment. ## How it works The AI-ready data pipeline transforms uploaded files into structured training datasets: **Step 1** **File selection** – Choose source files from storage to use as training material **Step 2** **Dataset type selection** – Specify the type of dataset to generate based on fine-tuning method **Step 3** **Generation** – The system processes files and creates structured question-and-answer pairs or training examples **Step 4** **Output** – Generated datasets are saved in formats compatible with fine-tuning workflows ## Integration with fine-tuning AI-ready datasets feed directly into fine-tuning workflows: * **Instruction fine-tuning** – Standard instruction datasets train models on task-specific examples * **Context-grounded datasets** – Question-and-answer pairs grounded in your source documents * **Dataset quality** – Higher quality source content and generation produces better fine-tuned models The data engine automates the transition from raw files to training-ready datasets, reducing manual dataset preparation effort. ## Datasets for fine-tuning AI-ready data supports multiple dataset formats aligned to fine-tuning methods: ### Instruction fine-tuning Standard instruction datasets consist of traditional question-and-answer pairs aligned to task-specific instructions. Each example demonstrates how the model should respond to particular queries or prompts. **Structure:** * **Input** – The question, prompt, or instruction * **Output** – The expected response or completion **Use cases:** * Teaching domain-specific knowledge * Customizing response style and tone * Training task-specific behaviors These datasets are used with instruction fine-tuning to embed knowledge directly into model parameters. ### Context-grounded datasets > [!WARNING] > > Context-grounded fine-tuning stops working on November 9, 2026. You can keep using the `context_grounded_files` and `context_grounded_vector_db` data jobs to generate these datasets until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). Context-grounded datasets consist of question-and-answer pairs that reference source documents. Each example includes the query, relevant context from source files, and the correct response grounded in that context. **Structure:** * **Query** – The question or prompt * **Context** – Relevant excerpts from source documents * **Response** – Answer derived from the provided context **Use cases:** * Generating question-and-answer pairs grounded in source documents * Building evaluation sets traceable to source material * Creating datasets for domains where answers must stay tied to provided context These datasets are used for fine-tuning. ## Generation parameters Dataset generation can be configured with parameters that control output characteristics: * **Number of examples** – How many training pairs to generate from source content * **Diversity settings** – Controls for question variety and coverage across source material * **Quality filters** – Criteria for ensuring generated examples meet minimum standards ## Dataset quality Generated datasets are optimized for training effectiveness: * **Relevance** – Questions and answers are derived from actual source content * **Consistency** – Output format matches fine-tuning requirements * **Coverage** – Examples span the breadth of source material * **Validation** – Generated datasets can be reviewed before use in training ## Dataset management AI-ready datasets are managed alongside other data engine outputs: * **Status tracking** – Monitor generation job progress * **Review** – Inspect generated examples before fine-tuning * **Versioning** – Maintain multiple dataset versions from the same sources * **Export** – Download datasets in standard formats # Storage Source: https://docs.seekr.com/flow/components/data-engine/storage Upload files and create vector databases for training and retrieval workflows. Supported on UI API SDK Storage covers two things: the files you upload, and the vector databases built from them. Files are the source material and remain available on their own. A vector database is derived from those files by splitting them into chunks and converting each chunk into a vector, which is what makes semantic search possible. ## File storage File storage manages the upload, processing, and organization of raw content. The system ingests documents in multiple formats, extracts text and structure, and maintains files throughout their lifecycle as source material for downstream workflows. ### How it works The file storage system handles the complete ingestion pipeline: **Step 1** **Upload** – Files are uploaded through the UI, API, or SDK **Step 2** **Processing** – The system extracts text content and document structure **Step 3** **Storage** – Processed files are stored with metadata and status tracking **Step 4** **Access** – Files remain available for vector database creation and dataset generation When files are ingested into a vector database, provenance metadata is captured automatically for every chunk: line numbers, character offsets, heading hierarchy, and source page number. This enables full lineage tracing from a model output back to the exact location in the original uploaded file. ### Supported formats File storage accepts multiple document formats: * PDF * DOCX * JSON * Markdown * TXT The system automatically detects file types and applies appropriate processing for content extraction. ### File metadata Each uploaded file maintains metadata throughout its lifecycle: * **File ID** – Unique identifier for the file * **Filename** – Original file name * **Status** – Processing state (queued, running, completed, failed) * **Size** – File size in bytes * **Upload timestamp** – When the file was added to storage * **Content type** – Specified file type ### File organization Files can be organized and managed through: * **Listing** – Retrieve all files or filter by status and metadata * **Retrieval** – Access individual files by ID * **Deletion** – Remove files no longer needed ### File usage Files maintain tracked relationships to the resources that depend on them. These relationships support dependency awareness and data lineage across the platform: * **Vector databases** – Which vector databases have ingested this file * **Data jobs** – Which data jobs reference this file as source content * **Derived files** – Which files were produced from this file during processing (for example, alignment outputs) Use file usage to understand downstream impact before deleting a file, or to trace how source content flows through the platform. ### Ingestion insights > Available through the API and SDK. Ingestion insights provide real-time visibility into what happens after files are uploaded for processing. Each ingestion job exposes structured metadata that tracks progress and surfaces diagnostics when issues occur. Every ingestion job includes: * **Job state** – The current stage of processing: queued, running, completed, or failed * **Timestamps** – When each state transition occurred * **Per-file tracking** – Individual status records for each file in the job * **Error diagnostics** – When a file fails, a specific error code, plain-language message, and suggested fix are provided Ingestion insights apply to both alignment ingestion and vector database ingestion, with a consistent response structure across both. For implementation details, error codes, and code examples, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). ## Vector databases Vector databases (also called vector stores) store document embeddings for semantic search and retrieval. They transform raw files into searchable knowledge bases by chunking documents and generating embeddings for each segment, allowing agents to find relevant information based on meaning rather than keyword matching. ### How it works The vector database creation process: **Step 1** **File selection** – Choose which files to include in the vector database. **Step 2** **Chunking** – Documents are split into segments based on configurable parameters. **Step 3** **Embedding generation** – Each chunk is converted into a vector representation using a specialized embedding model. See [Embedding models](/flow/components/models/embedding-models) for the available models and their attributes. **Step 4** **Storage** – Embeddings and their associated text are stored for retrieval. **Step 5** **Search** – Queries are embedded and compared against stored vectors to find semantically similar content. ### Chunking strategy Document chunking determines how files are segmented before embedding. Proper chunking ensures that retrieved segments contain complete, coherent information relevant to queries. SeekrFlow supports multiple chunking methods to optimize retrieval for different document types and use cases: **Sliding window chunking** Creates fixed-size segments with configurable token counts and overlap between adjacent chunks. This method provides consistent chunk sizes and ensures context continuity across boundaries. * **Chunk size** – Number of tokens per segment (default: 512) * **Overlap** – Tokens shared between adjacent chunks (default: 50) **Best for:** General-purpose retrieval when documents lack clear structural boundaries. **Markdown chunking** Splits documents at markdown structural elements (headers, sections, lists). This method preserves logical document organization and keeps related content together. **Best for:** Technical documentation, structured reports, and content with clear hierarchical organization. **Semantic chunking** Analyzes content meaning to identify natural topic boundaries and groups semantically related information into chunks. This method creates variable-size segments based on conceptual coherence rather than fixed token counts. **Best for:** Long-form content, narrative documents, and materials where maintaining topical coherence is critical for retrieval quality. ### Embedding models Vector databases use specialized embedding models to convert text into vector representations. These models are trained to encode semantic meaning, allowing similarity comparisons between queries and document chunks. The embedding dimension and model choice affect: * **Retrieval accuracy** – How well the system identifies relevant content * **Storage requirements** – Vector database size based on embedding dimensions * **Search speed** – Query performance relative to database size and embedding complexity ### Semantic search Vector databases power semantic search capabilities: * **Meaning-based retrieval** – Find content based on conceptual similarity rather than exact keyword matches * **Ranked results** – Return chunks ordered by relevance to the query * **Context preservation** – Retrieve coherent segments that maintain document structure * **Multi-document search** – Query across all files attached to the vector store ### User-defined metadata Beyond the provenance metadata captured automatically during ingestion, you can attach your own structured business fields to chunks, such as `year`, `doc_type`, or `department`. Attach metadata when you ingest files, then list and filter chunks by those fields or edit the metadata in place afterward. For metadata rules, filter operators, and code examples, see [Manage chunk metadata](/flow/sdk/data-engine/manage-chunk-metadata). ### Vector store management Vector databases can be managed through: * **Creation** – Build new vector stores from selected files * **File attachment** – Add additional files to existing vector stores * **Status monitoring** – Track processing progress for vector database creation * **Integration** – Connect vector stores to agent FileSearch tools ### Vector database usage Vector databases maintain tracked relationships to the resources that depend on them: * **Tools** – Which FILE_SEARCH tools are configured to query this vector database * **Data jobs** – Which data jobs reference this vector database Use vector database usage to check whether a vector store is actively in use before deleting it, or to trace which agents are backed by a given knowledge base. ### Use cases Vector databases support several key workflows: **Retrieval-augmented generation (RAG)** Agents use vector databases to find relevant context before generating responses. The FileSearch tool queries vector stores to retrieve document segments that inform the agent's output. **Knowledge base search** Internal documentation, policies, and reference materials become searchable by meaning. Users can ask questions in natural language and receive relevant information from document collections. **Semantic discovery** Find related content across large document sets without knowing exact keywords. Vector databases surface conceptually similar information that traditional search might miss. ## Integration with other components Storage integrates across SeekrFlow: * **Agents** – FileSearch tool queries vector databases for knowledge retrieval * **Fine-tuning** – Files serve as source content for training dataset generation * **Evaluations** – Test agent performance on knowledge retrieval tasks using vector stores # Deployments Source: https://docs.seekr.com/flow/components/deployments Launch, monitor, and manage model endpoints for real-time inference. Supported on UI API SDK Deployments create and manage model endpoints for real-time inference. A deployment hosts a model (base or fine-tuned) on dedicated compute infrastructure, making it available for API requests, agent usage, or application integration. > [card] [Deployments UI guide](/flow/app/deployments) > > Create and manage deployments through the SeekrFlow web interface. > [card] [Deployments SDK guide](/flow/sdk/deployments) > > Create and manage deployments programmatically with the Python SDK. ## How deployments work Deployments provision model endpoints with specified compute resources. Once active, deployed models serve inference requests through the SeekrFlow API. Deployments can be paused to stop serving traffic or deleted to free resources. ## Deployment configuration When creating a deployment, you configure: * **Model selection** – Choose a base model or fine-tuned model checkpoint * **Compute resources** – Specify instance count and hardware allocation * **Endpoint details** – Define deployment name and description for identification ## Deployment status Each deployment has a status indicating its current state: | Status | Description | | - | - | | Pending | Deployment requested, provisioning infrastructure | | Active | Serving inference traffic | | Inactive | Paused, not serving requests | | Failed | Error during startup or runtime | ## Using deployed models Active deployments are accessed through two methods: * **Agent integration** – Reference deployed models in agent configurations to give agents access to specific model capabilities * **API endpoints** – Make direct inference calls via deployment endpoints to integrate models into custom applications or workflows ## Deployment management Deployments support lifecycle operations: * **Pause** – Stop serving traffic while preserving the endpoint * **Resume** – Reactivate an inactive deployment * **Delete** – Remove the deployment and free allocated resources ## Monitoring Track deployment performance through: * Token usage metrics (input and output) * Active hours and uptime * Event timeline showing deployment lifecycle events # Explainability Source: https://docs.seekr.com/flow/components/explainability Understand model outputs by tracing responses to the sources and training data that influenced them. Supported on UI API SDK Explainability traces model responses back to their origins—whether retrieved context in an agentic workflow or training examples from fine-tuning. This allows you to see which inputs influenced specific outputs. Context attribution is available in Agent Chat, the API, and the SDK. Training data attribution is available in the API and SDK only. ## Use cases **Debugging** – Identify which inputs drove unexpected or incorrect outputs. This helps locate problematic data sources or training examples. **Auditing** – Document how AI systems reach decisions. Explainability provides traceable links between outputs and source materials for compliance and verification. **Dataset refinement** – Analyze influential inputs to identify gaps or issues in your retrieval sources or training data. ## Attribution capabilities SeekrFlow provides two attribution capabilities for different workflows: > [card] [Context attribution](/flow/components/explainability/context-attribution) > > Identifies which retrieved sources influenced an agent's response. Traces statements back to vector database content, web search results, tool outputs, and conversation context. > > **When to use:** Agents with RAG, web search, or tools. > [card] [Training data attribution](/flow/components/explainability/training-data-attribution) > > Identifies which training examples influenced a fine-tuned model's response. Traces outputs back to specific question-answer pairs from the training dataset. > > **When to use:** Fine-tuned models. > [card] [Source tracing](/flow/components/explainability/source-tracing) > > Identifies the exact location in the source document that a retrieved chunk came from. Traces responses back to the specific file, page, and lines the agent retrieved. > > **When to use:** Agents with RAG where document-level proof of origin is required. ## Choose the right capability | Workflow | Attribution type | What it traces | | - | - | - | | Agents with RAG, web search, or tools | context attribution | Retrieved sources that influenced each statement | | Fine-tuned models | training data attribution | Training examples that shaped model behavior | | Agents with RAG | source tracing | Exact location in the source document for each retrieved chunk | If you use a fine-tuned model within an agent that also retrieves context, both capabilities can apply—context attribution for retrieval influence, training data attribution for fine-tuning influence. # Context attribution Source: https://docs.seekr.com/flow/components/explainability/context-attribution Identify which retrieved sources influenced an agent's response. Supported on UI API SDK Context attribution identifies which retrieved sources influenced each statement in an agent's response. It traces outputs back to vector database content, web search results, tool outputs, agent instructions, and conversation context. > [card] [Context attribution UI guide](/flow/app/understand-a-response) > > Run source trace on agent responses in Agent Chat. > [card] [Context attribution SDK](/flow/sdk/explainability/context-attribution) > > Retrieve attribution results programmatically using the Python SDK or REST API. ## How context attribution works Context attribution identifies which sources shaped an agent's response and to what degree. It works by testing how the response changes when different sources are removed. Sources that cause the biggest changes receive higher influence scores. The process works at statement-level granularity, so each sentence in the response is analyzed independently against the available sources. ## Source types Context attribution can trace influence from multiple source types: | Source type | Description | | - | - | | Vector database | Content retrieved from your knowledge bases | | Web search | Results from web search tool calls, including search result snippets and full fetched page content | | Tool outputs | Responses from other tools the agent called | | MCP tool responses | Responses from MCP (Model Context Protocol) tool calls, such as issue trackers or CRMs, and from sub-agents the agent invoked as tools | | Agent instructions | Segments of the agent's system prompt, including instructions, persona definitions, and behavioral constraints | ## Influence scores Each source receives an influence score indicating how strongly it affected a given statement. Higher scores mean the model relied more heavily on that source when generating the statement. Influence is measured by observing how the model's output changes when a source is removed. Sources that cause significant changes when removed receive higher influence scores. ## When to use context attribution Context attribution is useful when you need to: * **Verify grounding** — Confirm that agent responses are based on retrieved sources rather than prior model knowledge * **Debug retrieval** — Identify when irrelevant or incorrect sources are influencing outputs * **Audit responses** — Document which sources contributed to specific statements for compliance requirements * **Improve retrieval quality** — Analyze patterns in influential sources to refine your knowledge base or retrieval configuration ## Relationship to source tracing Context attribution and source tracing are complementary but distinct. Context attribution measures the *degree of influence* each source had on a response. Source tracing identifies the exact file, page, and lines every retrieved chunk came from. For chunk-level lineage, see [Source tracing](/flow/sdk/explainability/source-tracing). ## Limitations Context attribution identifies correlation between sources and outputs, but does not guarantee causal relationships in all cases. Statements with low influence scores across all sources may indicate the model relied on its prior knowledge rather than retrieved context. # Source tracing Source: https://docs.seekr.com/flow/components/explainability/source-tracing Trace retrieved chunks to their exact location in the original source document. Supported on UI API SDK > [card] [Source tracing](/flow/sdk/explainability/source-tracing) > > Trace retrieved chunks to their source document programmatically. ## How source tracing works When a file is ingested into a vector database, the system records the exact location of every chunk within the source document, including its position within the heading structure and, for page-based formats, its source page. When an agent retrieves a chunk using file search, this location information travels with the result, giving you a direct path from the agent's response back to the original file. ## When to use source tracing * **Auditability** – Verify that agent responses came directly from your uploaded documents * **Compliance** – Produce document-level proof of origin for regulated environments * **Chain of custody** – Follow a response from model output to the exact location in the source file ## Relationship to context attribution Context attribution measures the degree of influence each source had on a response. Source tracing identifies where in the source document a retrieved chunk came from. They are complementary: attribution tells you what shaped the response, source tracing proves exactly where in the document it came from. # Training data attribution Source: https://docs.seekr.com/flow/components/explainability/training-data-attribution Identify which training examples influenced a fine-tuned model's response. Supported on UI API SDK Training data attribution surfaces the training data that influenced fine-tuned model outputs. By tracing model responses back to specific question-answer pairs from the training dataset, it helps debug model behavior and audit responses. > [card] [View influential data](/flow/app/test-a-model#view-influential-training-data) > > See which training examples shaped a response in Model Chat. > [card] [Training data attribution SDK](/flow/sdk/explainability/training-data-attribution) > > Retrieve influential fine-tuning examples programmatically using the Python SDK or REST API. ## How training data attribution works When a fine-tuned model generates a response, training data attribution identifies the most influential training examples that shaped that output. Each influential example receives an influence level (high, medium, or low) indicating its contribution to the model's response. ## Requirements Training data attribution is available for: * Fine-tuned models created through SeekrFlow * Models trained after September 22, 2025 * Deployed models with active endpoints > [!NOTE] > > In the UI, training data attribution is available in Model Chat. It is not available in Agent Chat, including when a fine-tuned model underlies the agent. > [!NOTE] > > Training data attribution isn't available for preference or reinforcement fine-tunes. This includes continued fine-tunes that use either method. ## Influence levels Training examples are ranked by their influence on model outputs: | Level | Description | | - | - | | High | Training example strongly shaped the model response | | Medium | Training example had moderate impact on output | | Low | Training example contributed minimally to response | Irrelevant training examples are filtered out and not returned. ## Continued fine-tuned models For a model created with [continued fine-tuning](/flow/components/fine-tuning/continued-fine-tuning), attribution returns only examples from the training data of that model's own training run. It never returns examples from the fine-tunes it builds on. ## When to use training data attribution **Debugging model behavior** – Identify which training examples drive unexpected or incorrect responses **Auditing outputs** – Trace model decisions back to source training data for compliance and verification **Dataset refinement** – Discover patterns in influential training examples to improve fine-tuning datasets ## Traceability Training data attribution responses include file identifiers linking back to source documents. This connects model outputs to original training materials, supporting debugging and dataset updates. # Fine-tuning Source: https://docs.seekr.com/flow/components/fine-tuning Adapt pre-trained models to specific domains through automated dataset creation and training. Supported on UI API SDK Fine-tuning adapts pre-trained models to specific domains or tasks through specialized training. SeekrFlow automates dataset creation, manages training workflows, and deploys fine-tuned models as custom endpoints. > [card] [Fine-tuning UI guide](/flow/app/fine-tuning) > > Create and manage fine-tuning jobs through the SeekrFlow web interface. > [card] [Fine-tuning SDK guide](/flow/sdk/fine-tuning) > > Create and manage fine-tuning jobs programmatically with the Python SDK. ## How fine-tuning works The fine-tuning process adjusts model parameters by training on structured question-and-answer pairs. Models learn from examples that demonstrate desired behaviors, domain knowledge, and specific output patterns. The training produces specialized models with deeper expertise while retaining general capabilities from the base model. ## When to use fine-tuning Fine-tuning provides value when: * Working with proprietary or sensitive information not in base model training data. * Requiring specific output formats, styles, or tones. * Optimizing for tasks more easily demonstrated than described. * Improving accuracy on domain-specific terminology or concepts. * Reducing costs by using smaller specialized models. ## Fine-tuning methods SeekrFlow supports multiple fine-tuning approaches: | Method | Description | Best for | | - | - | - | | [Instruction fine-tuning](/flow/components/fine-tuning/instruction-fine-tuning) | Standard approach that trains models on question-and-answer pairs aligned to task-specific instructions. Embeds domain knowledge directly into model parameters. | Embedding proprietary knowledge, customizing behavior and tone, optimizing for demonstrated tasks | | [Context-grounded fine-tuning](/flow/components/fine-tuning/context-grounded-fine-tuning) | **Deprecated (sunset November 9, 2026).** Training approach that teaches models to access and retrieve information from external knowledge bases during inference. Maintains accuracy with frequently changing information. | Dynamic information that requires real-time updates, maintaining current data without retraining | | [Reinforcement tuning (GRPO)](/flow/components/fine-tuning/grpo) | Teaches the model to judge its own outputs using a reward function that scores generated responses against reference answers, rather than directly imitating target responses. | Improving response quality, aligning outputs with brand voice, reducing unwanted behaviors | | [Preference tuning (DPO)](/flow/components/fine-tuning/preference-tuning) | Learns directly from comparisons between preferred and dispreferred responses, without requiring reference answers or reward functions. | Aligning outputs with subjective quality criteria, organizational standards, human feedback | ## Method comparison | | Best for | Knowledge location | Update mechanism | Retrieval required | Training data | Training cost | Iteration speed | Artifact size | | - | - | - | - | - | - | - | - | - | | **Instruction** | Static domain knowledge | Model parameters | Retrain model | No | QA pairs | High (full) | Slow | Large (full model) | | **Context-grounded** | Dynamic information | External knowledge base | Update knowledge base | Yes | QA pairs + knowledge base | High (full) | Slow | Large (full model) | | **Reinforcement tuning** | Quality alignment (verifiable) | Model parameters | Retrain model | No | Prompts + reference answers | High (full) | Slow | Large (full model) | | **Preference tuning** | Quality alignment (subjective) | Model parameters | Retrain model | No | Preferred/rejected response pairs | High (full) | Slow | Large (full model) | ## Recommended approach Most fine-tuning projects should: * Start with LoRA + instruction fine-tuning as the default approach. * Use reinforcement tuning or preference tuning when quality alignment is needed. * Consider full fine-tuning only after LoRA experiments show it's necessary. These recommendations balance training efficiency with model quality while minimizing upfront investment. ## Low-rank adaptation (LoRA) [Low-rank adaptation (LoRA)](/flow/components/fine-tuning/lora) is a parameter-efficient optimization technique that can be applied to any of the fine-tuning methods above. Rather than updating all model weights during training, LoRA trains small adapter modules, enabling faster training with lower compute costs while preserving base model knowledge. LoRA can be used with instruction fine-tuning, reinforcement tuning, or preference tuning to reduce resource requirements and speed up iteration cycles. ## Continued fine-tuning [Continued fine-tuning](/flow/components/fine-tuning/continued-fine-tuning) starts a new fine-tune from a completed fine-tuned model instead of from a base model. The new run resumes from the parent's latest checkpoint and trains on its own data. You can add new data or refine a model with a different training method without retraining from scratch. ## Vision language tuning [Vision language tuning](/flow/components/fine-tuning/vision-language-tuning) extends fine-tuning to models that process both images and text. The training workflow is the same as text-only fine-tuning — the difference is in the input data and model selection. Currently, SeekrFlow supports instruction fine-tuning of vision-language models with the same SDK primitives as text-only training. ## Dataset preparation Fine-tuning requires structured training datasets with question-and-answer pairs. SeekrFlow's data engine automates the creation of training-ready datasets from raw source files, generating examples that demonstrate desired model behaviors and domain knowledge. Learn more: [AI-ready data](/flow/components/data-engine/ai-ready-data) ## Model deployment Fine-tuned models are deployed as custom model endpoints. Once active, fine-tuned models can be used in agents, inference workflows, or any application requiring specialized model behavior. # Context-grounded fine-tuning Source: https://docs.seekr.com/flow/components/fine-tuning/context-grounded-fine-tuning Train models to access and retrieve information from external knowledge bases during inference. Supported on UI API SDK > [!WARNING] > > Context-grounded fine-tuning (also called retrieval-augmented fine-tuning, or RAFT) stops working on November 9, 2026. You can keep using it until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). Context-grounded fine-tuning trains models to effectively use external knowledge bases during inference. Rather than embedding knowledge into model parameters, this approach teaches models to retrieve, evaluate, and synthesize information from provided context. ## How it works The training process teaches models three key capabilities: 1. **Relevance assessment**: Distinguishing between relevant and irrelevant retrieved documents 2. **Information extraction**: Identifying and extracting pertinent information from relevant context 3. **Grounded synthesis**: Generating responses that accurately reflect the provided context while avoiding hallucination Models learn these skills through training examples that pair queries with retrieved context and correct responses. The training emphasizes staying faithful to provided information rather than relying on parametric knowledge. ## When to use context-grounded fine-tuning Context-grounded fine-tuning provides value when: * Working with dynamic information that requires real-time updates without model retraining * Maintaining current data accuracy across large, frequently changing knowledge bases * Building systems where information sources need regular updates or replacements * Requiring explicit source attribution for generated responses * Combining retrieval-augmented generation (RAG) with specialized retrieval behaviors ## Training requirements Effective context-grounded fine-tuning requires: * **Retrieval integration**: Access to the retrieval system and knowledge base used during training and inference * **Representative context**: Training examples with realistic retrieved context, including both relevant and irrelevant documents * **Grounding emphasis**: Examples that demonstrate proper use of provided context and appropriate responses when context is insufficient * **Consistency**: Alignment between training retrieval patterns and production retrieval behavior ## Comparison with other methods Unlike instruction fine-tuning, context-grounded fine-tuning doesn't embed domain knowledge into parameters. This makes it ideal for dynamic information but requires retrieval infrastructure at inference time. Context-grounded fine-tuning can be combined with LoRA for parameter-efficient training of retrieval behaviors. The adapter learns retrieval-specific patterns while the base model provides general language capabilities. This approach works well with RAG systems by teaching models to better utilize retrieved context. The fine-tuning optimizes how models process and synthesize retrieved information. ## Model deployment Context-grounded models are deployed with retrieval systems that provide relevant context at inference time. The model endpoint receives both the query and retrieved context, generating responses grounded in the provided information. # Continued fine-tuning Source: https://docs.seekr.com/flow/components/fine-tuning/continued-fine-tuning Start a new fine-tune from a completed fine-tuned model instead of from a base model. Supported on UI API SDK Continued fine-tuning starts a new fine-tune from a completed fine-tune. The new run trains on its own data with its own settings. You improve a trained model without retraining from scratch. For implementation details and code examples, see the [Continue a fine-tuned model SDK guide](/flow/sdk/fine-tuning/continue-a-fine-tuned-model). ## How it works A continued fine-tune is a new fine-tuning job that builds on a completed fine-tune, called the parent. SeekrFlow always starts the job from the parent's latest saved checkpoint. The new run has its own training data, hyperparameters, and training method. The base model stays the same in every round. You can continue a model for any number of rounds. Each continued fine-tune records its parent. The lineage shows a model's full history, from the run trained on the base model to the latest round, oldest first. Each round has a generation number, and generation 0 is the run trained from the base model. For example output, see [View a fine-tune's lineage](/flow/sdk/fine-tuning/continue-a-fine-tuned-model#view-a-fine-tunes-lineage) in the SDK guide. ## When to use continued fine-tuning Continued fine-tuning provides value when: * Adding new data to a trained model without repeating earlier training * Refining a trained model with a different training method, such as reinforcement or preference tuning * Updating a model as your data changes over time * Building a model in stages, with each round saved as its own fine-tune ## Parent model requirements A fine-tune can serve as a parent when it meets these conditions: * It's completed. Both full fine-tunes and LoRA fine-tunes qualify. * It belongs to your team. * It saved at least one checkpoint during training. ## Continue with LoRA A LoRA fine-tune produces a small add-on called an adapter instead of a full set of model weights. You can continue a LoRA fine-tune with LoRA, and you can continue a full fine-tune with LoRA. SeekrFlow decides what the new run produces. * When you continue a LoRA fine-tune with LoRA, SeekrFlow combines the new adapter with the parent's into one adapter. The combined adapter's rank is the sum of the two. It serves on the base model's shared deployment, like any other LoRA adapter. If the combined adapter is too large for the shared deployment, SeekrFlow merges it into full model weights instead. * When you continue a full fine-tune with LoRA, SeekrFlow merges the new adapter into the full model weights. * Full model weights deploy as their own model. Every later round in that lineage also produces full model weights. A LoRA fine-tune continues only with LoRA. Continued fine-tuning supports plain LoRA. For the supported settings, see [Continue with LoRA](/flow/sdk/fine-tuning/continue-a-fine-tuned-model#continue-with-lora) in the SDK guide. ## Supported training methods You can continue a full fine-tune with any of these methods: * [Instruction fine-tuning](/flow/components/fine-tuning/instruction-fine-tuning) * [Reinforcement tuning (GRPO)](/flow/components/fine-tuning/grpo) * [Preference tuning (DPO)](/flow/components/fine-tuning/preference-tuning) # Reinforcement tuning (GRPO) Source: https://docs.seekr.com/flow/components/fine-tuning/grpo Uses reward functions to reinforce models toward higher-quality responses. Supported on UI API SDK Reinforcement tuning trains models to generate higher-quality responses by scoring candidate outputs and reinforcing preferred behaviors. SeekrFlow implements reinforcement tuning using group relative policy optimization (GRPO). For implementation details including dataset format and code examples, see the [Reinforcement tuning SDK guide](/flow/sdk/fine-tuning/grpo-fine-tuning). > [!NOTE] > > **UI support** > > Reinforcement tuning is available in the UI with mathematical accuracy as a reward function. User-defined reward functions are not currently supported in the UI but are available through the API and SDK. ## How it works Reinforcement tuning operates through a reinforcement learning process: **Step 1** **Generation**: The model generates multiple candidate responses to each prompt. **Step 2** **Evaluation**: A reward function scores each candidate based on quality criteria. **Step 3** **Optimization**: Training gradients push the model toward generating higher-scoring responses. Reward functions use one or more [graders](#available-graders) to score outputs on specific qualities like numerical accuracy, keyword matching, text similarity, or LLM-judged quality. The model learns to maximize expected reward across diverse prompts. ## When to use reinforcement tuning Reinforcement tuning provides value when: * Improving overall response quality beyond what demonstration data captures * Aligning model outputs with subjective preferences or style guidelines * Reducing unwanted behaviors (verbosity, hedging, unsafe content) * Optimizing for measurable quality metrics (accuracy, user satisfaction) * Teaching models to balance multiple competing objectives ## Training requirements Effective reinforcement tuning requires: * **Reward function**: Clear criteria for evaluating response quality through one or more graders * **Diverse prompts**: Training examples covering the range of scenarios where quality preferences apply * **Reference answers**: Answers against which the model can score its generated outputs * **Base model capability**: Strong starting model that can generate reasonable candidates before preference optimization Download a sample dataset to see the expected format, or review the [Reinforcement tuning SDK guide](/flow/sdk/fine-tuning/grpo-fine-tuning) for the full schema. [Download sample dataset](/samples/numina-math-dataset-small.json) ## Reward functions A reward function scores model outputs during training to reinforce desired behaviors. In SeekrFlow, reward functions are built from one or more **graders** — individual scoring operations that each evaluate a specific quality of the output. ### Available graders | Grader | Description | | - | - | | **Numerical accuracy** | Evaluates whether the model output is numerically correct. Useful for financial auditing, math, and other tasks with definite numerical answers. | | **String check** | Evaluates whether the model output contains or matches a specific phrase. Useful for enforcing keyword usage or required terminology. | | **Text similarity** | Evaluates how lexically similar the model output is to the reference answer. Useful for enforcing tone, style, or compliant language. | | **LLM (LLM-as-a-judge)** | Uses an LLM to score how well the output matches the reference answer in meaning and quality. Useful for open-ended or subjective responses where exact or lexical matching is too rigid. | ### Combining graders You can combine multiple graders into a single reward function by assigning weight percentages to each. This creates a hybrid reward signal tailored to your use case. For example, you might weight numerical accuracy at 80% and text similarity at 20% to reward both the mathematical correctness and formatting of the model's answers. For implementation details and code examples, see the [Reinforcement tuning SDK guide](/flow/sdk/fine-tuning/grpo-fine-tuning). ## Comparison with other methods Reinforcement tuning learns quality patterns through reinforcement of high-scoring outputs. Unlike instruction fine-tuning, it doesn't require explicit demonstrations of correct responses. Reinforcement tuning typically follows instruction fine-tuning in training pipelines — the instruction phase teaches domain knowledge, while reinforcement tuning refines response quality and alignment. Reinforcement tuning can be combined with LoRA for efficient training. The adapter learns preference patterns while the base model provides general capabilities, reducing compute requirements without sacrificing quality improvements. ## Model deployment Reinforcement-tuned models are deployed as standard model endpoints. The reinforced model behaviors are embedded in model parameters, so no special inference infrastructure is required. The model generates responses that reflect the learned quality preferences. # Instruction fine-tuning Source: https://docs.seekr.com/flow/components/fine-tuning/instruction-fine-tuning Train models on question-and-answer pairs to embed domain knowledge directly into model parameters. Supported on UI API SDK Instruction fine-tuning trains models on question-and-answer pairs that demonstrate desired behaviors and domain knowledge. The training embeds specialized knowledge directly into model parameters, producing models with deeper expertise in specific domains while retaining general capabilities. ## How it works The process trains models on datasets of input-output pairs aligned to task-specific instructions. Each training example shows the model how to respond to particular types of queries. Through repeated exposure to these examples, the model learns patterns, terminology, reasoning approaches, and response styles specific to the target domain. The trained model internalizes this knowledge into its parameters. At inference time, the model generates responses based on this embedded knowledge without requiring external data sources or retrieval systems. ## When to use instruction fine-tuning Instruction fine-tuning provides value when: * Embedding proprietary or confidential knowledge not available in base model training data * Customizing model behavior, tone, or communication style to match organizational standards * Teaching domain-specific terminology, concepts, or reasoning patterns * Optimizing performance on tasks more easily demonstrated through examples than described through prompts * Creating specialized models that consistently apply learned knowledge without retrieval overhead ## Training requirements Effective instruction fine-tuning requires: * **Dataset quality**: High-quality question-and-answer pairs that accurately represent desired behaviors. Consistency matters more than volume. * **Coverage**: Training examples that span the range of queries and scenarios the model will encounter in production. * **Clarity**: Examples with clear, unambiguous demonstrations of correct responses. * **Representative distribution**: Training data that reflects the actual distribution of use cases. ## Comparison with other methods Instruction fine-tuning embeds knowledge directly into model parameters rather than teaching retrieval behaviors. This makes it ideal for static knowledge but less suitable for frequently changing information. Instruction fine-tuning works by training models to replicate demonstrated answers. Reinforcement tuning (GRPO) takes a different approach, teaching models to evaluate output quality through reward functions. Preference tuning (DPO) learns from comparative judgments between responses without requiring reference answers. Use instruction fine-tuning when you can provide direct examples of desired outputs. Instruction fine-tuning can be combined with LoRA for more efficient training. Full parameter fine-tuning provides maximum flexibility but requires more compute and produces larger artifacts. LoRA enables faster, more cost-effective training by updating only small adapter modules. ## Model deployment Fine-tuned models are deployed as custom model endpoints. Once active, they can be used in agents, inference workflows, or any application requiring the specialized knowledge or behavior. # Low-rank adaptation (LoRA) Source: https://docs.seekr.com/flow/components/fine-tuning/lora Parameter-efficient fine-tuning method that trains small adapter modules instead of all model weights. Supported on UI API SDK Low-rank adaptation (LoRA) is a parameter-efficient fine-tuning method that trains small adapter modules rather than updating all model weights. This approach enables faster training with significantly lower compute costs while preserving base model knowledge. ## How it works LoRA inserts small trainable adapter matrices into model layers while keeping the base model weights frozen. During training, only these adapter parameters are updated. The adapters learn task-specific patterns as low-rank decompositions of weight updates. At inference time, the adapter combines with the base model to compute predictions. Multiple LoRA adapters can be trained from the same base model and swapped dynamically based on the task. The method is controlled by two key parameters: * **Rank**: Determines adapter capacity and the complexity of patterns it can learn. Higher rank supports more complex adaptations but increases training cost. * **Alpha**: Controls how strongly learned patterns influence base model behavior. Higher alpha makes the adapter's influence more pronounced. ## When to use LoRA LoRA provides value when: * Adding new behaviors to a model while preserving underlying knowledge * Requiring faster training and iteration cycles than full fine-tuning * Operating under compute or cost constraints that prohibit full fine-tuning * Maintaining multiple specialized adapters from a single base model * Experimenting with different adaptations before committing to full fine-tuning * Needing smaller model artifacts for easier storage and deployment ## Training characteristics LoRA offers distinct training advantages: * **Speed**: Trains significantly faster than full fine-tuning by updating fewer parameters * **Memory efficiency**: Enables larger batch sizes on the same hardware by keeping base model frozen * **Artifact size**: Produces small adapter files (typically megabytes) rather than full model weights (gigabytes) * **Flexibility**: Supports creating multiple adapters from one base model for different tasks The method works best with consistent, high-quality datasets. LoRA adapters can be more sensitive to noisy or contradictory training data than full fine-tuning. ## Configuration guidance Choosing rank and alpha depends on the task: **For simple adaptations** (style, formatting, tone): * Start with rank 8–16, alpha 16–32 * Lower ranks often sufficient for surface-level changes **For domain adaptation** (specialized terminology, structured outputs): * Start with rank 16–32, alpha 32–64 * Medium ranks handle domain-specific patterns **For complex multi-constraint tasks** (correctness, format, policy, reasoning): * Start with rank 32–64, alpha 64–128 * Higher ranks support multiple simultaneous requirements Most tasks work well with rank 16 and alpha 32 as starting defaults. Adjust based on whether the model learns the desired behavior too weakly (increase alpha) or too rigidly (decrease alpha or rank). ## Comparison with other methods Unlike full instruction fine-tuning, LoRA updates only adapter parameters rather than all weights. This provides faster training and smaller artifacts but may have less capacity for deep knowledge rewrites. LoRA can combine with any fine-tuning method (instruction, reinforcement tuning, preference tuning). The choice of method determines what the model learns; LoRA determines how efficiently those parameters are updated. For most use cases, LoRA offers the best balance of training speed, cost, and model quality. Consider full fine-tuning only when LoRA cannot achieve the desired behavior after parameter tuning. ## Continue a LoRA fine-tune You can continue a completed LoRA fine-tune with LoRA to train it further on new data. When the combined rank stays within what the shared deployment serves, SeekrFlow combines the new adapter with the parent's into a single adapter. Otherwise, SeekrFlow merges the adapter into full model weights. Learn more: [Continued fine-tuning](/flow/components/fine-tuning/continued-fine-tuning#continue-with-lora) ## Model deployment LoRA models are deployed as base model plus adapter. The deployment system loads the frozen base model and applies the appropriate adapter for each request. This architecture enables efficient serving of multiple specialized models from a shared base. # Preference tuning (DPO) Source: https://docs.seekr.com/flow/components/fine-tuning/preference-tuning Align model outputs with human preferences by learning directly from response comparisons. Supported on UI API SDK Preference tuning aligns model behavior by learning from comparisons between responses rather than from explicit correct answers. SeekrFlow implements preference tuning using direct preference optimization (DPO), which trains models to increase the likelihood of generating preferred responses over dispreferred ones. For implementation details including dataset schema and code examples, see the [Preference tuning SDK guide](/flow/sdk/fine-tuning/preference-tuning). ## How it works Preference tuning operates on paired response data. Each training example contains a prompt, a preferred (chosen) response, and a dispreferred (rejected) response. The model learns to distinguish what makes one response better than another and adjusts its generation patterns accordingly. DPO optimizes directly against preference pairs without requiring a separate reward model. This makes it simpler and more stable than traditional RLHF approaches while achieving comparable alignment quality. A key parameter, **beta**, controls the strength of the KL-divergence penalty — how far the tuned model is allowed to deviate from the original base model. Lower beta values allow more deviation, while higher values keep the model closer to its original behavior. ## When to use preference tuning Preference tuning provides value when: * Aligning model outputs with organizational standards such as tone, compliance requirements, or customer experience guidelines * Improving response quality in scenarios where preferences are clear but a single "correct" answer does not exist * Leveraging existing human feedback or editorial judgment as training signal * Refining model behavior without needing explicit reference answers or reward functions ## How it differs from other methods Preference tuning fills a distinct role in the fine-tuning workflow: * **Instruction fine-tuning** teaches models to replicate demonstrated responses. It requires explicit examples of correct outputs. * **Reinforcement tuning (GRPO)** optimizes against a reward function that scores generated responses against reference answers. It requires definite, verifiable answers. * **Preference tuning (DPO)** learns from comparative judgments — which response is better — without requiring gold answers or reward functions. This makes it effective for subjective quality criteria that are difficult to express as rules or metrics. ## Training requirements Effective preference tuning requires: * **Preference dataset**: Paired examples with a prompt, a chosen response, and a rejected response. SeekrFlow's data engine does not currently generate preference datasets, so datasets must be prepared externally. * **Consistent preference signal**: Clear, consistent criteria for what makes one response preferred over another. Noisy or contradictory preferences reduce training effectiveness. * **Base model capability**: A model that already generates reasonable responses. Preference tuning refines quality rather than teaching foundational knowledge. ## Dataset format Each training example contains three components: * **Prompt**: System and user messages that define the context. * **Chosen**: The preferred assistant response. * **Rejected**: The dispreferred assistant response. Datasets must be in JSONL or Parquet format and uploaded with the `preference-fine-tune` file purpose. SeekrFlow validates the schema on upload and rejects datasets that do not conform to the expected structure. ## Model compatibility Preference tuning works with all base models available in SeekrFlow. No model-specific restrictions apply beyond the standard fine-tuning requirements. ## Model deployment Preference-tuned models are deployed as standard model endpoints. The learned preferences are embedded in model parameters, so no special inference infrastructure is required. # Vision language tuning Source: https://docs.seekr.com/flow/components/fine-tuning/vision-language-tuning Fine-tune vision-language models that reason across both images and text. Supported on UI API SDK Vision language tuning fine-tunes models that process both images and text. These vision-language models (VLMs) reason across visual and textual inputs, enabling use cases such as image understanding, visual question answering, and multimodal assistants. For implementation details including dataset schema and code examples, see the [Vision language tuning SDK guide](/flow/sdk/fine-tuning/vision-language-tuning). ## How it differs from text-only fine-tuning Vision language tuning applies fine-tuning to models that process both images and text. The training workflow is the same as text-only fine-tuning — the difference is in the input data and model selection. Currently, SeekrFlow supports instruction fine-tuning of vision-language models using the same SDK primitives as text-only training. The key differences: * Training data must include image inputs alongside text. * The base model must be a vision-language model. * SeekrFlow enforces compatibility between dataset type and model type. Mismatched pairings (a vision dataset with a text-only model, or a text-only dataset with a VLM) are rejected at job creation. ## Supported models SeekrFlow supports fine-tuning the following vision-language models: * `meta-llama/Llama-3.2-11B-Vision-Instruct` * `Qwen/Qwen2.5-VL-7B-Instruct` ## When to use vision language tuning Vision language tuning provides value when: * Building systems that need to interpret images alongside text queries. * Training models to identify, classify, or describe visual content with domain-specific accuracy. * Creating multimodal assistants that answer questions grounded in image data. * Adapting general-purpose VLMs to recognize domain-specific visual patterns, products, or artifacts. ## Training and infrastructure Vision language fine-tuning supports the same infrastructure configurations as text-only fine-tuning, including multi-node setups. Training configuration parameters (epochs, batch size, learning rate, checkpoints) behave identically. Compute requirements are generally higher than text-only fine-tuning due to the additional processing of image inputs. # Models Source: https://docs.seekr.com/flow/components/models Understand the types of models available on SeekrFlow and the attributes the catalog reports for each. Supported on UI API SDK The model catalog lists the models available on SeekrFlow, along with each model's identifier, type, capabilities, and country of origin. You select a model from the catalog when you configure an agent, start a fine-tuning job, or create a vector database. ## Model types The catalog contains two classes of models, distinguished by what they produce. > [card] [Generative models](/flow/components/models/generative-models) > > Produce text as output. These models reason, follow instructions, and generate responses. They serve as an agent's cognitive engine and are the models you fine-tune and deploy for inference. > [card] [Embedding models](/flow/components/models/embedding-models) > > Produce a fixed-length vector of numbers as output, and generate no language. Embedding models turn documents and queries into comparable vectors, which is what makes semantic search in a vector database possible. Both classes include multimodal models, which accept images alongside text, and in some cases audio. A generative vision model describes or reasons about an image, while a multimodal embedding model represents it as a vector. The two classes are not interchangeable. A generative model cannot build a vector database, and an embedding model cannot answer a prompt. Generative models are further classified as `Instruct` or `Base`, depending on whether the model has been instruction-tuned. See [Model types](/flow/components/models/generative-models#model-types). ## Model attributes Every model in the catalog reports the following attributes. | Attribute | Description | | - | - | | **Name** | The full model identifier, for example `ibm-granite/granite-embedding-311m-multilingual-r2`. Use this value wherever a model is specified. | | **Model type** | `Instruct`, `Base`, or `Embedding`. See [Model types](#model-types). | | **Country of origin** | The country the model originated from, or **Mixed** when it has no single country of origin. See [Country of origin](#country-of-origin). | | **Embedding dimension** | The length of the vector an embedding model produces. Reported for embedding models only. | | **Inference available** | Whether the model can serve inference requests. | | **Training available** | Whether the model can be used as the starting point for a fine-tuning job. | | **Deployment available** | Whether the model can be deployed for inference. See [Deployments](/flow/components/deployments). | | **Supports LoRA** | Whether the model supports LoRA fine-tuning, and at what maximum rank. | | **Vision model** | Whether the model accepts image input alongside text. | ### Country of origin Country of origin identifies where a model originated. Deployments with model provenance requirements, including government and other highly regulated environments, use it to determine whether a model is permitted for a given workload. The catalog spans several countries of origin. Review this attribute before selecting a model if your deployment restricts model provenance. Some models have no single country of origin and are listed as **Mixed**. Mixed origins apply when a model's corporate parent and its development lab are based in different countries, or when a model was fine-tuned in one country from a base model developed in another. > [!NOTE] > > Confirm provenance directly with Seekr before using a model with mixed origins in a deployment that restricts model provenance. ## Retrieve the catalog Browse the catalog in the SeekrFlow app from the [Model Library](/flow/app/model-library). To retrieve the full catalog programmatically, including every attribute, use the models endpoint. Filter by `model_type` to return a single class of models. See [List models](/flow/reference/ml_models_v1_flow_models_get). ## Select a model Choosing a generative model and choosing an embedding model involve different trade-offs, and the two decisions carry different consequences. For generative models, weigh task complexity, response speed, domain specificity, and cost. You can change an agent's model at any time by updating its configuration. See [Generative models](/flow/components/models/generative-models). For embedding models, weigh vector dimension, maximum input length, and language coverage. This choice is durable. The embedding model is fixed when you create a vector database and cannot be changed afterward without re-embedding your documents. See [Embedding models](/flow/components/models/embedding-models). If your deployment restricts model provenance, filter by [country of origin](#country-of-origin) before comparing anything else. # Embedding models Source: https://docs.seekr.com/flow/components/models/embedding-models Compare the embedding models available for vector databases by dimensions, input limits, and country of origin. Supported on UI API SDK An embedding model converts content into a fixed-length vector of numbers that represents its meaning. Content with similar meaning produces similar vectors, which is what allows a vector database to retrieve content by semantic similarity instead of keyword matching. Most embedding models take text as input. Multimodal embedding models also accept images, which they represent as vectors in the same space as text. Embedding models generate no language. They are used to build and query vector databases, and they cannot serve prompts or act as an agent's cognitive engine. For models that generate text, see [Generative models](/flow/components/models/generative-models). Every embedding model in the catalog is available for inference. None can be fine-tuned. Vector databases created without a specified model use `ibm-granite/granite-embedding-311m-multilingual-r2`. > [!WARNING] > > The embedding model is fixed when you create a vector database. Every vector in a database is stored in that model's vector space, and dimensions differ across models. An existing database cannot be switched to a different embedding model. To change models, create a new database and re-embed your documents. ## Supported embedding models | Model | Dimensions | Max input tokens | Language support | Country of origin | Availability | | - | - | - | - | - | - | | **Granite Embedding 311M Multilingual R2** (default) `ibm-granite/granite-embedding-311m-multilingual-r2` | 768 | 32768 | 200+ languages, with enhanced support for 52 languages and programming code | United States | All deployments | | **Granite Embedding 97M Multilingual R2** `ibm-granite/granite-embedding-97m-multilingual-r2` | 384 | 32768 | 200+ languages, with enhanced support for 52 languages and programming code | United States | All deployments | | **Arctic Embed L v2.0** `Snowflake/snowflake-arctic-embed-l-v2.0` | 1024 | 8192 | Multilingual, with retained English performance | United States | All deployments | | **E5-Mistral-7B-Instruct** `intfloat/e5-mistral-7b-instruct` | 4096 | 4096 | English (best); limited multilingual | Mixed | All deployments | | **Linq-Embed-Mistral** `Linq-AI-Research/Linq-Embed-Mistral` | 4096 | | | South Korea | | | **BGE-M3** `BAAI/bge-m3` | 1024 | | | China | | | **BGE Base English v1.5** `BAAI/bge-base-en-v1.5` | | | English | China | | | **Titan Text Embeddings V2** `bedrock:amazon.titan-embed-text-v2:0` | 256, 512, or 1024 | 8192 | 100+ languages | | Self-managed AWS/EKS only (recommended Bedrock model) | | **Titan Text Embeddings V1** `bedrock:amazon.titan-embed-text-v1` | 1536 | 8192 | 25+ languages | | Self-managed AWS/EKS only (legacy) | | **Titan Text Embeddings G1** `bedrock:amazon.titan-embed-g1-text-02` | 1536 | 8192 | 25+ languages | | Self-managed AWS/EKS only (legacy) | | **Titan Multimodal Embeddings** `bedrock:amazon.titan-embed-image-v1` | 256, 384, or 1024 | 128 | Multimodal (text + image) | | Self-managed AWS/EKS only | **Mixed** means a model has no single country of origin. Empty cells are values the model catalog does not currently report. See [Country of origin](/flow/components/models#country-of-origin) and [Model attributes](/flow/components/models#model-attributes). > [!NOTE] > > Bedrock embedding models are available for self-managed AWS/EKS deployments only, and they are not listed in the SeekrFlow model catalog. See [Use AWS Bedrock for ingestion and inference](/flow/sdk/data-engine/aws-bedrock) for setup instructions. > [!NOTE] > > Models are added and updated over time. To retrieve the current models and their attributes, see [List models](/flow/reference/ml_models_v1_flow_models_get). ## Select an embedding model Weigh the following when choosing a model. Because the choice cannot be reversed without re-embedding, settle it before you create the database. * **Dimensions** – Larger vectors capture more nuance and cost more to store and search. This value also defines the database's vector space. * **Max input tokens** – Chunks longer than the model's limit are not fully represented. Keep your chunk size within the limit. Avoid inputs longer than a model's maximum input tokens. * **Language support** – Match the model to the languages in your corpus. An English-only model degrades on multilingual content. * **Country of origin** – Required if your deployment restricts model provenance. See [Country of origin](/flow/components/models#country-of-origin). ## Create a vector database To choose an embedding model and create a vector database: * In the UI, see [Vector stores](/flow/app/vector-stores). * With the SDK, see [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database). # Generative models Source: https://docs.seekr.com/flow/components/models/generative-models Compare the base and instruction-tuned models available for agents, fine-tuning, and inference. Supported on UI API SDK A generative model produces text as output. These models provide the reasoning capabilities needed to understand tasks, determine a course of action, and generate responses. A generative model serves as an agent's cognitive engine, and every agent requires one to function. Most generative models take text as input. Vision models also accept images, which they describe or reason about in their text response. A transcription model takes audio and returns the spoken text. Generative models are also the models you fine-tune and deploy for inference. For models that produce vectors rather than text, see [Embedding models](/flow/components/models/embedding-models). ## Model types ### Instruct models Instruct models are instruction-tuned and ready to use. They follow instructions, hold conversations, and respond to prompts without further training. Most fine-tuning also starts from an Instruct model, since fine-tuning adapts a model that already follows instructions. ### Base models Base models are pretrained weights without instruction tuning. They are not conversational without further training. ### Fine-tuned models Fine-tuned models are custom-trained models adapted to specific domains or use cases. These models are created through SeekrFlow's fine-tuning component, which embeds specialized knowledge and behaviors directly into model parameters. ## Available models The **Type** column reports whether a model is Instruct or Base. Whether a given model can be fine-tuned or deployed is reported per model in the catalog and is not implied by its type. See [Model attributes](/flow/components/models#model-attributes). ### Meta Llama models | Model | Best for | Type | Size | Country of origin | | - | - | - | - | - | | Llama 3.1 8B Instruct `meta-llama/Llama-3.1-8B-Instruct` | Instruction-following, general assistant tasks | Instruct | 8B | United States | | Llama 3.1 8B `meta-llama/Llama-3.1-8B` | Fine-tuning on general text tasks | Base | 8B | United States | | Llama 3.1 70B Instruct `meta-llama/Llama-3.1-70B-Instruct` | Complex reasoning, high-accuracy tasks | Instruct | 70B | United States | | Llama 3.1 70B `meta-llama/Llama-3.1-70B` | Fine-tuning at scale | Base | 70B | United States | | Llama 3.2 1B/3B Instruct `meta-llama/Llama-3.2-1B-Instruct` `meta-llama/Llama-3.2-3B-Instruct` | Lightweight tasks, resource-constrained environments | Instruct | 1-3B | United States | | Llama 3.2 1B/3B `meta-llama/Llama-3.2-1B` `meta-llama/Llama-3.2-3B` | Fine-tuning for multilingual text generation across 8 languages | Base | 1-3B | United States | | Llama 3.2 11B Vision Instruct `meta-llama/Llama-3.2-11B-Vision-Instruct` | Visual recognition, image reasoning, captioning | Instruct | 11B | United States | | Llama 3.2 90B Vision Instruct `meta-llama/Llama-3.2-90B-Vision-Instruct` | Multimodal image reasoning and visual Q\&A | Instruct | 90B | United States | | Llama 3.3 70B Instruct `meta-llama/Llama-3.3-70B-Instruct` | Latest generation complex reasoning | Instruct | 70B | United States | | Llama 4 Scout 17B-16E Instruct `meta-llama/Llama-4-Scout-17B-16E-Instruct` | Next-generation multimodal understanding | Instruct | 109B (17B active) | United States | | Meta Llama 3 8B Instruct `meta-llama/Meta-Llama-3-8B-Instruct` | Instruction-following on the previous generation | Instruct | 8B | United States | ### Qwen models | Model | Best for | Type | Size | Country of origin | | - | - | - | - | - | | Qwen 2 72B `Qwen/Qwen2-72B` | Advanced natural language tasks | Base | 72B | China | | Qwen 2.5 3B `Qwen/Qwen2.5-3B` | Fine-tuning for multilingual text generation | Base | 3B | China | | Qwen 2.5 3B Instruct `Qwen/Qwen2.5-3B-Instruct` | Multilingual instruction-following | Instruct | 3B | China | | Qwen 2.5 32B Instruct `Qwen/Qwen2.5-32B-Instruct` | Advanced multilingual instruction-following | Instruct | 32B | China | | Qwen 2.5 72B Instruct `Qwen/Qwen2.5-72B-Instruct` | Large-scale multilingual instruction-following | Instruct | 72B | China | | Qwen 2.5 VL 3B Instruct `Qwen/Qwen2.5-VL-3B-Instruct` | Visual question answering, document comprehension, captioning | Instruct | 3B | China | | Qwen 2.5 VL 7B Instruct `Qwen/Qwen2.5-VL-7B-Instruct` | Document and form parsing, OCR, and video understanding | Instruct | 7B | China | | Qwen 2.5 VL 32B Instruct `Qwen/Qwen2.5-VL-32B-Instruct` | Vision and language understanding | Instruct | 32B | China | | Qwen 3 8B `Qwen/Qwen3-8B` | Efficient multilingual reasoning | Instruct | 8B | China | | Qwen 3 8B/32B FP8 `Qwen/Qwen3-8B-FP8` `Qwen/Qwen3-32B-FP8` | Fine-tuning with reduced memory requirements | Base | 8-32B | China | | Qwen 3 30B A3B FP8 `Qwen/Qwen3-30B-A3B-FP8` | Balancing performance and efficiency, 128K context | Base | 30B (3B active) | China | | Qwen 3 30B A3B Thinking `Qwen/Qwen3-30B-A3B-Thinking-2507` | Extended reasoning across mathematics, science, and coding, 256K context | Instruct | 30B (3B active) | China | | Qwen 3 235B A22B FP8 `Qwen/Qwen3-235B-A22B-FP8` | Complex tasks at large scale, 128K context | Base | 235B (22B active) | China | | Qwen 3 Coder 480B A35B FP8 `Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` | Agentic coding and repository-scale code understanding, 256K context | Instruct | 480B (35B active) | China | | Qwen 3 VL 8B Instruct `Qwen/Qwen3-VL-8B-Instruct` | Visual agent tasks, visual coding, and OCR in 32 languages | Instruct | 8B | China | | Qwen 3 VL 30B A3B Instruct `Qwen/Qwen3-VL-30B-A3B-Instruct` | Visual agents, spatial reasoning, and long video understanding | Instruct | 30B (3B active) | China | | Qwen 3.5 9B `Qwen/Qwen3.5-9B` | Multimodal reasoning, with thinking mode enabled by default | Instruct | 9B | China | | Qwen 3.5 397B A17B `Qwen/Qwen3.5-397B-A17B` | Multimodal reasoning at frontier scale | Instruct | 397B (17B active) | China | | Qwen 3.6 27B `Qwen/Qwen3.6-27B` | Agentic coding and frontend development | Instruct | 27B | China | ### Mistral AI models | Model | Best for | Type | Size | Country of origin | | - | - | - | - | - | | Mistral 7B Instruct v0.2/v0.3 `mistralai/Mistral-7B-Instruct-v0.2` `mistralai/Mistral-7B-Instruct-v0.3` | Fast responses, chat applications | Instruct | 7B | France | | Mistral Small 24B Instruct `mistralai/Mistral-Small-24B-Instruct-2501` | Low-latency multilingual conversations | Instruct | 24B | France | ### DeepSeek models | Model | Best for | Type | Size | Country of origin | | - | - | - | - | - | | DeepSeek R1 Distill Qwen 7B `deepseek-ai/DeepSeek-R1-Distill-Qwen-7B` | Reasoning-focused conversational tasks | Instruct | 7B | China | | DeepSeek R1 Distill Qwen 32B `deepseek-ai/DeepSeek-R1-Distill-Qwen-32B` | Advanced reasoning at scale | Instruct | 32B | China | ### Google Gemma models | Model | Best for | Type | Size | Country of origin | | - | - | - | - | - | | Gemma 2B `google/gemma-2b` | Fine-tuning for lightweight general tasks | Base | 2B | Mixed | | Gemma 2 9B `google/gemma-2-9b` | Fine-tuning with balanced performance and efficiency | Base | 9B | Mixed | | Gemma 3 27B IT `google/gemma-3-27b-it` | Multilingual, multimodal capabilities | Instruct | 27B | Mixed | | Gemma 4 E2B IT `google/gemma-4-E2B-it` | Text and image input, 256K context, 140+ languages | Instruct | E2B | Mixed | | Gemma 4 E4B IT `google/gemma-4-E4B-it` | Text and image input, 256K context, 140+ languages | Instruct | E4B | Mixed | | Gemma 4 26B A4B IT `google/gemma-4-26B-A4B-it` | Text and image input, 256K context, 140+ languages | Instruct | 26B (4B active) | Mixed | | Gemma 4 31B IT `google/gemma-4-31B-it` | Text and image input, 256K context, 140+ languages | Instruct | 31B | Mixed | ### Other models | Model | Best for | Type | Size | Country of origin | | - | - | - | - | - | | Microsoft Phi-3 Mini 4k Instruct `microsoft/Phi-3-mini-4k-instruct` | On-device and resource-constrained environments | Instruct | 3.8B | United States | | TinyLlama 1.1B Chat `TinyLlama/TinyLlama-1.1B-Chat-v1.0` | Ultra-lightweight chat applications | Instruct | 1.1B | Singapore | | OpenAI GPT-OSS 20B/120B `openai/gpt-oss-20b` `openai/gpt-oss-120b` | Reasoning and agentic tasks | Instruct | 20-120B | United States | | OpenAI Whisper Large `openai/whisper-large` | Transcribing speech from audio input | Base | 3B | United States | | Nous Hermes 2 Mixtral 8x7B DPO `NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO` | Preference-aligned instruction-following | Instruct | 46.7B | United States | | Inkling `thinkingmachines/Inkling` | General-purpose multimodal work with text, image, and audio input | Instruct | | United States | | Inkling Small `thinkingmachines/Inkling-Small` | General-purpose multimodal work at a smaller scale | Instruct | | United States | | Laguna S 2.1 `poolside/Laguna-S-2.1` | Agentic coding and long-horizon work | Base | 118B (8B active) | Mixed | | Muse Glimmer 30B `meta-models/Muse-Glimmer-30B` | Agentic work on local hardware, with multi-step reasoning, tool use, and multimodal understanding | Instruct | 30B | United States | | NVIDIA Cosmos Reason 2 2B `nvidia/Cosmos-Reason2-2B` | Physical reasoning and planning for robotics and vision agents | Base | 2B | United States | **Mixed** means a model has no single country of origin. Empty cells are values the model catalog does not currently report. See [Country of origin](/flow/components/models#country-of-origin). > [!NOTE] > > Models are added and updated over time. To retrieve the current models and their attributes, see [List models](/flow/reference/ml_models_v1_flow_models_get). ## Select a model When configuring an agent, you specify which model to use. Consider these factors when selecting a model: * **Type** – Instruct models are ready to use as-is. Base models require fine-tuning before they behave conversationally. * **Task complexity** – More complex reasoning tasks may benefit from larger or specialized models. * **Response requirements** – Balance between speed and accuracy based on your use case. * **Domain specificity** – Fine-tuned models perform better for specialized domains with unique terminology or requirements. * **Cost and performance** – Larger models provide enhanced capabilities but with higher computational costs. * **Country of origin** – Required if your deployment restricts model provenance. See [Country of origin](/flow/components/models#country-of-origin). ## Model configuration Models are specified during agent creation and can be updated by modifying the agent configuration. The model works in conjunction with other agent components like instructions and tools to determine overall agent behavior. # Observability Source: https://docs.seekr.com/flow/components/observability Monitor agent performance and investigate runs with span-level visibility. Supported on UI API SDK Observability gives you visibility into how your agents are performing by capturing a record of every run. Each record includes when the run happened, which model was used, how many tokens were consumed, and whether any errors occurred. ## What you can see Each agent run generates spans that capture: * **Timing** – When a run started and ended * **Model usage** – Which model handled the request * **Token consumption** – Input and output token counts * **Errors** – Whether an exception occurred and what type it was ## When to use **Monitor agent health** – Track whether runs are completing successfully and identify patterns in failures. **Investigate a failed run** – Retrieve spans for a specific run to see where it went wrong. **Understand usage and costs** – Review token consumption across runs to inform capacity planning and cost management. For implementation details, see [Observability SDK guide](/flow/sdk/observability). # Connect to MCP Server Source: https://docs.seekr.com/flow/mcp Connect your AI assistant to the SeekrFlow OpenAPI spec to generate working, authenticated code on demand. The SeekrFlow MCP server implements the Model Context Protocol (MCP) to give your AI assistant direct access to the SeekrFlow OpenAPI spec. When connected, your assistant can read endpoint definitions, parameters, request and response schemas, and authentication requirements — then use that information to generate working, authenticated code without you having to look anything up manually. For example, ask *"How do I upload a file to the AI-Ready Data Engine?"* and your assistant will: **Step 1** Retrieve the SeekrFlow OpenAPI spec. **Step 2** Locate the correct `/flow/files` endpoint definition. **Step 3** Read the required parameters, request body schema, and authentication requirements. **Step 4** Generate working code with proper authentication and request structure. **Step 5** Include response handling based on the defined response schemas. **Supported tools:** * VSCode * Cursor * Windsurf * Other AI assistants that support remote MCP servers ## Authentication No authentication is required to connect to the SeekrFlow MCP server. When your AI assistant generates code that makes SeekrFlow API calls, those calls require your SeekrFlow API key in the `Authorization` header. Set your API key as an environment variable so it's available in generated code: ```bash Linux / macOS theme={null} export SEEKR_API_KEY=your_api_key ``` ```bash Windows theme={null} set SEEKR_API_KEY=your_api_key ``` For instructions on getting your API key, see [Getting started with your API](/flow/reference/getting-started-with-your-api#get-your-api-key). ## Connect your tools SeekrFlow hosts a remote MCP server at `https://docs.seekr.com/mcp`. Configure your AI development tools to connect to this server using the steps below. ### VSCode **Step 1** Open the Command Palette (`Cmd+Shift+P` on macOS, `Ctrl+Shift+P` on Windows/Linux). **Step 2** Select **MCP: Add Server...**. **Step 3** Select **HTTP (HTTP or Server-Sent Events)**. **Step 4** Enter `https://docs.seekr.com/mcp` for the server URL. **Step 5** Enter `seekr-api` (or any unique identifier) for the server name. Or add the following to your VSCode MCP configuration: ```json JSON theme={null} { "mcpServers": { "seekr-api": { "type": "http", "url": "https://docs.seekr.com/mcp" } } } ``` ### Cursor **Step 1** Open `~/.cursor/mcp.json`. If the file doesn't exist, create it with `touch ~/.cursor/mcp.json`. **Step 2** Add the following configuration: ```json JSON theme={null} { "mcpServers": { "seekr-api": { "type": "http", "url": "https://docs.seekr.com/mcp" } } } ``` **Step 3** Restart Cursor to load the MCP connection. ### Windsurf **Step 1** Open `~/.codeium/windsurf/mcp_config.json`. If the file doesn't exist, create it with `touch ~/.codeium/windsurf/mcp_config.json`. **Step 2** Add the following configuration: ```json JSON theme={null} { "mcpServers": { "seekr-api": { "type": "http", "url": "https://docs.seekr.com/mcp" } } } ``` **Step 3** Restart Windsurf to load the MCP connection. ### Other AI assistants Any AI assistant that supports remote MCP servers can connect to SeekrFlow using `https://docs.seekr.com/mcp`. Refer to your tool's documentation for instructions on adding a remote MCP server. ## Troubleshooting ### Connection issues * **Restart your editor**: MCP connections sometimes need a restart after configuration changes. * **Verify the server URL**: Confirm you are using `https://docs.seekr.com/mcp`. ### File issues * **Cursor**: Make sure `~/.cursor/mcp.json` exists and is valid JSON * **Windsurf**: Check `~/.codeium/windsurf/mcp_config.json` exists and contains valid JSON. * **JSON syntax**: Verify all quotes and brackets are correct ### Get help * **Test your API key** by making a direct SeekrFlow API call to confirm it is active. * Contact SeekrFlow support or see [Get started with the API](/flow/reference/getting-started-with-your-api) to verify your account setup. # Build something with SeekrFlow Source: https://docs.seekr.com/flow/recipes End-to-end, copy-pasteable walkthroughs. Pick one by what you want to build. ## Retrieval and Q\&A > [card] [Simple RAG agent](/flow/recipes/simple-rag-agent) > > Upload a document, index it in a vector store, and give an agent a FileSearch tool to answer from it. > > Beginner > > \~15 min > > Verified with seekrai 0.29.0 > [card] [New hire onboarding agent](/flow/recipes/new-hire-onboarding-agent-with-citations) > > Index your documents and answer questions with confidence ratings and cited sources. > > Intermediate > > \~20 min > > Verified with seekrai 0.29.0 > [card] [Q\&A bot with confidence scoring](/flow/recipes/simple-question-answering-bot-with-confidence-scoring) > > Answer questions about a topic and score how much to trust each reply. > > Beginner > > \~10 min > > Verified with seekrai 0.29.0 ## Tools and function calling > [card] [Weather agent with a custom Python tool](/flow/recipes/weather-agent-custom-python-tool) > > Give an agent a tool that runs your Python function and calls an external API. > > Beginner > > \~15 min > > Verified with seekrai 0.29.0 ## Multi-agent > [card] [Poetry contest with a supervisor agent](/flow/recipes/poetry-contest-with-supervisor-agent) > > Wrap a limerick writer and a haiku writer as tools and let a supervisor agent judge the results. > > Intermediate > > \~20 min > > Verified with seekrai 0.29.0 # New hire onboarding agent with citations Source: https://docs.seekr.com/flow/recipes/new-hire-onboarding-agent-with-citations Build a FileSearch agent that answers onboarding questions from your own documents, with confidence ratings and cited sources. Intermediate \~20 min Verified with seekrai 0.29.0 [Download Jupyter notebook](/notebooks/new-hire-onboarding-agent-with-citations.json) This recipe builds a document question-answering agent with SeekrFlow's Agent framework and the FileSearch tool. You index a set of documents into a vector database, attach that database to an agent through a FileSearch tool, and prompt the agent to answer only from what it retrieves, rate its confidence, and cite its sources. The example uses a new hire onboarding scenario, but the pattern works for any document set. Gather 3 to 5 high-quality documents relevant to your use case before you start. ## What you'll build An agent that: 1. Indexes your documents into a vector database. 2. Searches across those documents to answer questions. 3. Rates its confidence and explains the rating. 4. Cites the specific sources behind each answer. ## Prerequisites * A SeekrFlow API key, set as the `SEEKR_API_KEY` environment variable * Documents in PDF, DOCX, or Markdown format * Python 3.8 or later * The SeekrFlow SDK: `pip install seekrai` > [!WARNING] > > This recipe creates billable resources. When you are done, remove them with the > [cleanup step](#clean-up). ## Build it **1. Set up the client** Create `onboarding_agent.py` and start with the imports, configuration, and client. The paths in `FILE_PATHS` should point at your own documents. ```python onboarding_agent.py theme={null} import os import re import time from seekrai import SeekrFlow from seekrai.types import CreateAgentRequest, FileSearch, FileSearchEnv API_KEY = os.environ["SEEKR_API_KEY"] API_URL = "https://flow.seekr.com/v1/" MODEL_ID = "meta-llama/Llama-3.1-8B-Instruct" EMBEDDING_MODEL = "intfloat/e5-mistral-7b-instruct" FILE_PATHS = [ "company-guidebook.pdf", "company-holidays.pdf", "company-payroll-schedule.pdf", ] client = SeekrFlow(api_key=API_KEY, base_url=API_URL) ``` **2. Create a vector database** Create an empty vector database. Documents you ingest are embedded with the model you name here and stored for retrieval. ```python onboarding_agent.py theme={null} vector_db = client.vector_database.create( name="BennyBotDB", model=EMBEDDING_MODEL, description="Employee guidelines and benefits for onboarding QA.", ) database_id = vector_db.id print(f"Created vector database: {vector_db.name} ({database_id})") ``` **3. Upload your documents** Upload each document to SeekrFlow's AI-Ready Data Engine with `purpose="alignment"` and collect the file IDs. ```python onboarding_agent.py theme={null} file_ids = [] for file_path in FILE_PATHS: print(f"Uploading {file_path}...") upload_response = client.files.upload(file_path, purpose="alignment") file_ids.append(upload_response.id) print(f" Uploaded: {upload_response.id}") ``` **4. Ingest the documents** Start an ingestion job to chunk, embed, and store the uploaded files, then poll until it completes. Accuracy-optimized ingestion can take a few minutes. ```python onboarding_agent.py theme={null} ingestion_job = client.vector_database.create_ingestion_job( database_id=database_id, files=file_ids, method="accuracy-optimized", chunking_method="markdown", token_count=512, overlap_tokens=50, ) job_id = ingestion_job.id print(f"Created ingestion job: {job_id}") deadline = time.time() + 600 while time.time() < deadline: job = client.vector_database.retrieve_ingestion_job(database_id, job_id) print(f"Ingestion status: {job.status}") if job.status == "completed": print("Vector database ready.") break if job.status == "failed": raise RuntimeError(f"Ingestion failed: {job.error_message}") time.sleep(5) else: raise TimeoutError("Ingestion did not complete in time.") ``` **5. Create the agent** Create an agent and attach a FileSearch tool pointed at your vector database. The instructions tell it to answer only from search results, rate its confidence, and cite sources. Then poll until the agent is `Active`. ```python onboarding_agent.py theme={null} instructions = """You are an expert onboarding assistant that answers only from document search results. For each question: 1. Search the documents with the file_search tool. 2. Use information from multiple sources when available. 3. When you find relevant information, rate your confidence from 1 (guess) to 10 (certain). 4. After your answer, on a new line starting with "Confidence: [X/10]", briefly explain the rating. 5. Cite your sources, including specific document names. If the answer is not in the search results, say you could not find it and do not give a confidence score.""" agent = client.agents.create( CreateAgentRequest( name="BennyBot", instructions=instructions, model_id=MODEL_ID, tools=[ FileSearch( tool_env=FileSearchEnv( file_search_index=database_id, document_tool_desc="Search onboarding documents to answer employee questions accurately.", top_k=6, score_threshold=0.5, ) ) ], ) ) agent_id = agent.id print(f"Agent created: {agent_id}") deadline = time.time() + 300 while time.time() < deadline: status = client.agents.retrieve(agent_id=agent_id).status.value print(f"Agent status: {status}") if status == "Active": print("Agent is active.") break if status == "Failed": raise RuntimeError("Agent failed to deploy.") time.sleep(10) else: raise TimeoutError("Agent did not become active in time.") ``` **6. Ask a question** Create a thread, send a question, wait for the run to finish, and read the agent's reply. The `parse_response` helper splits the answer, the confidence rating, and any cited sources out of the reply. ```python onboarding_agent.py theme={null} def parse_response(response: str) -> dict: """Split an agent reply into answer, confidence, explanation, and sources.""" if not response: return {"answer": "No response received.", "confidence": "0/10", "explanation": "", "sources": []} answer, confidence, explanation, sources = response, "Not provided", "", [] if "Confidence:" in response: answer, _, confidence_part = response.partition("Confidence:") answer = answer.strip() confidence_part = confidence_part.strip() rating_match = re.search(r"(\d+)(/10)?", confidence_part) if rating_match: confidence = f"{rating_match.group(1)}/10" explanation = re.sub(r"^\d+(/10)?", "", confidence_part).strip() for pattern in (r"Source[s]?:(.+?)(?=\n\n|\Z)", r"According to (.+?)(?=\n\n|\Z)"): match = re.search(pattern, response, re.IGNORECASE | re.DOTALL) if match: sources += [s.strip() for s in re.split(r",|\n", match.group(1)) if s.strip()] return {"answer": answer, "confidence": confidence, "explanation": explanation, "sources": sources} thread = client.agents.threads.create() client.agents.threads.create_message( thread_id=thread.id, role="user", content="How many paid holidays do employees get?" ) run_response = client.agents.runs.run(agent_id=agent_id, thread_id=thread.id, stream=False) deadline = time.time() + 300 while time.time() < deadline: run = client.agents.runs.retrieve(run_response.run_id, thread.id) if run.status.value == "completed": break if run.status.value in ("failed", "canceled"): raise RuntimeError(f"Run ended with status: {run.status.value}") time.sleep(2) else: raise TimeoutError("Run did not complete in time.") messages = client.agents.threads.list_messages(thread.id, limit=10, order="desc") reply = next((m.content for m in messages if m.role == "assistant"), None) result = parse_response(reply if isinstance(reply, str) else str(reply)) print("\n" + "=" * 50) print(f"Answer: {result['answer']}\n") print(f"Confidence: {result['confidence']}") if result["explanation"]: print(f"Explanation: {result['explanation']}") if result["sources"]: print("\nSources:") for i, source in enumerate(result["sources"], 1): print(f"{i}. {source}") ``` **7. Run the script** Run the finished script: ```bash theme={null} python onboarding_agent.py ``` The agent searches your documents, answers from what it retrieves, and appends a confidence rating and its sources. ## Clean up resources (optional) Remove the resources this recipe created when you are done. ```python onboarding_agent.py theme={null} client.agents.demote(agent_id) client.agents.delete(agent_id) client.vector_database.delete(database_id) for file_id in file_ids: client.files.delete(file_id) print("Deleted the agent, vector database, and files.") ``` ## Next steps * **Tune retrieval.** Adjust `top_k` and `score_threshold` on the FileSearch tool to trade recall against precision for your document set. * **Swap in your own documents.** Point `FILE_PATHS` at any PDF, DOCX, or Markdown files to build an assistant for a different domain. * **Add metadata.** Attach metadata at ingestion so you can filter retrieval by fields like document type or date. # Poetry contest with a supervisor agent Source: https://docs.seekr.com/flow/recipes/poetry-contest-with-supervisor-agent Build a supervisor agent that wraps a limerick writer and a haiku writer as tools, sends a prompt to both, and picks a winner. Intermediate \~20 min Verified with seekrai 0.29.0 [Download Jupyter notebook](/notebooks/poetry-contest-with-supervisor-agent.json) SeekrFlow lets you expose one agent to another as a tool. This recipe uses that pattern to build a small multi-agent system: a supervisor agent coordinates two specialist sub-agents, a limerick writer and a haiku writer. The supervisor sends the user's prompt to each sub-agent, collects both poems, and declares a winner. The pattern is the useful part. Once a sub-agent is a tool, the supervisor decides when to call it the same way it would call any other tool, so you can compose focused agents into a larger workflow instead of building one agent that tries to do everything. ## What you'll build A supervisor agent that: 1. Wraps a Limerick Agent and a Haiku Agent as `agent_as_tool` tools. 2. Sends the user's prompt to both sub-agents. 3. Presents both poems, clearly labeled. 4. Picks a favorite and explains why. ## Prerequisites * A SeekrFlow API key, set as the `SEEKR_API_KEY` environment variable * Python 3.8 or later * The SeekrFlow SDK: `pip install seekrai` > [!WARNING] > > This recipe creates billable resources. When you are done, remove them with the > [cleanup step](#clean-up). ## Build it **1. Set up the client** Create `agents_as_tools.py` and start with the imports, configuration, and client. ```python agents_as_tools.py theme={null} import os import time from seekrai import SeekrFlow from seekrai.types.tools import CreateAgentAsTool, AgentAsToolConfig from seekrai.types.agents.agent import CreateAgentRequest API_KEY = os.environ["SEEKR_API_KEY"] API_URL = "https://flow.seekr.com/v1/" MODEL_ID = "meta-llama/Llama-3.1-70B-Instruct" TEST_PROMPT = "My cat refuses to get off my keyboard while I'm trying to work." client = SeekrFlow(api_key=API_KEY, base_url=API_URL) ``` > [!NOTE] > > This recipe uses `meta-llama/Llama-3.1-70B-Instruct`. The supervisor has to call > both sub-agent tools and then reason over their output, so a capable instruct > model with reliable tool calling matters more here than in a single-tool agent. > Any instruct model that supports tool calling works, such as > `meta-llama/Llama-3.3-70B-Instruct`. **2. Add helper functions** These helpers wait for asynchronous operations and make the script safe to run more than once. `run_agent` polls a run to completion, `promote_and_wait` polls an agent until it is `Active`, and the `get_or_create` helpers reuse existing resources instead of creating duplicates. ```python agents_as_tools.py theme={null} def run_agent(agent_id: str, prompt: str, timeout: int = 300) -> str: """Start a run, poll until complete, then return the assistant's reply.""" thread = client.agents.threads.create() client.agents.threads.create_message(thread_id=thread.id, role="user", content=prompt) run_response = client.agents.runs.run(agent_id=agent_id, thread_id=thread.id, stream=False) deadline = time.time() + timeout while time.time() < deadline: run = client.agents.runs.retrieve(run_response.run_id, thread.id) if run.status.value == "completed": break if run.status.value in ("failed", "canceled"): raise RuntimeError(f"Run ended with status: {run.status.value}") time.sleep(3) else: raise TimeoutError(f"Run did not complete within {timeout}s.") messages = client.agents.threads.list_messages(thread.id, limit=10, order="desc") for msg in messages: if msg.role == "assistant": return msg.content if isinstance(msg.content, str) else str(msg.content) return "(no assistant message found)" def promote_and_wait(agent_id: str, timeout: int = 120) -> None: """Promote an agent and poll until it's Active.""" client.agents.promote(agent_id) deadline = time.time() + timeout while time.time() < deadline: agent = client.agents.retrieve(agent_id) if agent.status.value == "Active": return if agent.status.value == "Failed": raise RuntimeError(f"Agent {agent_id} failed to deploy.") time.sleep(3) raise TimeoutError(f"Agent did not become Active within {timeout}s.") def get_or_create_agent(request: CreateAgentRequest): """Return an existing agent with the same name, or create a new one.""" existing = next((a for a in client.agents.list_agents() if a.name == request.name), None) if existing: print(f" Found existing '{existing.name}': {existing.id!r}") return existing agent = client.agents.create(request) print(f" Created '{agent.name}': {agent.id!r}") return agent def get_or_create_tool(request: CreateAgentAsTool): """Return an existing agent_as_tool with the same name, or create a new one.""" existing = next((t for t in client.tools.list().data if t.name == request.name), None) if existing: print(f" Found existing tool '{existing.name}': {existing.id!r}") return existing tool = client.tools.create(request) print(f" Created tool '{tool.name}': {tool.id!r}") return tool def ensure_active(agent) -> None: """Promote the agent only if it isn't already Active.""" if agent.status.value == "Active": print(f" '{agent.name}' is already Active.") return print(f" Promoting '{agent.name}'...") promote_and_wait(agent.id) print(f" '{agent.name}' is Active.") ``` **3. Create the sub-agents** Create the two specialist agents. Each has narrow instructions that keep it focused on a single job. ```python agents_as_tools.py theme={null} limerick_agent = get_or_create_agent(CreateAgentRequest( name="Limerick Agent", instructions=( "You are the Limerick Agent. Whatever prompt the user sends you, " "respond ONLY with a creative limerick about it. " "Do not add any other commentary." ), model_id=MODEL_ID, )) haiku_agent = get_or_create_agent(CreateAgentRequest( name="Haiku Agent", instructions=( "You are the Haiku Agent. Whatever prompt the user sends you, " "respond ONLY with a haiku (5-7-5 syllables) about it. " "Do not add any other commentary." ), model_id=MODEL_ID, )) ``` **4. Promote the sub-agents** A sub-agent must be `Active` before it can be wrapped as a tool, so promote both now. ```python agents_as_tools.py theme={null} ensure_active(limerick_agent) ensure_active(haiku_agent) ``` **5. Wrap each sub-agent as a tool** Create an `agent_as_tool` tool for each sub-agent. The `description` is what the supervisor sees when it decides which tool to call, and the `config` points at the sub-agent by ID. ```python agents_as_tools.py theme={null} limerick_tool = get_or_create_tool(CreateAgentAsTool( name="limerick_agent", description="Sends a prompt to the Limerick Agent and returns a limerick.", config=AgentAsToolConfig(agent_id=limerick_agent.id), )) haiku_tool = get_or_create_tool(CreateAgentAsTool( name="haiku_agent", description="Sends a prompt to the Haiku Agent and returns a haiku.", config=AgentAsToolConfig(agent_id=haiku_agent.id), )) ``` **6. Create the supervisor** Create the supervisor agent and attach both tools. Its instructions tell it to call each tool and then compare the results. ```python agents_as_tools.py theme={null} supervisor = get_or_create_agent(CreateAgentRequest( name="Supervisor Agent", instructions=( "You are a supervisor. When the user gives you a prompt:\n" "1. Send it verbatim to the 'limerick_agent' tool and note its output.\n" "2. Send it verbatim to the 'haiku_agent' tool and note its output.\n" "3. Present BOTH outputs to the user, clearly labelled.\n" "4. Declare which one you personally like more, and briefly explain why." ), tool_ids=[limerick_tool.id, haiku_tool.id], model_id=MODEL_ID, )) ensure_active(supervisor) ``` **7. Send a prompt** Send a prompt to the supervisor and print its reply. The supervisor calls both sub-agents, then returns both poems with its verdict. ```python agents_as_tools.py theme={null} response = run_agent(supervisor.id, TEST_PROMPT) print("Supervisor says:\n") print(response) ``` **8. Run the script** Run the finished script: ```bash theme={null} python agents_as_tools.py ``` You should see a limerick and a haiku about the prompt, followed by the supervisor's pick. ## Clean up resources (optional) Promoted agents and their tools stay in your account until you remove them. When you are done, add this helper and call it to tear down everything the recipe created. ```python agents_as_tools.py theme={null} def cleanup(*agent_ids, tool_ids=()): for agent_id in agent_ids: try: client.agents.demote(agent_id) client.agents.delete(agent_id) print(f" Deleted agent {agent_id!r}") except Exception as e: print(f" Warning: could not delete agent {agent_id!r}: {e}") for tool_id in tool_ids: try: client.tools.delete(tool_id) print(f" Deleted tool {tool_id!r}") except Exception as e: print(f" Warning: could not delete tool {tool_id!r}: {e}") cleanup( supervisor.id, limerick_agent.id, haiku_agent.id, tool_ids=(limerick_tool.id, haiku_tool.id), ) ``` ## Next steps * **Add more specialists.** Wrap additional sub-agents (a sonnet writer, a translator) as tools and attach them to the supervisor. * **Route instead of fan out.** Change the supervisor's instructions so it picks the single best sub-agent for a prompt rather than calling all of them. * **Nest deeper.** A sub-agent can have tools of its own, including other agents, so you can build multi-level workflows. # Question-answering bot with confidence scoring Source: https://docs.seekr.com/flow/recipes/simple-question-answering-bot-with-confidence-scoring Build a Q&A bot with SeekrFlow that returns a confidence score alongside each answer. Beginner \~10 min Verified with seekrai 0.29.0 [Download Jupyter notebook](/notebooks/simple-question-answering-bot-with-confidence-scoring.json) This recipe builds a question-answering bot with SeekrFlow that pairs every answer with a confidence score, a signal for how much to trust the reply. It calls a chat model directly through SeekrFlow's serverless inference and parses the rating out of the response, with no extra frameworks. ## What you'll build A Q\&A bot that: 1. Answers questions about any topic. 2. Returns a confidence score with each answer. 3. Flags low-confidence answers for follow-up. ## Prerequisites * A SeekrFlow API key, set as the `SEEKR_API_KEY` environment variable * Python 3.8 or later * The SeekrFlow SDK: `pip install seekrai` > [!WARNING] > > Each question you ask is billed as serverless inference, charged by the token. ## Build it **1. Set up the client** Create `qa_bot.py` with the imports, configuration, and client. ```python qa_bot.py theme={null} import os import re from seekrai import SeekrFlow API_KEY = os.environ["SEEKR_API_KEY"] API_URL = "https://flow.seekr.com/v1/" MODEL_ID = "meta-llama/Meta-Llama-3-8B-Instruct" client = SeekrFlow(api_key=API_KEY, base_url=API_URL) ``` **2. Write the prompt** Write a prompt that asks the model for an answer followed by a confidence rating on its own line. Parsing depends on that `Confidence:` marker. Keep it in the instructions. ```python qa_bot.py theme={null} TEMPLATE = """Question: {question} Answer the question above. Then, on a new line starting with 'Confidence:', rate your confidence from 1 (complete guess) to 10 (absolutely certain), and briefly explain the rating. """ ``` **3. Parse the response** Write a helper that splits the answer from the confidence rating and its explanation. ```python qa_bot.py theme={null} def parse_response(response: str) -> dict: """Extract the answer, confidence score, and explanation from a reply.""" answer, confidence, explanation = response, "Not provided", "" if "Confidence:" in response: answer, _, confidence_part = response.partition("Confidence:") answer = answer.strip() confidence_part = confidence_part.strip() rating_match = re.search(r"(\d+)(/10)?", confidence_part) if rating_match: confidence = f"{rating_match.group(1)}/10" explanation = re.sub(r"^\d+(/10)?", "", confidence_part).strip() return {"answer": answer, "confidence": confidence, "explanation": explanation} ``` **4. Ask a question** Wrap the model call and parser in a function that prints the answer, its confidence, and a follow-up hint when confidence is low. A low temperature keeps answers more deterministic. ```python qa_bot.py theme={null} def ask_question(question: str) -> dict: """Send a question to the model and print the parsed result.""" response = client.chat.completions.create( model=MODEL_ID, messages=[{"role": "user", "content": TEMPLATE.format(question=question)}], temperature=0.3, ) parsed = parse_response(response.choices[0].message.content) print(f"Question: {question}\n") print(f"Answer: {parsed['answer']}\n") print(f"Confidence: {parsed['confidence']}") if parsed["explanation"]: print(f"Explanation: {parsed['explanation']}") if parsed["confidence"] in ("1/10", "2/10", "3/10"): print("\nLow confidence. Consider rephrasing or asking for more specifics.") return parsed ``` **5. Ask a few questions** Run a few questions of varying difficulty to see the confidence score change. ```python qa_bot.py theme={null} questions = [ "What is the capital of France?", "How do quantum computers work?", "When was the book 'Trilby' by George du Maurier published?", ] for q in questions: ask_question(q) print("-" * 50) ``` **6. Run the script** Run the finished script: ```bash theme={null} python qa_bot.py ``` Easy, well-known questions should come back with high confidence; obscure ones should score lower and trigger the follow-up hint. ## Next steps * **Keep context across turns.** Hold a running `messages` list and include prior turns in each call to answer follow-up questions in context. * **Tune the threshold.** Adjust which confidence scores trigger the follow-up hint to match how cautious you want the bot to be. * **Ground the answers.** Combine this with the [New hire onboarding agent with citations](/flow/recipes/new-hire-onboarding-agent-with-citations) so answers come from your own documents. # Simple RAG agent Source: https://docs.seekr.com/flow/recipes/simple-rag-agent Learn the SeekrFlow building blocks: upload a file, index it in a vector store, and give an agent a FileSearch tool to answer from it. Beginner \~15 min Verified with seekrai 0.29.0 [Download Jupyter notebook](/notebooks/simple-rag-agent.json) This recipe walks through the fundamental parts of the SeekrFlow SDK by building a retrieval-augmented generation (RAG) agent end to end: upload a document, index it in a vector database, wrap that database in a FileSearch tool, attach the tool to an agent, promote the agent, and ask it a question. The example writes its own sample document, so you can run the whole thing without preparing any files first. Once it works, swap in your own documents. ## What you'll build An agent that: 1. Indexes a document into a vector database. 2. Searches that database through a FileSearch tool. 3. Answers questions grounded in what it retrieves. ## Prerequisites * A SeekrFlow API key, set as the `SEEKR_API_KEY` environment variable * Python 3.8 or later * The SeekrFlow SDK: `pip install seekrai` > [!WARNING] > > This recipe creates billable resources. When you are done, remove them with the > [cleanup step](#clean-up). ## Build it **1. Set up the client** Create `rag_agent.py` with the imports, configuration, and client. `RUN_ID` adds a short unique suffix to the resource names so repeat runs don't collide. ```python rag_agent.py theme={null} import os import time import tempfile import uuid from pathlib import Path from seekrai import SeekrFlow from seekrai.types import FilePurpose from seekrai.types.tools import CreateFileSearch, FileSearchConfig from seekrai.types.agents.agent import CreateAgentRequest API_KEY = os.environ["SEEKR_API_KEY"] API_URL = "https://flow.seekr.com/v1/" MODEL_ID = "meta-llama/Llama-3.3-70B-Instruct" EMBED_MODEL = "intfloat/e5-mistral-7b-instruct" RUN_ID = uuid.uuid4().hex[:8] client = SeekrFlow(api_key=API_KEY, base_url=API_URL) ``` **2. Create and upload a document** Write a short Markdown document to a temporary file and upload it with `purpose=FilePurpose.Alignment`, which marks it for data-engine ingestion. ```python rag_agent.py theme={null} document = """\ # Seekr Technologies — Quick Facts Seekr Technologies is an AI company focused on developing trustworthy AI systems. Key facts: - Headquarters: Reston, Virginia, USA - Product: SeekrFlow, a platform for building and deploying AI agents - Mission: responsible AI that people can trust - SeekrFlow supports multi-agent orchestration, RAG, and custom Python tools """ with tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False, prefix="seekr_facts_") as f: f.write(document) tmp_path = Path(f.name) file_obj = client.files.upload(tmp_path, purpose=FilePurpose.Alignment) print(f"Uploaded: {file_obj.id} ({file_obj.filename})") ``` > [accordion] Upload several files at once > > To index several documents, upload them with `client.files.bulk_upload`, collect > the returned IDs, and include them all in a single `create_ingestion_job` call. > > ```python theme={null} > paths = ["guidebook.pdf", "policies.md", "faq.docx"] > uploaded = client.files.bulk_upload(paths, purpose=FilePurpose.Alignment) > file_ids = [f.id for f in uploaded] > > # Then ingest them together: > # client.vector_database.create_ingestion_job(database_id=db.id, files=file_ids) > ``` **3. Create a vector database** Create a vector database. Documents you ingest are embedded with the model you name here and stored for retrieval. ```python rag_agent.py theme={null} db = client.vector_database.create( name=f"RAG Demo DB {RUN_ID}", model=EMBED_MODEL, description="Demo vector database for the RAG agent walkthrough.", ) print(f"Created vector database: {db.id}") ``` **4. Ingest the document** Start an ingestion job to chunk, embed, and store the file, then poll until it completes. ```python rag_agent.py theme={null} job = client.vector_database.create_ingestion_job(database_id=db.id, files=[file_obj.id]) print(f"Ingestion job: {job.id} ({job.status})") deadline = time.time() + 300 while time.time() < deadline: job = client.vector_database.retrieve_ingestion_job(db.id, job.id) print(f" status: {job.status}") if job.status == "completed": break if job.status in ("failed", "error"): raise RuntimeError(f"Ingestion failed: {job.error_message}") time.sleep(5) else: raise TimeoutError("Ingestion did not complete within 300s.") print("Ingestion complete.") ``` **5. Create a FileSearch tool** Wrap the vector database in a FileSearch tool. The `file_search_index` points the tool at your database, and the `description` tells the agent when to use it. ```python rag_agent.py theme={null} tool = client.tools.create( CreateFileSearch( name=f"seekr_facts_search_{RUN_ID}", description="Search the Seekr Technologies knowledge base for facts about the company.", config=FileSearchConfig(file_search_index=db.id), ) ) print(f"Created tool: {tool.id}") ``` **6. Create the agent** Create an agent, attach the tool by ID, and instruct it to answer from what the tool retrieves. ```python rag_agent.py theme={null} agent = client.agents.create( CreateAgentRequest( name=f"RAG Demo Agent {RUN_ID}", instructions=( "You are a helpful assistant with access to a knowledge base about Seekr Technologies. " "When the user asks a question, search the knowledge base using your tool and answer " "based on what you find." ), model_id=MODEL_ID, tool_ids=[tool.id], ) ) print(f"Created agent: {agent.id}") ``` **7. Promote the agent** Promote the agent to deploy it, then wait for it to become `Active`. ```python rag_agent.py theme={null} client.agents.promote(agent.id) deadline = time.time() + 120 while time.time() < deadline: agent = client.agents.retrieve(agent.id) print(f" status: {agent.status.value}") if agent.status.value == "Active": break if agent.status.value == "Failed": raise RuntimeError("Agent failed to deploy.") time.sleep(3) else: raise TimeoutError("Agent did not become Active within 120s.") print("Agent is Active.") ``` **8. Ask a question** Create a thread, send a question, wait for the run to finish, and print the agent's reply. ```python rag_agent.py theme={null} thread = client.agents.threads.create() client.agents.threads.create_message( thread_id=thread.id, role="user", content="Where is Seekr Technologies headquartered and what do they make?", ) run_response = client.agents.runs.run(agent_id=agent.id, thread_id=thread.id, stream=False) deadline = time.time() + 300 while time.time() < deadline: run = client.agents.runs.retrieve(run_response.run_id, thread.id) if run.status.value == "completed": break if run.status.value in ("failed", "canceled"): raise RuntimeError(f"Run ended with status: {run.status.value}") time.sleep(3) else: raise TimeoutError("Run did not complete within 300s.") messages = client.agents.threads.list_messages(thread.id, limit=10, order="desc") answer = next((m.content for m in messages if m.role == "assistant"), "(no assistant message found)") print("\nAgent answer:\n") print(answer if isinstance(answer, str) else str(answer)) ``` **9. Run the script** Run the finished script: ```bash theme={null} python rag_agent.py ``` The agent searches the indexed document and answers that Seekr Technologies is headquartered in Reston, Virginia, and builds SeekrFlow. ## Clean up resources (optional) This shuts down the agent and removes the tool, vector database, and file the recipe created. ```python rag_agent.py theme={null} client.agents.demote(agent.id) client.agents.delete(agent.id) client.tools.delete(tool.id) client.vector_database.delete(db.id) client.files.delete(file_obj.id) print("Deleted the agent, tool, vector database, and file.") ``` ## Next steps * **Use your own documents.** Replace the inline document with real files (PDF, DOCX, or Markdown) to build a knowledge base for your own domain. * **Add citations and confidence.** See [New hire onboarding agent with citations](/flow/recipes/new-hire-onboarding-agent-with-citations) for a version that rates its confidence and cites sources. * **Tune retrieval.** Set `top_k` and `score_threshold` on `FileSearchConfig` to control how much context the tool returns. # Weather agent with a custom Python tool Source: https://docs.seekr.com/flow/recipes/weather-agent-custom-python-tool Build a SeekrFlow agent that calls your own Python function as a tool, where the function fetches live data from an external API. Beginner \~15 min Verified with seekrai 0.29.0 [Download Jupyter notebook](/notebooks/weather-agent-custom-python-tool.json) This recipe shows the smallest useful pattern for extending an agent with your own code: you write a plain Python function, register it as a custom function, wrap it in a `run_python` tool, and attach that tool to an agent. When the agent decides it needs live data, SeekrFlow runs your function and feeds the result back into the conversation. The example function calls a public weather API ([wttr.in](https://wttr.in)) and returns the forecast for a single ZIP code, so you can see the full round trip from agent to your code to a third-party service and back. ## What you'll build An agent that: 1. Exposes a custom Python function as a `run_python` tool. 2. Calls the tool whenever the user asks about the weather. 3. Runs your function, which requests live data from an external API. 4. Reports back exactly what the API returned. ## Prerequisites * A SeekrFlow API key, set as the `SEEKR_API_KEY` environment variable * Python 3.8 or later * The SeekrFlow SDK: `pip install seekrai` > [!WARNING] > > This recipe creates billable resources. When you are done, remove them with the > [cleanup step](#clean-up). ## Build it **1. Write the weather function** Save the following as `weather_fn.py`. This is an ordinary Python function with no SeekrFlow dependencies. The docstring matters: SeekrFlow uses it to tell the agent what the tool does and when to call it, so write it the way you would write a tool description. ```python weather_fn.py theme={null} import urllib.request import urllib.error def get_current_weather() -> str: """Get the current weather for ZIP code 22207 (Arlington, VA). Fetches live weather data from a public API. Always call this tool when the user asks about the weather or wants a weather report. Returns: str: Raw weather data from the API, or an error message. """ url = "https://wttr.in/22207?0" try: req = urllib.request.Request(url, headers={"User-Agent": "curl/7.64.1"}) with urllib.request.urlopen(req, timeout=10) as resp: status = resp.status body = resp.read().decode() return f"[HTTP {status}] {body}" except urllib.error.HTTPError as e: return f"[HTTPError {e.code}] {e.reason}: {e.read().decode()}" except urllib.error.URLError as e: return f"[URLError] {e.reason}" except Exception as e: return f"[Error] {type(e).__name__}: {e}" ``` > [!NOTE] > > The function catches its own errors and returns them as a string instead of > raising. That way a failed API call comes back to the agent as readable text it > can relay, rather than crashing the run. **2. Set up the client** Create a second file, `weather_agent.py`, for the agent itself. Start with the imports, configuration, and client. Keep `weather_fn.py` in the same directory, since you will upload it by path in a later step. ```python weather_agent.py theme={null} import os import time from seekrai import SeekrFlow from seekrai.types.tools import CreateRunPython, RunPythonConfig from seekrai.types.agents.agent import CreateAgentRequest API_KEY = os.environ["SEEKR_API_KEY"] API_URL = "https://flow.seekr.com/v1/" MODEL_ID = "meta-llama/Llama-3.1-70B-Instruct" FUNCTION_FILE = "weather_fn.py" AGENT_NAME = "Weather Agent" TOOL_NAME = "weather_tool" FUNCTION_NAME = "get_current_weather" client = SeekrFlow(api_key=API_KEY, base_url=API_URL) ``` > [!NOTE] > > This recipe uses `meta-llama/Llama-3.1-70B-Instruct`. A larger instruct model > follows the "always call the tool" instruction reliably and handles the > tool-calling handshake well. Any instruct model that supports tool calling > works here, so you can substitute a smaller or newer model such as > `meta-llama/Llama-3.3-70B-Instruct` to trade some quality for speed and cost. **3. Add two helper functions** These helpers wait for asynchronous operations to finish: one polls a run until it completes, and one polls the agent until it is `Active` after promotion. Add them to `weather_agent.py`. ```python weather_agent.py theme={null} def run_agent(agent_id: str, prompt: str, timeout: int = 300) -> str: thread = client.agents.threads.create() client.agents.threads.create_message(thread_id=thread.id, role="user", content=prompt) run_response = client.agents.runs.run(agent_id=agent_id, thread_id=thread.id, stream=False) deadline = time.time() + timeout while time.time() < deadline: run = client.agents.runs.retrieve(run_response.run_id, thread.id) if run.status.value == "completed": break if run.status.value in ("failed", "canceled"): raise RuntimeError(f"Run ended with status: {run.status.value}") time.sleep(3) else: raise TimeoutError(f"Run did not complete within {timeout}s.") messages = client.agents.threads.list_messages(thread.id, limit=10, order="desc") for msg in messages: if msg.role == "assistant": return msg.content if isinstance(msg.content, str) else str(msg.content) return "(no assistant message found)" def promote_and_wait(agent_id: str, timeout: int = 120) -> None: client.agents.promote(agent_id) deadline = time.time() + timeout while time.time() < deadline: agent = client.agents.retrieve(agent_id) if agent.status.value == "Active": return if agent.status.value == "Failed": raise RuntimeError(f"Agent {agent_id} failed to deploy.") time.sleep(3) raise TimeoutError(f"Agent did not become Active within {timeout}s.") ``` **4. Register the custom function** Upload `weather_fn.py` so SeekrFlow can run it. The returned function ID connects your code to the tool in the next step. ```python weather_agent.py theme={null} fn = client.agents.custom_functions.create(file_path=FUNCTION_FILE) print(f"Function registered: {fn.id!r}") ``` **5. Create the run_python tool** Wrap the registered function in a `run_python` tool. The `description` is what the agent sees when it decides whether to call the tool, so make it specific. ```python weather_agent.py theme={null} tool = client.tools.create( CreateRunPython( name=TOOL_NAME, description="Fetches the current weather for ZIP code 22207 (Arlington, VA) from a live API.", config=RunPythonConfig(function_ids=[fn.id]), ) ) print(f"Tool created: {tool.id!r}") ``` **6. Create the agent** Create the agent, attach the tool by ID, and give it instructions that tell it to always call the tool for weather questions. ```python weather_agent.py theme={null} agent = client.agents.create( CreateAgentRequest( name=AGENT_NAME, instructions=( "You are a weather assistant. Whenever the user asks about the weather, " "you MUST call the 'weather_tool' first and then report exactly what it returned." ), model_id=MODEL_ID, tool_ids=[tool.id], ) ) print(f"Agent created: {agent.id!r}") ``` **7. Promote the agent** Promote the agent to deploy it, then wait for it to become `Active`. ```python weather_agent.py theme={null} promote_and_wait(agent.id) print(f"'{AGENT_NAME}' is Active.") ``` **8. Send a prompt** Send a prompt and print the agent's reply. Because the instructions require it, the agent calls your function, which requests live data from wttr.in, and then reports the result. ```python weather_agent.py theme={null} response = run_agent(agent.id, "What's the weather like right now?") print("\nAgent says:\n") print(response) ``` **9. Run the script** Run the finished script: ```bash theme={null} python weather_agent.py ``` You should see the agent report the current Arlington, VA forecast, sourced live from the weather API through your function. ## Clean up resources (optional) Promoted agents and their tools stay in your account until you remove them. When you are done experimenting, tear down the resources this recipe created. This deletes every agent, tool, and function that matches the names set at the top of `weather_agent.py`, so run it only against a scratch account. ```python weather_agent.py theme={null} for a in [a for a in client.agents.list_agents() if a.name == AGENT_NAME]: try: client.agents.demote(a.id) except Exception: pass client.agents.delete(a.id) print(f"Deleted agent: {a.id!r}") for t in [t for t in client.tools.list().data if t.name == TOOL_NAME]: client.tools.delete(t.id) print(f"Deleted tool: {t.id!r}") for f in [f for f in client.agents.custom_functions.list_functions() if f.name == FUNCTION_NAME]: client.agents.custom_functions.delete(f.id) print(f"Deleted function: {f.id!r}") ``` ## Next steps * **Accept parameters.** The function takes no arguments, so it always reports the same ZIP code. Add a `zip_code: str` parameter and describe it in the docstring so the agent can supply the location from the user's question. * **Call your own API.** Swap the wttr.in request for a call to an internal service to give the agent access to your own live data. * **Add more tools.** Attach several functions to one agent and let it choose which to call based on the question. # Acknowledge inference job results Source: https://docs.seekr.com/flow/reference/acknowledge_inference_job_results_v1_inference_jobs__job_id__results_ack_post post /v1/inference/jobs/{job_id}/results/ack Confirm that you've stored inference job results. # Add files to data job Source: https://docs.seekr.com/flow/reference/add_files_to_data_job_v1_flow_data_jobs__data_job_id__add_files_post post /v1/flow/data-jobs/{data_job_id}/add-files Add files to an existing data job. Attach one or more uploaded file IDs to a data job. For non-Markdown files (PDF, DOCX, PPT), ingestion starts automatically — no separate ingestion call is needed. Markdown files bypass ingestion and are alignment-ready immediately. The job status moves to `file_processing` while ingestion runs, then transitions to `needs_review` or `ready_to_start` once complete. For status states and per-file tracking, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # Delete alignment job Source: https://docs.seekr.com/flow/reference/alignment_delete_v1_flow_alignment__alignment_job_id__delete delete /v1/flow/alignment/{alignment_job_id} Permanently delete an alignment job. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use the data jobs endpoints instead. # Generate training pairs Source: https://docs.seekr.com/flow/reference/alignment_generate_v1_flow_alignment_generate_post post /v1/flow/alignment/generate Generate instruction fine-tuning pairs from your data for use in alignment jobs. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use the data jobs workflow: [`POST /v1/flow/data-jobs`](/flow/reference/submit_data_job_v1_flow_data_jobs_post) to create a job, [`POST /v1/flow/data-jobs/{data_job_id}/add-files`](/flow/reference/add_files_to_data_job_v1_flow_data_jobs__data_job_id__add_files_post) to attach files and convert any non-Markdown files automatically, then [`POST /v1/flow/data-jobs/{data_job_id}/start`](/flow/reference/start_data_job_alignment_v1_flow_data_jobs__data_job_id__start_post) to run alignment. # Get alignment job Source: https://docs.seekr.com/flow/reference/alignment_get_v1_flow_alignment__alignment_job_id__get get /v1/flow/alignment/{alignment_job_id} Retrieve the status and details of a specific alignment job. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use the data jobs endpoints instead. # List alignment jobs Source: https://docs.seekr.com/flow/reference/alignment_list_v1_flow_alignment_get get /v1/flow/alignment Retrieve a list of all alignment jobs in your team. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use the data jobs endpoints instead. # Get alignment metadata Source: https://docs.seekr.com/flow/reference/alignment_outputs_v1_flow_alignment__alignment_job_id__outputs_get get /v1/flow/alignment/{alignment_job_id}/outputs Retrieve the output file metadata for a completed alignment job. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use [`GET /v1/flow/data-jobs/{data_job_id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get) and read `alignment_job.output_files`. # Add inference job requests Source: https://docs.seekr.com/flow/reference/append_inference_job_requests_v1_inference_jobs__job_id__requests_post post /v1/inference/jobs/{job_id}/requests Add chat completion requests to a draft inference job. # Attach to run stream Source: https://docs.seekr.com/flow/reference/attach_to_run_v1_threads__thread_id__runs__run_id__attach_get get /v1/threads/{thread_id}/runs/{run_id}/attach Attach to a run for SSE streaming output. # Bulk upload files Source: https://docs.seekr.com/flow/reference/bulk_file_upload_v1_flow_bulk_files_put put /v1/flow/bulk_files Upload multiple files in a single request. > [!WARNING] > > Use [`PUT /v1/flow/files`](/flow/reference/file_upload_v1_flow_files_put) to upload files instead of this deprecated endpoint. # Cancel alignment job Source: https://docs.seekr.com/flow/reference/cancel_alignment_job_v1_flow_alignment__alignment_job_id__cancel_post post /v1/flow/alignment/{alignment_job_id}/cancel Cancel an alignment job that is queued or in progress. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use the data jobs endpoints instead. # Cancel data job Source: https://docs.seekr.com/flow/reference/cancel_data_job_v1_flow_data_jobs__data_job_id__cancel_post post /v1/flow/data-jobs/{data_job_id}/cancel Cancel the alignment job associated with a data job. Cancels the alignment job associated with the specified data job. The job status transitions to `canceled`. Use this to stop a job that is currently running. For job management operations, see [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs). # Cancel fine-tuning job Source: https://docs.seekr.com/flow/reference/cancel_fine_tune_v1_flow_fine_tunes__fine_tune_id__cancel_put put /v1/flow/fine-tunes/{fine_tune_id}/cancel Cancel a fine-tuning job that is queued or in progress. # Cancel inference job Source: https://docs.seekr.com/flow/reference/cancel_inference_job_v1_inference_jobs__job_id__cancel_post post /v1/inference/jobs/{job_id}/cancel Cancel an inference job. # Cancel run Source: https://docs.seekr.com/flow/reference/cancel_run_v1_threads__thread_id__runs__run_id__cancel_post post /v1/threads/{thread_id}/runs/{run_id}/cancel Cancel an in-progress agent run. # Clone data job Source: https://docs.seekr.com/flow/reference/clone_data_job_v1_flow_data_jobs__data_job_id__clone_post post /v1/flow/data-jobs/{data_job_id}/clone Create a new, editable data job pre-populated from an existing one. # Create inference job Source: https://docs.seekr.com/flow/reference/create_inference_job_v1_inference_jobs_post post /v1/inference/jobs Create an empty inference job to add chat completion requests to. The job runs after you submit it. # Create message Source: https://docs.seekr.com/flow/reference/create_message_endpoint_v1_threads__thread_id__messages_post post /v1/threads/{thread_id}/messages Create a new message in a thread. # Create thread Source: https://docs.seekr.com/flow/reference/create_thread_endpoint_v1_threads_post post /v1/threads Create a new thread. # Create tool Source: https://docs.seekr.com/flow/reference/create_tool_v1_flow_tools_post post /v1/flow/tools Create a new tool that agents can use to extend their capabilities. Create a tool to extend an agent's capabilities. Supported tool types include file search, web search, code interpreter, custom tools, agent as tool, and MCP connector. For an overview of all tool types and how they work, see [Tools](/flow/sdk/agents/tools). ## MCP connector To create an MCP connector tool, set `type` to `mcp_connector` and provide the server URL in `config.URL`. Optionally include `config.CLIENT_ID` and `config.CLIENT_SECRET` if your MCP server requires OAuth without dynamic client registration. If an OAuth flow is required, the tool is created with a status of `pending_authorization`. Open the `AUTHORIZATION_URL` from the response in a browser and complete the flow. Once authorized, the tool status changes to `active` and it can be linked to an agent. If you don't complete the flow within one hour, the OAuth window expires and the tool moves to `failed` status. To use it again, delete it and create a new one. For servers that require no authentication, the tool is created with `active` status and can be linked to an agent immediately. For a full walkthrough including SDK examples, see [MCP connector](/flow/sdk/agents/mcp-connector). ## Agent as tool To create an agent-as-tool, set `type` to `agent_as_tool` and provide the sub-agent's ID in `config.agent_id`. The sub-agent must already exist before creating the tool. Each agent can only have one agent-as-tool. If an agent-as-tool already exists for the provided `agent_id`, the request returns an error. ### Errors * `"Tool already exists: "` — A tool with this name already exists. Tool names must be unique per user. * `"Tool already exists for given agent: "` — An agent-as-tool already exists for this agent. Each agent can only have one. For a full walkthrough including SDK examples and constraints, see [Agent as tool](/flow/sdk/agents/agent-as-tool). # Create agent v1 Source: https://docs.seekr.com/flow/reference/create_v1_flow_agents_create_post post /v1/flow/agents/create Create a new agent with a model, instructions, and optional tools. > [!WARNING] > > Use [`POST /v2/flow/agents/create`](/flow/reference/create_v2_flow_agents_create_post) instead of this deprecated endpoint. Create an agent configuration that defines the model, instructions, reasoning effort, and tools the agent can use. The `tool_ids` parameter accepts IDs for any tool type, including agent-as-tools. When including agent-as-tools, the sub-agents and their tool wrappers must already exist before creating the supervisor agent. For details on building multi-agent workflows, see [Agent as tool](/flow/sdk/agents/agent-as-tool). # Create agent Source: https://docs.seekr.com/flow/reference/create_v2_flow_agents_create_post post /v2/flow/agents/create Create a new agent with a model, instructions, and optional tools. Create an agent configuration that defines the model, instructions, reasoning effort, and tools the agent can use. The `tool_ids` parameter accepts IDs for any tool type, including agent-as-tools. When including agent-as-tools, the sub-agents and their tool wrappers must already exist before creating the supervisor agent. For details on building multi-agent workflows, see [Agent as tool](/flow/sdk/agents/agent-as-tool). # Create vector database ingestion job Source: https://docs.seekr.com/flow/reference/create_vector_database_ingestion_job_v1_flow_vectordb__database_id__ingestion_post post /v1/flow/vectordb/{database_id}/ingestion Start a new ingestion job to add files to a vector database. Submit file IDs and chunking configuration to start a vector database ingestion job. The system converts files, generates embeddings, and indexes them in the specified database. The response includes a `file_records` array with per-file tracking. Each record contains the file's status, timestamps for each state transition, and error diagnostics if a failure occurs. Ingestion also captures source tracing metadata for every chunk — line numbers, character offsets, heading hierarchy, and source page number — stored alongside the embedding. This enables full provenance tracing from model output back to the original uploaded file via the chunk endpoint. For job states, error codes, and SDK examples, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). To get started with vector databases, see [Create and populate a vector database](https://docs.seekr.com/docs/create-and-populate-a-vector-database-sdk). # Create vector database Source: https://docs.seekr.com/flow/reference/create_vector_database_route_v1_flow_vectordb_post post /v1/flow/vectordb Create a new vector database for use with file search tools. # Data jobs Source: https://docs.seekr.com/flow/reference/data-jobs Data jobs are the primary workflow for generating AI-ready training datasets. Each job bundles file ingestion, Markdown review, prompt generation, and alignment configuration into a single tracked operation. For SDK walkthroughs, see [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning), [Create context-grounded fine-tuning data](/flow/sdk/data-engine/context-grounded-fine-tuning-data), and [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs). # Delete data job Source: https://docs.seekr.com/flow/reference/delete_data_job_v1_flow_data_jobs__data_job_id__delete delete /v1/flow/data-jobs/{data_job_id} Permanently delete a data job and its associated alignment job. # Delete file Source: https://docs.seekr.com/flow/reference/delete_file_v1_flow_files__file_id__delete delete /v1/flow/files/{file_id} Permanently delete a file from your team. # Delete fine-tuning job Source: https://docs.seekr.com/flow/reference/delete_fine_tune_v1_flow_fine_tunes__fine_tune_id__delete delete /v1/flow/fine-tunes/{fine_tune_id} Delete a fine-tuning job and its associated artifacts. # Delete message Source: https://docs.seekr.com/flow/reference/delete_message_endpoint_v1_threads__thread_id__messages__message_id__delete delete /v1/threads/{thread_id}/messages/{message_id} Delete a message by ID. # Delete project Source: https://docs.seekr.com/flow/reference/delete_project_v1_flow_projects__project_id__delete delete /v1/flow/projects/{project_id} Delete a project and disassociate it from its fine-tuning jobs. # Delete function Source: https://docs.seekr.com/flow/reference/delete_python_function_endpoint_v1_functions__function_id__delete delete /v1/functions/{function_id} Delete a Python function by its ID for your team. # Delete thread Source: https://docs.seekr.com/flow/reference/delete_thread_endpoint_v1_threads__thread_id__delete delete /v1/threads/{thread_id} Delete a thread by ID. # Delete tool Source: https://docs.seekr.com/flow/reference/delete_tool_v1_flow_tools__tool_id__delete delete /v1/flow/tools/{tool_id} Delete a tool if it's not referenced by active agents. Permanently delete a tool. A tool cannot be deleted while it is linked to an active agent. Remove the tool from the agent's `tool_ids` first, or demote the agent. ## Agent as tool Deleting an agent-as-tool removes the tool only. The underlying sub-agent is not affected and remains in its current state. # Delete agent v1 Source: https://docs.seekr.com/flow/reference/delete_v1_flow_agents__agent_id__delete delete /v1/flow/agents/{agent_id} Permanently delete an agent by ID. > [!WARNING] > > Use [`DELETE /v2/flow/agents/{agent_id}`](/flow/reference/delete_v2_flow_agents__agent_id__delete) instead of this deprecated endpoint. Permanently remove an agent from the platform. If the agent is currently active, it is demoted first. For demote-only, use the demote endpoint. Deleting a supervisor does not affect its sub-agents or their agent-as-tool wrappers. A sub-agent cannot be deleted while it is still linked to a supervisor. Unlink it and delete its associated agent-as-tool first. # Delete agent Source: https://docs.seekr.com/flow/reference/delete_v2_flow_agents__agent_id__delete delete /v2/flow/agents/{agent_id} Permanently delete an agent by ID. Permanently remove an agent from the platform. If the agent is currently active, it is demoted first. For demote-only, use the demote endpoint. Deleting a supervisor does not affect its sub-agents or their agent-as-tool wrappers. A sub-agent cannot be deleted while it is still linked to a supervisor. Unlink it and delete its associated agent-as-tool first. # Delete file in vector database Source: https://docs.seekr.com/flow/reference/delete_vector_database_file_v1_flow_vectordb__database_id__files__file_id__delete delete /v1/flow/vectordb/{database_id}/files/{file_id} Remove a file from a vector database. # Delete vector database Source: https://docs.seekr.com/flow/reference/delete_vector_database_route_v1_flow_vectordb__database_id__delete delete /v1/flow/vectordb/{database_id} Permanently delete a vector database and its contents. # Demote agent v1 Source: https://docs.seekr.com/flow/reference/demote_v1_flow_agents__agent_id__demote_put put /v1/flow/agents/{agent_id}/demote Demote an agent to inactive status. > [!WARNING] > > Use [`PUT /v2/flow/agents/{agent_id}/demote`](/flow/reference/demote_v2_flow_agents__agent_id__demote_put) instead of this deprecated endpoint. Move an agent to an inactive state. The agent's configuration is retained but it will not handle inference requests. When demoting an agent that has other agents linked as tools, the linked agents are not automatically demoted — each must be demoted individually if needed. An agent that is linked as a tool to another agent cannot be demoted while that relationship is active. Demote the parent agent first, or unlink the agent-as-tool. # Demote deployment Source: https://docs.seekr.com/flow/reference/demote_v1_flow_deployments__deployment_id__demote_put put /v1/flow/deployments/{deployment_id}/demote Move a deployment from production to staging status. # Demote agent Source: https://docs.seekr.com/flow/reference/demote_v2_flow_agents__agent_id__demote_put put /v2/flow/agents/{agent_id}/demote Demote an agent to inactive status. Move an agent to an inactive state. The agent's configuration is retained but it will not handle inference requests. When demoting an agent that has other agents linked as tools, the linked agents are not automatically demoted. Demote each one individually if needed. An agent that is linked as a tool to another agent cannot be demoted while that relationship is active. Demote the parent agent first, or unlink the agent-as-tool. # Create deployment Source: https://docs.seekr.com/flow/reference/deploy_v1_flow_deployments_post post /v1/flow/deployments Deploy a fine-tuned model to a serving endpoint. # Get deployment Source: https://docs.seekr.com/flow/reference/deployment_by_id_v1_flow_deployments__deployment_id__get get /v1/flow/deployments/{deployment_id} Retrieve the configuration and status of a specific deployment. # Preview tool update Source: https://docs.seekr.com/flow/reference/diff_tool_changes_v1_flow_tools__tool_id__diff_patch patch /v1/flow/tools/{tool_id}/diff Preview the changes a patch request would make to a tool without applying them. Returns a before-and-after diff of the affected fields. Tool type cannot be changed after creation. If you include the `type` field in your request, it must match the existing tool type. # Preview agent update v1 Source: https://docs.seekr.com/flow/reference/diff_v1_flow_agents__agent_id__diff_patch patch /v1/flow/agents/{agent_id}/diff Preview the changes a patch request would make to an agent without applying them. Returns a before-and-after diff of the affected fields. > [!WARNING] > > Use [`PATCH /v2/flow/agents/{agent_id}/diff`](/flow/reference/diff_v2_flow_agents__agent_id__diff_patch) instead of this deprecated endpoint. # Preview agent update Source: https://docs.seekr.com/flow/reference/diff_v2_flow_agents__agent_id__diff_patch patch /v2/flow/agents/{agent_id}/diff Preview the changes a patch request would make to an agent without applying them. Returns a before-and-after diff of the affected fields. # Download fine-tune Source: https://docs.seekr.com/flow/reference/download_fine_tune_v1_flow_fine_tunes__fine_tune_id__download_get get /v1/flow/fine-tunes/{fine_tune_id}/download Download the artifacts for a completed fine-tuning job. # Clone tool Source: https://docs.seekr.com/flow/reference/duplicate_tool_v1_flow_tools__tool_id__duplicate_post post /v1/flow/tools/{tool_id}/duplicate Duplicate an existing tool with a new name. Create a copy of an existing tool. The duplicated tool gets a new ID and can optionally be given a new name. > [!WARNING] > > Agent-as-tool type tools cannot be duplicated. Attempting to duplicate an agent-as-tool returns an error. # Error handling Source: https://docs.seekr.com/flow/reference/error-handling Learn about HTTP status codes and error response formats returned by the Seekr API. ## Status codes The Seekr API follows standard HTTP status codes with each response. | HTTP Status Code | Status | Description | | - | - | - | | 200 | Success | Successful request! Check the body for appropriate response. | | 204 | Success (No content) | The request was successful and completed, but there is no content to return. Commonly used for successful DELETE operations. | | 400 | Bad Request | Something was incorrect in the request being made. Examples: missing required parameters for a method, malformed request data or bad format. See the message field for specific reason | | 401 | Unauthorized | The request either had no Authorization header included, was wrongly formatted or the Seekr API key passed is not valid. Please contact us. | | 403 | Forbidden | The Seekr API key passed as valid but does not have permission to access the method it was calling. | | 404 | Not Found | Incorrect URL that does not exist. Check the URL for the individual method you are trying to access. | | 422 | Unprocessable Entity | The request was valid but contains semantic errors. This occurs when request validation fails—for example, missing required parameters, incorrect data types, or values that don't meet validation requirements. The response includes detailed validation error messages. | | 500 | Internal Server Error | Oops, that wasn't supposed to happen. Something unexpected went wrong on the Seekr API end. This automatically triggers alerts that engineers respond to. | | 503 | Service Unavailable | Service is temporarily unavailable. This is highly uncommon and would be preceded by a notice of scheduled maintenance. | ## Additional error information Along with the specific the status code, the response will contain additional information about the error with the request. A sample error response will look like this: ```json JSON theme={null} { "error": "Bad Request", "feedVersion": "1.0.0", "message": "The URL is malformed", "requestUrl": "https://services-api.seekr.com/api/v1/news/?url=https%3A%2F%2Fnews.com%2Farticle", "status": 400 } ``` The `message` field will contain useful and specific information about the error to aid the developer in resolving the problem. # Get file contents Source: https://docs.seekr.com/flow/reference/file_download_content_v1_flow_files__file_id__content_get get /v1/flow/files/{file_id}/content Download the raw content of a file by ID. # Get file details Source: https://docs.seekr.com/flow/reference/file_download_v1_flow_files__file_id__get get /v1/flow/files/{file_id} Retrieve metadata and details for a specific file. # Get file token count Source: https://docs.seekr.com/flow/reference/file_token_counts_v1_flow_files_token_counts_get get /v1/flow/files/token-counts Get the token count for one or more files. # Upload file Source: https://docs.seekr.com/flow/reference/file_upload_v1_flow_files_put put /v1/flow/files Upload a file to your team for use in fine-tuning, alignment, or vector databases. ## Purpose values and file formats Each `purpose` value requires a specific JSONL schema. Each line of the file must be a valid JSON object matching the format for the chosen purpose. ### `fine-tune` and `alignment` Each line requires a `messages` array of `{"role", "content"}` objects. Valid roles are `system`, `user`, and `assistant`. ```json theme={null} {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}, {"role": "assistant", "content": "The capital of France is Paris."}]} ``` ### `preference-fine-tune` Each line requires three fields — `messages`, `chosen`, and `rejected` — each an array of `{"role", "content"}` objects. ```json theme={null} {"messages": [{"role": "user", "content": "What is the capital of France?"}], "chosen": [{"role": "user", "content": "What is the capital of France?"}, {"role": "assistant", "content": "Paris."}], "rejected": [{"role": "user", "content": "What is the capital of France?"}, {"role": "assistant", "content": "Lyon."}]} ``` ### `pre-train` Each line requires a single `text` field containing raw training text. ```json theme={null} {"text": "Raw training text goes here."} ``` # Validate file metadata Source: https://docs.seekr.com/flow/reference/file_validate_metadata_v1_flow_files_validate_metadata_post post /v1/flow/files/validate_metadata Validate file metadata before uploading. > [!WARNING] > > Use [`PUT /v1/flow/files`](/flow/reference/file_upload_v1_flow_files_put) to upload files instead of this deprecated endpoint. # Create fine-tuning job Source: https://docs.seekr.com/flow/reference/fine_tune_v1_flow_fine_tune_post post /v1/flow/fine-tune Create a new fine-tuning job using the specified base model and training files. Create a fine-tuning job by specifying a `TrainingConfig` and `InfrastructureConfig`. The `TrainingConfig` accepts an optional `lora_config` parameter for parameter-efficient training using low-rank adaptation. For guidance on configuring LoRA, see [Low-rank adaptation](/flow/sdk/fine-tuning/lora). For the full fine-tuning workflow, see [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job). # Generate system prompt Source: https://docs.seekr.com/flow/reference/generate_system_prompt_v1_flow_data_jobs_gen_system_prompt_post post /v1/flow/data-jobs/gen_system_prompt Generate a system prompt based on a use case description and optional source documents. Generate a system prompt from user-provided instructions. This endpoint is not tied to a specific data job and can be called before or after job creation. The generated prompt can then be set on a `principle_files` job via `PATCH /v1/flow/data-jobs/{id}`. For usage in context, see [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning). # Generate metadata snapshot Source: https://docs.seekr.com/flow/reference/generate_vector_database_metadata_snapshot_v1_flow_vectordb__database_id__metadata_post post /v1/flow/vectordb/{database_id}/metadata Generate or refresh the metadata snapshot for a vector database by sampling its chunks and ranking the most common metadata keys and values. Sample the vector database's chunks and store a fresh metadata snapshot. The snapshot records the most common metadata keys, the most frequent values for each key, and each key's inferred type, capturing up to the 100 most common keys with up to 10 values each from as many as 10,000 chunks. Generating a snapshot replaces the previous one for the vector database rather than adding to it. SeekrFlow also regenerates the snapshot automatically after an ingestion job adds documents. For SDK examples, see [Generate a metadata snapshot](/flow/sdk/data-engine/generate-metadata-snapshot). # Get agent v1 Source: https://docs.seekr.com/flow/reference/get_agent_by_id_v1_flow_agents__agent_id__get get /v1/flow/agents/{agent_id} Retrieve an agent's configuration by ID. > [!WARNING] > > Use [`GET /v2/flow/agents/{agent_id}`](/flow/reference/get_agent_by_id_v2_flow_agents__agent_id__get) instead of this deprecated endpoint. # Get agent Source: https://docs.seekr.com/flow/reference/get_agent_by_id_v2_flow_agents__agent_id__get get /v2/flow/agents/{agent_id} Retrieve an agent's configuration by ID. # List linked agents Source: https://docs.seekr.com/flow/reference/get_agents_for_tool_v1_flow_tools__tool_id__agents_get get /v1/flow/tools/{tool_id}/agents Returns the agents that are linked to a given tool. Retrieve all agents that are currently using a specific tool. Use this to check dependencies before updating or deleting a tool. # Get context attribution from run Source: https://docs.seekr.com/flow/reference/get_context_attribution_from_run_v1_explainability_context_attributor_from_run_post post /v1/explainability/context-attributor-from-run Compute context attribution scores for the response generated during a specific agent run. Extracts context, query, and response from an existing agent run, then computes attribution scores across the retrieved sources. # Get context attribution Source: https://docs.seekr.com/flow/reference/get_context_attribution_v1_explainability_context_attributor_post post /v1/explainability/context-attributor Compute context attribution scores for a model response given its source text. Determines which parts of the provided context contributed to the model's response. Attribution can be returned for a specific highlight within the response, or broken into segments across the full response. # Get data job Source: https://docs.seekr.com/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get get /v1/flow/data-jobs/{data_job_id} Retrieve details for a specific data job. Returns the full details of a data job, including its status, nested ingestion jobs, per-file records, timeline events, and alignment status. This is the primary endpoint for monitoring a job throughout its lifecycle. For a field-by-field reference on status states, file records, and timeline events, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # List vector database data jobs Source: https://docs.seekr.com/flow/reference/get_data_jobs_for_vector_database_v1_flow_vectordb__database_id__data_jobs_get get /v1/flow/vectordb/{database_id}/data-jobs Returns the IDs of data jobs that reference a given vector database. Call this to see which data jobs reference a vector database. This is useful for understanding its processing history or checking dependencies before deletion. # List data jobs Source: https://docs.seekr.com/flow/reference/get_data_jobs_v1_flow_data_jobs_get get /v1/flow/data-jobs Retrieve a list of all data jobs. Returns a paginated list of all data jobs. For filter and sort parameters, see [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs). # Get deployment event Source: https://docs.seekr.com/flow/reference/get_deployment_events_by_id_v1_flow_events_deployments__deployment_id__get get /v1/flow/events/deployments/{deployment_id} Retrieve the event history for a specific deployment. # Get deployment metrics Source: https://docs.seekr.com/flow/reference/get_deployment_metrics_v1_flow_metrics_deployments_get get /v1/flow/metrics/deployments Retrieve performance metrics for active deployments. # List deployments Source: https://docs.seekr.com/flow/reference/get_deployments_v1_flow_deployments_get get /v1/flow/deployments Retrieve a list of all deployments in your team. # List file data jobs Source: https://docs.seekr.com/flow/reference/get_file_data_jobs_v1_flow_files__file_id__data_jobs_get get /v1/flow/files/{file_id}/data-jobs Returns the IDs of data jobs that reference a given file. Call this to see which data jobs have referenced a file. This is useful for auditing a file's processing history or checking dependencies before deletion. # List derived files Source: https://docs.seekr.com/flow/reference/get_file_derived_files_v1_flow_files__file_id__derived_files_get get /v1/flow/files/{file_id}/derived-files Returns the IDs of files derived from a given file, such as alignment outputs. Call this to find files produced from a given file, such as alignment outputs. This is useful for tracing what downstream files exist before deleting a source file. # Get file event Source: https://docs.seekr.com/flow/reference/get_file_events_by_id_v1_flow_events_files__file_id__get get /v1/flow/events/files/{file_id} Retrieve the event history for a specific file. # List file vector databases Source: https://docs.seekr.com/flow/reference/get_file_vector_dbs_v1_flow_files__file_id__vector_dbs_get get /v1/flow/files/{file_id}/vector-dbs Returns the IDs of vector databases that contain a given file. Call this to see which vector databases ingested a file. From there, use [List vector database tools](/flow/reference/get_tools_for_vector_database_v1_flow_vectordb__database_id__tools_get) to find tools using those databases, then [List tools for an agent](/flow/reference/get_agents_for_tool_v1_flow_tools__tool_id__agents_get) to reach agents — giving you the full dependency chain before deletion. # Get fine-tune lineage Source: https://docs.seekr.com/flow/reference/get_fine_tune_lineage_v1_flow_fine_tunes__fine_tune_id__lineage_get get /v1/flow/fine-tunes/{fine_tune_id}/lineage Retrieve the chain of fine-tunes that a fine-tune was trained from, oldest first. # Get fine-tuning job Source: https://docs.seekr.com/flow/reference/get_fine_tune_v1_flow_fine_tunes__fine_tune_id__get get /v1/flow/fine-tunes/{fine_tune_id} Retrieve the status and configuration of a specific fine-tuning job. # Get fine-tuning event Source: https://docs.seekr.com/flow/reference/get_finetune_events_by_id_v1_flow_events_finetunes__finetune_id__get get /v1/flow/events/finetunes/{finetune_id} Retrieve the event history for a specific fine-tuning job. # Get health Source: https://docs.seekr.com/flow/reference/get_health_external_v1_flow_health_get get /v1/flow/health Check the health and availability of the SeekrFlow API. # Get influential training data Source: https://docs.seekr.com/flow/reference/get_influential_training_data_route_v1_flow_explain_models__model_id__influential_finetuning_data_get get /v1/flow/explain/models/{model_id}/influential-finetuning-data Retrieve influential QA pair training data for a specific model. # Get message Source: https://docs.seekr.com/flow/reference/get_message_endpoint_v1_threads__thread_id__messages__message_id__get get /v1/threads/{thread_id}/messages/{message_id} Get a message by ID. Retrieve a single message by ID. For assistant messages where file search was used, the content includes source tracing fields per retrieved chunk: `chunk_id`, `page`, `lines`, and `section`. Use `chunk_id` to call the chunk endpoint for full Markdown provenance and the `file_id` of the source document. # Get project Source: https://docs.seekr.com/flow/reference/get_project_by_id_v1_flow_projects__project_id__get get /v1/flow/projects/{project_id} Retrieve the details of a specific project. # List projects Source: https://docs.seekr.com/flow/reference/get_projects_v1_flow_projects_get get /v1/flow/projects Retrieve a list of all projects in your team. # Get function Source: https://docs.seekr.com/flow/reference/get_python_function_endpoint_v1_functions__function_id__get get /v1/functions/{function_id} Retrieve a Python function by its ID for your team. # Get run Source: https://docs.seekr.com/flow/reference/get_run_endpoint_v1_threads__thread_id__runs__run_id__get get /v1/threads/{thread_id}/runs/{run_id} Get a run by ID. # Get thread Source: https://docs.seekr.com/flow/reference/get_thread_endpoint_v1_threads__thread_id__get get /v1/threads/{thread_id} Get a thread by ID. # Get tool Source: https://docs.seekr.com/flow/reference/get_tool_v1_flow_tools__tool_id__get get /v1/flow/tools/{tool_id} Get a specific tool by ID. Retrieve the full configuration and metadata for a specific tool, including its type, description, config, and status. # List vector database tools Source: https://docs.seekr.com/flow/reference/get_tools_for_vector_database_v1_flow_vectordb__database_id__tools_get get /v1/flow/vectordb/{database_id}/tools Returns the IDs of file search tools that reference a given vector database. Call this to find file search tools that use a given vector database. From there, use [List tools for an agent](/flow/reference/get_agents_for_tool_v1_flow_tools__tool_id__agents_get) to find agents depending on those tools — giving you the full downstream dependency chain before deletion. # Get vector database chunk Source: https://docs.seekr.com/flow/reference/get_vector_database_chunk_v1_flow_vectordb__database_id__chunk__chunk_id__get get /v1/flow/vectordb/{database_id}/chunk/{chunk_id} Retrieve provenance details for a chunk in a vector database. Returns the text content of the specified chunk along with its location within the source file and a reference to the original uploaded file. Location data includes line numbers, character offsets, page number, and the heading hierarchy at the point where the chunk appears. The `file_id` in the response identifies the source document and can be used with the file download endpoint to retrieve it. The `chunk_id` required to call this endpoint is available in the assistant message content after a run that used the file search tool. Each chunk in the message includes `chunk_id` alongside `page`, `lines`, and `section`, giving you a complete lineage chain from model output to the original source file. `page_number` is `null` for native Markdown and JSON files, which have no page structure. # Get vector database ingestion job status Source: https://docs.seekr.com/flow/reference/get_vector_database_ingestion_job_v1_flow_vectordb__database_id__ingestion__job_id__get get /v1/flow/vectordb/{database_id}/ingestion/{job_id} Retrieve the status of a specific vector database ingestion job. Retrieve the full details of a vector database ingestion job, including its status, output files, and `file_records` array. Each file record includes the file's processing state, timestamps for each state transition, queue position, and error diagnostics when failures occur. Once completed, source tracing metadata (line numbers, character offsets, heading hierarchy, and source page number) is available for every indexed chunk via the chunk endpoint. For job states, error codes, and SDK examples, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # Get metadata snapshot Source: https://docs.seekr.com/flow/reference/get_vector_database_metadata_snapshot_v1_flow_vectordb__database_id__metadata_get get /v1/flow/vectordb/{database_id}/metadata Retrieve the current metadata snapshot for a vector database, listing the most common metadata keys and values across its chunks. Return the current metadata snapshot for a vector database. The snapshot lists the most common metadata keys, the inferred type of each, and the most common values per key. For SDK examples, see [Generate a metadata snapshot](/flow/sdk/data-engine/generate-metadata-snapshot). # Get vector database Source: https://docs.seekr.com/flow/reference/get_vector_database_route_v1_flow_vectordb__database_id__get get /v1/flow/vectordb/{database_id} Retrieve the configuration and status of a specific vector database. # Get versions Source: https://docs.seekr.com/flow/reference/get_versions_v1_flow_versions_get get /v1/flow/versions Retrieve version information for the SeekrFlow API. # Get started with the API Source: https://docs.seekr.com/flow/reference/getting-started-with-your-api Learn how to authenticate and make your first Seekr API request. The SeekrFlow API provides programmatic access to train, validate, deploy, and manage AI models. You can use the API to build applications across financial services, customer support, risk management, and compliance workflows. This guide shows you how to authenticate and make your first API request. To use the Python SDK instead, see [Get started with the SDK](/flow/sdk/getting-started). ## Prerequisites Before you begin, you need a SeekrFlow account. If you don't have one, [sign up for SeekrFlow](https://apps.seekr.com/flow). ## Get your API key **Step 1** Sign in to the [SeekrFlow dashboard](https://apps.seekr.com/flow). **Step 2** From the user menu, go to **My Account**. **Step 3** From the **My Account** page, go to **API Key**. **Step 4** Generate and copy a new key. > [!CAUTION] > > Keep your API key secure. Don't share it in publicly accessible areas such as GitHub, client-side code, or support channels. ## Base URL All API requests use this base URL: ``` https://flow.seekr.com/v1 ``` ## Authentication All API requests require authentication. Include your API key in the `Authorization` header: ``` Authorization: YOUR_API_KEY ``` ## Selecting a team Resources belong to a team. To scope a request to a specific team, include the `x-team-id` header with the team's ID: ``` x-team-id: YOUR_TEAM_ID ``` If you omit the header, the request uses your personal workspace. You can find your team IDs on the [Teams Settings page](/flow/app/manage-permissions#find-a-team-id) in the SeekrFlow web interface. For the underlying access model, see [Role-based access control](/flow/role-based-access-control). ## Request and response format For `POST` and `PUT` requests, send data as JSON and include the `Content-Type` header: ```bash cURL theme={null} curl --location 'https://flow.seekr.com/v1/flow/agents/create' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: YOUR_API_KEY' \ --data '{ "name": "EXAMPLE", "instructions": "EXAMPLE", "tools": [ { "name": "web_search", "tool_env": { "WEB_SEARCH_TOOL_DESCRIPTION": "TESTING" } } ], "model_id": "43" }' ``` All responses use JSON format. Each endpoint's response schema is documented in the [SeekrFlow API](/flow/reference/delete_v1_flow_agents__agent_id__delete). ## Versioning The API version is included in the URL path (`v1`). When breaking changes are introduced: 1. A new API version is released. 2. The current version continues to function. 3. You receive notification with migration timelines before deprecation. This approach ensures your application continues to work while you migrate to a new version. # Check inference health Source: https://docs.seekr.com/flow/reference/health_v1_inference_health_get get /v1/inference/health Check the health and availability of the inference service. # Convert PDF files to markdown Source: https://docs.seekr.com/flow/reference/ingest_files_v1_flow_alignment_ingestion_post post /v1/flow/alignment/ingestion Convert PDF files to Markdown format for use in alignment and fine-tuning. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use [`POST /v1/flow/ingestion`](/flow/reference/ingest_files_v1_flow_ingestion_post) for standalone file conversion, or [`POST /v1/flow/data-jobs/{data_job_id}/add-files`](/flow/reference/add_files_to_data_job_v1_flow_data_jobs__data_job_id__add_files_post) to convert files as part of a data job. Submit one or more uploaded file IDs to start an ingestion job. The system converts each file to markdown for use in downstream workflows like fine-tuning. The response includes a `file_records` array with per-file tracking. Each record contains the file's status, timestamps for each state transition, and error diagnostics if a failure occurs. For job states, error codes, and SDK examples, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # Convert PDF files to markdown Source: https://docs.seekr.com/flow/reference/ingest_files_v1_flow_ingestion_post post /v1/flow/ingestion Convert PDF files to Markdown format for use in data jobs and fine-tuning. # Get file conversion job Source: https://docs.seekr.com/flow/reference/ingestion_get_v1_flow_alignment_ingestion__ingestion_job_id__get get /v1/flow/alignment/ingestion/{ingestion_job_id} Retrieve the status and file records for a specific file conversion job. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use [`GET /v1/flow/ingestion/{ingestion_job_id}`](/flow/reference/ingestion_get_v1_flow_ingestion__ingestion_job_id__get), or [`GET /v1/flow/data-jobs/{data_job_id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get), which embeds ingestion records with queue positions. Retrieve the full details of an ingestion job, including its status, output files, and `file_records` array. Each file record includes the file's processing state, timestamps for each state transition, queue position, and error diagnostics when failures occur. For job states, error codes, and SDK examples, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # Get file conversion job Source: https://docs.seekr.com/flow/reference/ingestion_get_v1_flow_ingestion__ingestion_job_id__get get /v1/flow/ingestion/{ingestion_job_id} Retrieve the status and file records for a specific file conversion job. # List file conversion jobs Source: https://docs.seekr.com/flow/reference/ingestion_list_v1_flow_alignment_ingestion_get get /v1/flow/alignment/ingestion Retrieve a list of all file conversion jobs in your team. > [!WARNING] > > The alignment endpoints stop working on November 9, 2026. Use [`GET /v1/flow/ingestion`](/flow/reference/ingestion_list_v1_flow_ingestion_get). Retrieve a paginated list of all ingestion jobs. Each job includes its current status and `file_records` with per-file tracking. For details on interpreting job states and file records, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # List file conversion jobs Source: https://docs.seekr.com/flow/reference/ingestion_list_v1_flow_ingestion_get get /v1/flow/ingestion Retrieve a list of all file conversion jobs in your team. # List agents v1 Source: https://docs.seekr.com/flow/reference/list_agents_v1_flow_agents__get get /v1/flow/agents/ Retrieve a list of all agents in your team. > [!WARNING] > > Use [`GET /v2/flow/agents`](/flow/reference/list_agents_v2_flow_agents__get) instead of this deprecated endpoint. # List agents Source: https://docs.seekr.com/flow/reference/list_agents_v2_flow_agents__get get /v2/flow/agents/ Retrieve a list of all agents in your team. # List files Source: https://docs.seekr.com/flow/reference/list_files_v1_flow_files_get get /v1/flow/files Retrieve a list of all files in your team. # List fine-tuning jobs Source: https://docs.seekr.com/flow/reference/list_fine_tune_v1_flow_fine_tunes_get get /v1/flow/fine-tunes Retrieve a list of all fine-tuning jobs in your team. # List messages Source: https://docs.seekr.com/flow/reference/list_messages_endpoint_v1_threads__thread_id__messages_get get /v1/threads/{thread_id}/messages List messages in a thread. Returns all messages in a thread in chronological order. Use this after a run completes to read the agent's response. When the agent used file search, each retrieved chunk's source tracing fields are appended to the assistant message content: `chunk_id`, `page`, `lines`, and `section`. Use `chunk_id` to call the chunk endpoint for full Markdown provenance and the `file_id` of the source document. # List functions Source: https://docs.seekr.com/flow/reference/list_python_function_endpoint_v1_functions_get get /v1/functions Retrieve a list of all Python functions in your team. # List runs Source: https://docs.seekr.com/flow/reference/list_runs_endpoint_v1_threads__thread_id__runs_get get /v1/threads/{thread_id}/runs List runs in a thread. # List threads Source: https://docs.seekr.com/flow/reference/list_threads_endpoint_v1_threads_get get /v1/threads Retrieve a list of all threads in your team. # List tools Source: https://docs.seekr.com/flow/reference/list_tools_v1_flow_tools_get get /v1/flow/tools Retrieve a list of all tools in your team. Retrieve a paginated list of tools. Use the `tool_type` parameter to filter by type—for example, `tool_type=agent_as_tool` returns only agent-as-tool entries. # List chunks Source: https://docs.seekr.com/flow/reference/list_vector_database_chunks_v1_flow_vectordb__database_id__chunks_post post /v1/flow/vectordb/{database_id}/chunks Search and list chunks in a vector database, with optional filtering by file, chunk IDs, or metadata fields. Results are paginated. Return a paginated list of chunks from a vector database. Filter by `file_id`, by specific `chunk_ids`, or by user-defined `metadata` fields. Metadata filters use the same operator syntax as file search filters (`$in`, `$gt`, `$gte`, `$lt`, `$lte`), and multiple filters are combined with AND. Each chunk in the response includes its text, metadata, heading hierarchy, and source locations. # List files in vector database Source: https://docs.seekr.com/flow/reference/list_vector_database_files_v1_flow_vectordb__database_id__files_get get /v1/flow/vectordb/{database_id}/files Retrieve a list of files in a vector database, including their queue positions. # List vector database ingestion jobs Source: https://docs.seekr.com/flow/reference/list_vector_database_ingestion_jobs_v1_flow_vectordb__database_id__ingestion_get get /v1/flow/vectordb/{database_id}/ingestion Retrieve a list of all ingestion jobs for a vector database. Each job in the response includes a `file_records` array that provides per-file tracking. Every file gets its own record with independent status, timestamps, and error information. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) for a full guide to job states, file record fields, and error handling. # List vector databases Source: https://docs.seekr.com/flow/reference/list_vector_databases_v1_flow_vectordb_get get /v1/flow/vectordb Retrieve a list of all vector databases in your team. Retrieve a paginated list of ingestion jobs for a specific vector database. Each job includes its current status and `file_records` with per-file tracking. For details on interpreting job states and file records, see [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion). # Get model Source: https://docs.seekr.com/flow/reference/ml_model_by_model_id_v1_flow_models_info_get get /v1/flow/models/info Retrieve details and metadata for a specific model. # Get model revision Source: https://docs.seekr.com/flow/reference/ml_model_hf_revision_by_model_name_v1_flow_models_hf_revision_get get /v1/flow/models/hf_revision Retrieve the Hugging Face revision hash for a specific model. # List models Source: https://docs.seekr.com/flow/reference/ml_models_v1_flow_models_get get /v1/flow/models Retrieve a list of all available models. # Observability Source: https://docs.seekr.com/flow/reference/observability Observability spans are records of agent runs that capture timing, model usage, token consumption, and error details for every run. Use these endpoints to query spans across runs or retrieve the full detail of a specific span by ID. For SDK walkthroughs, see [Observability](/flow/sdk/observability). # Update data job Source: https://docs.seekr.com/flow/reference/patch_data_job_v1_flow_data_jobs__data_job_id__patch patch /v1/flow/data-jobs/{data_job_id} Update the details of an existing data job. Update metadata on an existing data job. Fields are locked once alignment is running. For editable fields and locking behavior, see [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs). # Modify fine-tuning job Source: https://docs.seekr.com/flow/reference/patch_fine_tune_v1_flow_fine_tunes__fine_tune_id__patch patch /v1/flow/fine-tunes/{fine_tune_id} Update the configuration of an existing fine-tuning job. # Update tool Source: https://docs.seekr.com/flow/reference/patch_tool_v1_flow_tools__tool_id__patch patch /v1/flow/tools/{tool_id} Partially update an existing tool. Omitted fields remain unchanged. Tool type cannot be changed after creation. If you include the `type` field in your request, it must match the existing tool type. > [!WARNING] > > Tool updates propagate immediately to all agents using the tool. ## MCP connector You can update `name` and `description`. If you need to connect to a different server or change credentials, create a new MCP connector tool and update your agent's `tool_ids`. ## Agent as tool You can update `name` and `description`. The underlying sub-agent cannot be changed. To use a different sub-agent, create a new agent-as-tool for that sub-agent. # Update agent v1 Source: https://docs.seekr.com/flow/reference/patch_v1_flow_agents__agent_id__patch patch /v1/flow/agents/{agent_id} Partially update an agent's configuration. Omitted fields remain unchanged. > [!WARNING] > > Use [`PATCH /v2/flow/agents/{agent_id}`](/flow/reference/patch_v2_flow_agents__agent_id__patch) instead of this deprecated endpoint. Active agents transition to `Updating` during the patch and return to `Active` once complete. If redeployment fails, the agent status is set to `Failed`. Agents in `Inactive` or `Failed` states remain in their current state after a patch. To activate an updated agent, [promote it](/flow/reference/promote_v1_flow_agents__agent_id__promote_put) manually. The `tool_ids` parameter accepts IDs for any tool type, including agent-as-tools. Agent-as-tools must be created before adding them to `tool_ids`. See [Agent as tool](/flow/sdk/agents/agent-as-tool) for setup instructions. # Update agent Source: https://docs.seekr.com/flow/reference/patch_v2_flow_agents__agent_id__patch patch /v2/flow/agents/{agent_id} Partially update an agent's configuration. Omitted fields remain unchanged. Active agents transition to `Updating` during the patch and return to `Active` once complete. If redeployment fails, the agent status is set to `Failed`. Agents in `Inactive` or `Failed` states remain in their current state after a patch. To activate an updated agent, [promote it](/flow/reference/promote_v2_flow_agents__agent_id__promote_put) manually. The `tool_ids` parameter accepts IDs for any tool type, including agent-as-tools. Agent-as-tools must be created before adding them to `tool_ids`. See [Agent as tool](/flow/sdk/agents/agent-as-tool) for setup instructions. # Promote agent v1 Source: https://docs.seekr.com/flow/reference/promote_v1_flow_agents__agent_id__promote_put put /v1/flow/agents/{agent_id}/promote Promote an agent to active status so it can serve requests. > [!WARNING] > > Use [`PUT /v2/flow/agents/{agent_id}/promote`](/flow/reference/promote_v2_flow_agents__agent_id__promote_put) instead of this deprecated endpoint. Activate an agent so it can handle inference requests. Agents are automatically promoted on creation—this endpoint is only needed after an agent has been demoted. When promoting an agent that has sub-agents linked as tools, SeekrFlow automatically promotes the sub-agents first. The supervisor remains in `Pending` state until all sub-agents are ready. # Promote deployment Source: https://docs.seekr.com/flow/reference/promote_v1_flow_deployments__deployment_id__promote_put put /v1/flow/deployments/{deployment_id}/promote Promote a deployment from staging to production status. # Promote agent Source: https://docs.seekr.com/flow/reference/promote_v2_flow_agents__agent_id__promote_put put /v2/flow/agents/{agent_id}/promote Promote an agent to active status so it can serve requests. Activate an agent so it can handle inference requests. Agents are automatically promoted on creation. You only need this endpoint after an agent has been demoted. When promoting an agent that has sub-agents linked as tools, SeekrFlow automatically promotes the sub-agents first. The supervisor remains in `Pending` state until all sub-agents are ready. # Query spans Source: https://docs.seekr.com/flow/reference/query_spans_v1_observability_spans_post post /v1/observability/spans Query observability spans filtered by user and other criteria. Returns a list of span summaries matching the provided filters. All filters are optional. If `min_start_datetime` is not provided, the query defaults to the last 15 minutes. Start with `run_id` when investigating a specific agent run. Use `limit` and `offset` to paginate results and `order` to sort by start time. To retrieve the full record for a specific span, use the [retrieve span](/flow/reference/retrieve_span_v1_observability_spans__span_id__get) endpoint. # Get inference job request Source: https://docs.seekr.com/flow/reference/read_inference_job_request_v1_inference_jobs__job_id__requests__index__get get /v1/inference/jobs/{job_id}/requests/{index} Retrieve a request from an inference job by its index. # List inference job results Source: https://docs.seekr.com/flow/reference/read_inference_job_results_v1_inference_jobs__job_id__results_get get /v1/inference/jobs/{job_id}/results Retrieve the results available from an inference job. # Get inference job status Source: https://docs.seekr.com/flow/reference/read_inference_job_status_v1_inference_jobs__job_id__get get /v1/inference/jobs/{job_id} Retrieve an inference job's status and progress counts. # Remove files from data job Source: https://docs.seekr.com/flow/reference/remove_files_from_data_job_v1_flow_data_jobs__data_job_id__remove_files_post post /v1/flow/data-jobs/{data_job_id}/remove-files Remove files from an existing data job. Remove one or more file IDs from a data job. Use this to replace a failed file or remove an unwanted file before starting alignment. Files can only be removed before the job has started running. # Change file name Source: https://docs.seekr.com/flow/reference/rename_file_v1_flow_files__file_id__rename_put put /v1/flow/files/{file_id}/rename Update the display name of an existing file. # Get span Source: https://docs.seekr.com/flow/reference/retrieve_span_v1_observability_spans__span_id__get get /v1/observability/spans/{span_id} Retrieve a specific observability span by ID. Use this endpoint to retrieve the complete record for a specific span. The [query spans](/flow/reference/query_spans_v1_observability_spans_post) endpoint returns span summaries. This endpoint returns the full span object. # Create chat completion Source: https://docs.seekr.com/flow/reference/route_chat_completion_v1_inference_chat_completions_post post /v1/inference/chat/completions Generate a chat completion response from a deployed model. # Create completion Source: https://docs.seekr.com/flow/reference/route_completion_v1_inference_completions_post post /v1/inference/completions Generate a text completion response from a deployed model. # Create embedding Source: https://docs.seekr.com/flow/reference/route_embeddings_v1_inference_embeddings_post post /v1/inference/embeddings Generate vector embeddings for one or more input texts. # Transcribe audio Source: https://docs.seekr.com/flow/reference/route_v1_audio_transcriptions_v1_inference_audio_transcriptions_post post /v1/inference/audio/transcriptions Submit an audio file for transcription. # Rerank documents Source: https://docs.seekr.com/flow/reference/route_v1_rerank_v1_inference_rerank_post post /v1/inference/rerank Rerank a list of documents by relevance to a query. # Score text Source: https://docs.seekr.com/flow/reference/route_v1_score_v1_inference_score_post post /v1/inference/score Score a query-document pair for relevance. # Stream agent run Source: https://docs.seekr.com/flow/reference/run_agent_stream_v1_threads__thread_id__runs_stream_post post /v1/threads/{thread_id}/runs/stream Run an agent on a thread and stream the response as server-sent events. # Stream agent run (Vercel AI SDK) Source: https://docs.seekr.com/flow/reference/run_agent_stream_vercel_v1_threads__thread_id__runs_stream_vercel_post post /v1/threads/{thread_id}/runs/stream/vercel Stream an agent run response formatted for the Vercel AI SDK. # Run agent Source: https://docs.seekr.com/flow/reference/run_agent_v1_threads__thread_id__runs_post post /v1/threads/{thread_id}/runs Run an agent on a thread and return the completed response. # Start data job alignment Source: https://docs.seekr.com/flow/reference/start_data_job_alignment_v1_flow_data_jobs__data_job_id__start_post post /v1/flow/data-jobs/{data_job_id}/start Start the alignment process for a data job. > [!WARNING] > > The `context_grounded_files` and `context_grounded_vector_db` job types stop working on November 9, 2026. You can keep using them until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). Start the alignment process for a data job. The job must be in `ready_to_start` status. Pre-flight checks vary by job type: * For `principle_files` jobs: a `system_prompt` must be set and files have been added to the data job * For `context_grounded_files` jobs: files must have been added to the data job * For `context_grounded_vector_db` jobs: a `vector_database_id` must be set For the full pre-flight requirements and workflow, see [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning). # Submit data job Source: https://docs.seekr.com/flow/reference/submit_data_job_v1_flow_data_jobs_post post /v1/flow/data-jobs Create a new data job. > [!WARNING] > > The `context_grounded_files` and `context_grounded_vector_db` job types stop working on November 9, 2026. You can keep using them until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). Create a new data job. The `job_type` field determines the workflow: * `principle_files` — generates a QA pair dataset for instruction fine-tuning * `context_grounded_files` — generates context-grounded training data from uploaded documents * `context_grounded_vector_db` — generates context-grounded training data using an existing vector database Newly created jobs have no files attached. Use `POST /v1/flow/data-jobs/{id}/add-files` to attach uploaded file IDs after creation. For the complete workflow, see [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning) or [Create context-grounded fine-tuning data](/flow/sdk/data-engine/context-grounded-fine-tuning-data). # Submit inference job Source: https://docs.seekr.com/flow/reference/submit_inference_job_v1_inference_jobs__job_id__submit_post post /v1/inference/jobs/{job_id}/submit Queue an inference job and all of its requests for processing. # Update deployment Source: https://docs.seekr.com/flow/reference/update_deployment_v1_flow_deployments__deployment_id__patch patch /v1/flow/deployments/{deployment_id} Update the configuration of an existing deployment. # Update message Source: https://docs.seekr.com/flow/reference/update_message_endpoint_v1_threads__thread_id__messages__message_id__patch patch /v1/threads/{thread_id}/messages/{message_id} Update a message's content and/or metadata. # Update function Source: https://docs.seekr.com/flow/reference/update_python_function_endpoint_v1_functions__function_id__patch patch /v1/functions/{function_id} Update the code or metadata for an existing Python function. # Replace tool Source: https://docs.seekr.com/flow/reference/update_tool_v1_flow_tools__tool_id__put put /v1/flow/tools/{tool_id} Update an existing tool. > [!WARNING] > > Use [`PATCH /v1/flow/tools/{tool_id}`](/flow/reference/patch_tool_v1_flow_tools__tool_id__patch) instead of this deprecated endpoint. Update a tool's configuration. This endpoint requires full object replacement — include all fields in the request, even those you are not changing, or they will be set to null. ## MCP connector You can update an MCP connector tool's `name` and `description`. The server URL and authentication credentials (`config.URL`, `config.CLIENT_ID`, `config.CLIENT_SECRET`) cannot be updated. To use a different server or credentials, delete the tool and create a new one, then update your agent's `tool_ids`. MCP connector tools cannot be duplicated. ## Agent as tool When updating an agent-as-tool, the `config.agent_id` must match the original sub-agent. You cannot swap the underlying sub-agent—if you need a different one, delete this tool and create a new one. For SDK examples and full constraints, see [Agent as tool](/flow/sdk/agents/agent-as-tool). # Replace agent v1 Source: https://docs.seekr.com/flow/reference/update_v1_flow_agents__agent_id__update_put put /v1/flow/agents/{agent_id}/update Update an agent's model, instructions, or tools. > [!WARNING] > > Use [`PATCH /v2/flow/agents/{agent_id}`](/flow/reference/patch_v2_flow_agents__agent_id__patch) instead of this deprecated endpoint. Replace an agent's configuration entirely. All fields must be provided—this endpoint does not support partial updates. The `tool_ids` parameter accepts IDs for any tool type, including agent-as-tools. Agent-as-tools must be created before adding them to `tool_ids`. See [Agent as tool](/flow/sdk/agents/agent-as-tool) for setup instructions. When an active supervisor agent is updated to include new sub-agents, the supervisor transitions to `Updating` while the sub-agents are promoted, then returns to `Active` when ready. # Replace agent Source: https://docs.seekr.com/flow/reference/update_v2_flow_agents__agent_id__update_put put /v2/flow/agents/{agent_id}/update Update an agent's model, instructions, or tools. > [!WARNING] > > Use [`PATCH /v2/flow/agents/{agent_id}`](/flow/reference/patch_v2_flow_agents__agent_id__patch) instead of this deprecated endpoint. Replace an agent's configuration entirely. All fields must be provided; this endpoint does not support partial updates. The `tool_ids` parameter accepts IDs for any tool type, including agent-as-tools. Agent-as-tools must be created before adding them to `tool_ids`. See [Agent as tool](/flow/sdk/agents/agent-as-tool) for setup instructions. When an active supervisor agent is updated to include new sub-agents, the supervisor transitions to `Updating` while the sub-agents are promoted, then returns to `Active` when ready. # Update chunk metadata Source: https://docs.seekr.com/flow/reference/update_vector_database_metadata_v1_flow_vectordb__database_id__metadata_patch patch /v1/flow/vectordb/{database_id}/metadata Overwrite metadata on chunks in a vector database, targeted by file IDs or chunk IDs. This replaces all existing metadata on the targeted chunks. Overwrite user-defined metadata on chunks within a vector database. Target the chunks with exactly one of `chunk_ids` or `file_ids`; providing both, or neither, returns an error. This operation is destructive: the supplied `metadata` object replaces all existing metadata on every targeted chunk, so include any fields you want to keep. # Update vector database Source: https://docs.seekr.com/flow/reference/update_vector_database_route_v1_flow_vectordb__database_id__patch patch /v1/flow/vectordb/{database_id} Update a vector database's name or description. # Create function Source: https://docs.seekr.com/flow/reference/upload_python_function_v1_functions_post post /v1/functions Upload a new Python function for your team. # Create or update project Source: https://docs.seekr.com/flow/reference/upsert_project_v1_flow_projects_post post /v1/flow/projects Create a new project or update an existing one by name. # Vector database Source: https://docs.seekr.com/flow/reference/vector-database The vector database endpoints manage the full lifecycle of your vector databases, from creation and file ingestion to chunk-level provenance. Use these endpoints to create and configure databases, submit ingestion jobs that convert your files into searchable embeddings, and manage the files indexed within each database. Ingestion jobs capture source tracing metadata for every chunk. Use the chunk endpoint to trace any file search result to its exact location in the source document and retrieve the original uploaded file. You can also attach user-defined metadata to chunks, list or filter chunks by that metadata, and edit it after ingestion. # Role-based access control Source: https://docs.seekr.com/flow/role-based-access-control Manage access to SeekrFlow resources through organizations, teams, and role-based permissions. Supported on UI API SDK SeekrFlow uses a team-based access model to organize users and control what they can do. All resources (agents, fine-tuning jobs, deployments, files, and vector databases) belong to a team, and access is enforced based on a user's role within that team. > [card] [Manage permissions (UI)](/flow/app/manage-permissions) > > Create and manage teams and members through the SeekrFlow web interface. > [card] [Work with teams (SDK)](/flow/sdk/teams) > > Scope SDK requests to a team to create and read team-owned resources. ## Organizations and teams An **organization** is the top-level container for a SeekrFlow account. All users, teams, and resources belong to a single organization. A **team** is a group of users within an organization. Resources are scoped to a team, meaning each team has its own isolated view of agents, fine-tuning jobs, deployments, files, and vector databases. Users can belong to multiple teams and switch between them to access the resources associated with each. When a new account is created, a new organization is provisioned if the user doesn't already belong to one. An existing organization owner can also invite new users. For self-managed deployments, a default organization is created during installation. Teams are not automatically provisioned in either case. Each user also gets a personal workspace, a private team with no other members. ## Roles Every user has an organization role and, within each team they belong to, a team role. Together these determine what a user can see and do. ### Organization roles **Owner** – Full organization access to manage settings, teams, and roles. **Member** – Access limited to assigned teams and their resources. ### Team roles **Admin** – Full team access to manage members, roles, and settings. **Creator** – Can contribute within assigned teams without managing roles or access. ### Permissions summary | Action | Owner | Member + admin | Member + creator | | - | - | - | - | | Create, rename, delete teams | ✓ | ✗ | ✗ | | Add and remove team members | ✓ | ✓ | ✗ | | Change member roles | ✓ | ✓ | ✗ | | Create and manage resources | ✓ | ✓ | ✓ | ## Resource isolation Resources are scoped to the team they were created in. When a user switches their active team, the resource lists (agents, fine-tuning jobs, deployments, files, and vector databases) update to show only what belongs to that team. API and SDK calls are similarly scoped to the active team, and requests for resources outside a user's teams are rejected. For how to select a team from the SDK, see [Work with teams](/flow/sdk/teams). ## Migration from single-user deployments Existing users are migrated to an organization, and select users are assigned the Owner role. Existing resources move to each user's personal workspace. No teams are automatically created and no team roles are automatically assigned. Self-managed customers need to upgrade to the version that includes role-based access control and perform the migration manually. # Agents Source: https://docs.seekr.com/flow/sdk/agents Build and run agents programmatically with the SeekrFlow Python SDK. An agent is an AI system that reasons through problems and executes tasks autonomously. Agents are configured by specifying models, tools, instructions, and reasoning approach—providing everything needed to accomplish tasks from simple workflows to complex, open-ended objectives. Use the SeekrFlow Python SDK to build and run agents programmatically. This section covers the core building blocks: > [card] [Create and manage agents](/flow/sdk/agents/create-agents) > > Configure agents, reasoning effort, and tools. > [card] [Run an agent](/flow/sdk/agents/run-an-agent) > > Use threads, messages, and runs to run your agent. > [card] [Use structured outputs](/flow/sdk/agents/structured-outputs) > > Control the format of agent responses. > [card] [Tools](/flow/sdk/agents/tools) > > Extend agent capabilities with file search, web search, code interpreter, custom tools, and more. # Agent as tool Source: https://docs.seekr.com/flow/sdk/agents/agent-as-tool Use agents as callable tools to build multi-agent workflows. ### What is an agent as tool? An agent-as-tool lets a supervisor agent delegate subtasks to other agents. Instead of handing over control, the supervisor invokes a sub-agent as a callable tool, receives the result, and integrates it into a unified response. This enables composable, multi-agent systems where each agent focuses on a specific capability. Use agent-as-tool when a task spans multiple intents or requires synthesis across specialized skills—for example, a research assistant that calls one sub-agent to fetch data and another to evaluate its relevance, then merges the results. ### How it works **Step 1** **Create sub-agents** – [Create an agent](/flow/sdk/agents/create-agents) for each specific capability, and note its agent ID. **Step 2** **Wrap each sub-agent as a tool** – Create an agent-as-tool that references the sub-agent's ID. **Step 3** **Attach the tools to a supervisor agent** – The supervisor uses the agent-as-tool like any other tool. **Step 4** **Run the supervisor** – The supervisor decides when to invoke sub-agents based on the task and the tool descriptions you provide. > [!NOTE] > > Sub-agents and their agent-as-tool wrappers must be created before the supervisor agent that uses them. ## Create an agent as tool First, [create the sub-agent](/flow/sdk/agents/create-agents) you want to expose as a tool and note its agent ID. Then wrap it: ```python Python theme={null} from seekrai import SeekrFlow from seekrai.types import CreateAgentAsTool, AgentAsToolConfig client = SeekrFlow() # Create the agent-as-tool agent_as_tool = client.tools.create( CreateAgentAsTool( name="research-agent-tool", description="Searches the web for current information on a given topic and returns a summary.", config=AgentAsToolConfig( agent_id="agent-abc123", ), ) ) print(f"Tool ID: {agent_as_tool.id}") ``` ### Parameters | Parameter | Description | | - | - | | **name** (required) | The name of the tool. Appears in spans and traces. | | **type** (required) | Must be `agent_as_tool`. | | **description** (required) | Helps the supervisor agent decide when to invoke this tool. Included in the supervisor's system prompt. | | **config.agent_id** (required) | The ID of the sub-agent to run when this tool is invoked. | > [!WARNING] > > Each agent can only have one agent-as-tool wrapper. Attempting to create a second agent-as-tool for the same sub-agent returns an error. ## Update an agent as tool You can update the tool's name and description. The underlying sub-agent cannot be changed. To use a different sub-agent, create a new agent-as-tool for that sub-agent. ```python Python theme={null} from seekrai.types import UpdateAgentAsTool updated_tool = client.tools.update( agent_as_tool.id, UpdateAgentAsTool( name="updated-research-tool", description="Updated description for the research sub-agent.", ) ) ``` ## Delete an agent as tool Deleting an agent-as-tool removes the tool only. The underlying sub-agent is not affected. ```python Python theme={null} client.tools.delete(agent_as_tool.id) ``` > [!NOTE] > > An agent-as-tool cannot be deleted if it is still linked to a supervisor agent. Unlink it from the supervisor first. ## Attach to a supervisor agent Pass agent-as-tool IDs in the `tool_ids` parameter when creating or updating a supervisor agent. The syntax is the same as for any other tool type. ```python Python theme={null} from seekrai.types import UpdateAgentRequest agent = client.agents.update( agent_id=supervisor.id, request=UpdateAgentRequest( name="Supervisor Agent", instructions="You are a research coordinator. Use your sub-agents to gather and analyze information.", model_id="meta-llama/Llama-3.3-70B-Instruct", reasoning_effort="high", tool_ids=[agent_as_tool.id, web_search_tool.id], ) ) ``` ## Deployment behavior When a supervisor agent is promoted, SeekrFlow automatically promotes any linked sub-agents that are not already active. The supervisor remains in `Pending` state until all sub-agents are ready. When a supervisor is demoted, its sub-agents are **not** automatically demoted. You must demote each sub-agent individually if needed. ## Constraints * **No cycles** — The agent graph must be a tree. Agent A cannot be a tool for Agent B if Agent B is already a tool for Agent A, directly or indirectly. * **One tool per agent** — Each agent can only have one agent-as-tool wrapper. Duplicating an agent-as-tool is not supported. * **Sub-agent deletion** — A sub-agent cannot be deleted while it is still linked to a supervisor. Unlink the agent-as-tool from the supervisor and delete the tool first. * **Sub-agent demotion** — A sub-agent cannot be demoted while its supervisor is active. Either demote the supervisor first, or unlink the sub-agent. # Create and manage agents Source: https://docs.seekr.com/flow/sdk/agents/create-agents Create, configure, and manage agents using the SeekrFlow Python SDK. An agent must be active before it can process requests. Create and promote your agent using the operations below, then see [Run an agent](/flow/sdk/agents/run-an-agent) to start processing requests. ## Create an agent The most common properties of an agent you'll configure are: | Parameter | Description | | - | - | | `name` | **Required.** A string that identifies your agent. | | `instructions` | Also known as a developer message or system prompt. Guides how the agent operates and generates its response. | | `model_id` | The model used to generate the agent's response. Can be a base model or fine-tuned model. | | `tool_ids` | IDs of the tools the agent can use. Create the tools in the [tool library](/flow/sdk/agents/tools) first, then provide their IDs. | | `reasoning_effort` | How much reasoning the agent uses when working through a request. Accepts `LOW`, `MEDIUM`, or `HIGH`. Defaults to `MEDIUM`. | | `temperature` | **Optional.** Controls the predictability of the agent's reasoning. Lower values produce more consistent results, and higher values introduce more variation. Accepts a value from `0` to `2`. Defaults to `0.6`. | **Endpoint:** [`POST /v1/flow/agents/create`](/flow/reference/create_v1_flow_agents_create_post) ```python Python theme={null} from seekrai.types import CreateAgentRequest, ReasoningEffort from seekrai import SeekrFlow api_key = "your_api_key" client = SeekrFlow(api_key=api_key) agent = client.agents.create( CreateAgentRequest( name="homework_tutor_bot", instructions="You are a tutor bot for middle schoolers. Answers the questions in a way middle schoolers can understand", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=[], reasoning_effort=ReasoningEffort.MEDIUM, temperature=0.6 ) ) print(f"Agent created with ID: {agent.id}") print(f"Agent status: {agent.status}") ``` > [!NOTE] > > The model that generates an agent's response can be any base or fine-tuned model available on the SeekrFlow platform. For details on agent status, see [Agent status](/flow/components/agents#agent-status). ### Write effective instructions When writing your agent’s instructions, follow these best practices: 1. **Define role, goal, and context.** Clearly state the agent’s persona, objective, and any relevant background. *Example: “You are a procurement research assistant tasked with finding active government contracts based on user input.”* 2. **Be specific and prescriptive.** Break complex tasks into simpler subgoals and specify how each tool should be used. *Example: “Use the search_contracts tool only after collecting both a state and keyword.”* 3. **Call out edge cases explicitly.** If the agent should not respond to certain queries, say so directly. *Example: “Do not answer legal or compliance questions — respond with: ‘I’m not able to help with that.’”* 4. **Specify output format.** If not using structured outputs, be clear about the desired format and tone. *Example: “Respond in a numbered list with no more than 3 items. Use plain language and avoid technical jargon.”* ### Configure reasoning effort The `reasoning_effort` level determines how much reasoning the agent uses to process information, decide how to approach the task, and select appropriate tools. SeekrFlow agents support three levels. The default is `MEDIUM`. | Level | Description | | - | - | | `ReasoningEffort.LOW` | Prioritizes speed. Best for simple, latency-sensitive tasks with a small tool set. | | `ReasoningEffort.MEDIUM` | Balances speed and thoroughness. A good starting point for most use cases. | | `ReasoningEffort.HIGH` | Prioritizes thoroughness. Best for complex workflows with many tools where accuracy matters more than response time. | We recommend experimenting with different levels during agent development to find the optimal configuration for your use case. > [!NOTE] > > The `SPEED_OPTIMIZED` and `PERFORMANCE_OPTIMIZED` values are only supported for backward compatibility. Use `LOW`, `MEDIUM`, or `HIGH` for new agents. `SPEED_OPTIMIZED` corresponds to `LOW`, and `PERFORMANCE_OPTIMIZED` to `HIGH`. To adjust how predictable or varied the agent's reasoning is, set `temperature` (a value from `0` to `2`, default `0.6`). Lower values produce more consistent results, and higher values introduce more variation. ### Configure output settings By default, an agent produces a natural-language response using the same `instructions`, `model_id`, and `temperature` that guide its reasoning. To control the response separately, provide an `output` configuration. All of its fields are optional. | Parameter | Description | | - | - | | `output.instructions` | Instructions for generating the final response. When set, the top-level `instructions` guide only the agent's reasoning, and these guide the response. | | `output.model_id` | The model used to generate the final response, overriding the top-level `model_id`. Can be a base model or fine-tuned model. | | `output.temperature` | Controls the predictability of the final response. Accepts a value from `0` to `2`. Defaults to `0.6`. | | `output.frequency` | When the agent produces a written response: `ALWAYS`, `AUTOMATIC` (the agent decides), or `NEVER`. Use `NEVER` for automation cases where a natural-language response isn't needed. | ```python Python theme={null} from seekrai.types import CreateAgentRequest, AgentOutputConfig, AgentOutputFrequency agent = client.agents.create( CreateAgentRequest( name="research_assistant", instructions="Work through the user's question using the available tools.", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=[], output=AgentOutputConfig( instructions="Summarize the findings in a concise, professional tone.", temperature=0.4, frequency=AgentOutputFrequency.AUTOMATIC, ), ) ) ``` > [!NOTE] > > You must provide either `model_id` or `output.model_id`. ## List your agents and their status To list all of the agents you've created and their associated status, you can use the below code snippet: **Endpoint:** [`GET /v1/flow/agents/`](/flow/reference/list_agents_v1_flow_agents__get) ```python Python theme={null} available_agents = client.agents.list_agents() print("Available agents:") for agent in available_agents: print(f"ID: {agent.id}, Name: {agent.name}, Status: {agent.status}") ``` ## Update an agent Use `agents.update` to make partial changes to an existing agent. Provide only the fields you want to change. Omitted fields remain unchanged. **Endpoint:** [`PATCH /v1/flow/agents/{agent_id}`](/flow/reference/patch_v1_flow_agents__agent_id__patch) ```python Python theme={null} from seekrai.types import UpdateAgentRequest updated_agent = client.agents.update( agent_id=agent.id, request=UpdateAgentRequest( instructions="You are a tutor bot for high schoolers. Answer questions in a way high schoolers can understand." ) ) print(f"Agent updated: {updated_agent.id}") ``` | Parameter | Description | | - | - | | `name` | Updated agent name. | | `instructions` | Updated system prompt. | | `tool_ids` | Updated list of tool IDs. Replaces the existing list. | | `model_id` | Updated response model. | | `reasoning_effort` | Updated reasoning effort. | | `temperature` | Updated temperature. | | `output` | Updated output configuration. | > [!NOTE] > > Agents in `Inactive` or `Failed` states remain in their current state after an update. To activate an updated agent, [promote it](/flow/reference/promote_v1_flow_agents__agent_id__promote_put) manually. ### Preview an agent update Use `agents.update_diff` to simulate an update without applying it. The response shows exactly what would change. **Endpoint:** [`PATCH /v1/flow/agents/{agent_id}/diff`](/flow/reference/diff_v1_flow_agents__agent_id__diff_patch) ```python Python theme={null} from seekrai.types import UpdateAgentRequest diff = client.agents.update_diff( agent_id=agent.id, request=UpdateAgentRequest( name="homework_tutor_bot_v2", instructions="You are a tutor bot for high schoolers." ) ) print(diff) ``` The response includes the complete before and after agent state, and a `diff` object identifying each changed field: ```python Python theme={null} AgentDiffResponse( before=..., after=..., diff={ "name": { "before": "homework_tutor_bot", "after": "homework_tutor_bot_v2" }, "instructions": { "before": "You are a tutor bot for middle schoolers...", "after": "You are a tutor bot for high schoolers." } } ) ``` ## Promote an agent > [!NOTE] > > Agent create requests will promote an agent automatically. Agents only need to be promoted after they've been demoted and are in an inactive state. **Endpoint:** [`PUT /v1/flow/agents/{agent_id}/promote`](/flow/reference/promote_v1_flow_agents__agent_id__promote_put) ```python Python theme={null} agent = client.agents.promote(agent.id) print(f"Agent promoted. Agent ID: {agent.id}") ``` When promoting an agent that has [sub-agents linked as tools](/flow/sdk/agents/agent-as-tool), SeekrFlow automatically promotes the sub-agents first. The supervisor remains in `Pending` state until all sub-agents are ready. ## Demote an agent Demoting an agent moves it to an inactive state. This is useful when you want to retain the agent's definition without allowing it to handle inference requests. > [!NOTE] > > SeekrFlow also demotes an agent automatically after two weeks of inactivity. Creating, deploying, or running an agent resets the two-week period, but updating one does not. The agent's definition is retained. Promote the agent to return it to an active state. **Endpoint:** [`PUT /v1/flow/agents/{agent_id}/demote`](/flow/reference/demote_v1_flow_agents__agent_id__demote_put) ```python Python theme={null} agent = client.agents.demote(agent.id) print(f"Agent demoted. Agent ID: {agent.id}") ``` > [!NOTE] > > Demoting a supervisor does not automatically demote its sub-agents. Each sub-agent must be demoted individually if needed. A sub-agent cannot be demoted while it is still linked to an active supervisor—demote the supervisor first, or unlink the sub-agent. See [Agent as tool](/flow/sdk/agents/agent-as-tool) for details. ## Delete an agent This permanently removes an agent from the SeekrFlow platform. **Endpoint:** [`DELETE /v1/flow/agents/{agent_id}`](/flow/reference/delete_v1_flow_agents__agent_id__delete) ```python Python theme={null} del_response = client.agents.delete(agent.id) print(f"Agent deleted. Agent ID: {agent.id}") ``` > [!NOTE] > > Deleting a supervisor does not affect its sub-agents or their agent-as-tool wrappers. To delete a sub-agent, first unlink it from any supervisors and delete its associated [agent-as-tool](/flow/sdk/agents/agent-as-tool). # Custom tools Source: https://docs.seekr.com/flow/sdk/agents/custom-tools Developer-defined Python functions for specialized business logic. Custom tools are developer-defined Python functions that extend agent capabilities at runtime. Once created, a custom tool becomes part of the agent's available toolset. The agent autonomously determines when and how to invoke the tool based on its instructions, context, and user input. ## Common use cases Custom tools are most often used to: * Access internal knowledge stores — proprietary data sources or repositories unique to your business * Transform or enrich data — clean, format, or augment text, numerical, or structured data * Execute specialized business logic — operations tailored to specific organizational needs ## Quick start ### 1. Define your Python function Each custom tool must be implemented in its **own `.py` file**. The following example creates a simple tool that adds two integers: ```python Python theme={null} def add(a: int, b: int) -> int: """Add two numbers together. This function takes two integers and returns their sum. Use this function when you need to perform a simple addition operation on exactly two integer inputs. Args: a (int): First number. b (int): Second number. Returns: int: The total of a and b. """ return a + b ``` ### 2. Create the custom function ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() add_function = client.agents.custom_functions.create( file_path="relative-path-to/add.py" ) print(f"Function ID: {add_function.id}") ``` `file_path` accepts a relative or absolute path to the `.py` file containing your function. ### 3. Create a code interpreter tool with the custom function Custom functions run within the code interpreter. Create a code interpreter tool and include the function IDs in its configuration: ```python Python theme={null} from seekrai.types import CreateRunPython, RunPythonConfig code_tool = client.tools.create( CreateRunPython( name="addition_tool", description="Perform basic addition and return the answer.", config=RunPythonConfig( function_ids=[add_function.id] ) ) ) print(f"Tool created: {code_tool.id}") ``` ## Parameters | Parameter | Required | Description | | - | - | - | | `name` | Yes | A unique name for the tool. | | `description` | Yes | Description that helps the agent understand when to use this tool. | | `function_ids` | No | List of custom function IDs to include. Without this parameter, the tool functions as a standard code interpreter. | ### 4. Link to an agent ```python Python theme={null} from seekrai.types import CreateAgentRequest agent = client.agents.create( CreateAgentRequest( name="addition-agent", instructions="Agent that performs basic addition and returns the answer.", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=[code_tool.id] ) ) print(f"Agent ID: {agent.id}") ``` ### 5. Run the agent Run the agent as you would for any other tool configuration. For details, see [Create and manage agents](/flow/what-is-seekrflow). ## Docstring requirements Your function must contain a valid docstring in [Google-style format](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings). A Google-style docstring has four components: 1. **Short description**: A brief, one-line description of what the function does. 2. **Long description (optional)**: A more detailed explanation of the function's purpose, behavior, and when to use it. 3. **Args**: Documentation for each parameter, including the parameter name, type, and description. 4. **Returns**: Documentation of the return value, including its type and description. ## Manage custom functions ### Update a custom function ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() updated_function = client.agents.custom_functions.update( function_id=add_function.id, file_path="relative-path-to/add.py" ) ``` An agent that is currently `Active` must be demoted and re-promoted for the updated function to take effect: ```python Python expandable theme={null} import time from seekrai.types import AgentStatus # Demote the agent agent = client.agents.demote(agent.id) while True: agent = client.agents.retrieve(agent.id) if agent.status == AgentStatus.INACTIVE: break time.sleep(5) print(f"Agent demoted: {agent.id}") # Re-promote the agent agent = client.agents.promote(agent.id) while True: agent = client.agents.retrieve(agent.id) if agent.status == AgentStatus.ACTIVE: break time.sleep(5) print(f"Agent promoted: {agent.id}") ``` ### Delete a custom function ```python Python theme={null} result = client.agents.custom_functions.delete(function_id=add_function.id) if result.deleted: print("Custom function deleted successfully.") ``` ### List all custom functions ```python Python theme={null} functions = client.agents.custom_functions.list_functions( limit=20, order="desc", offset=0 ) for fn in functions: print(f"Function ID: {fn.id}, Description: {fn.description}") ``` All parameters are optional: | Parameter | Description | | - | - | | `limit` | Maximum number of functions to return. | | `order` | Sort direction (`"asc"` or `"desc"`) based on creation time. | | `offset` | Number of records to skip before returning results. | ### Retrieve a custom function ```python Python theme={null} fn = client.agents.custom_functions.retrieve(function_id=add_function.id) print(f"ID: {fn.id}, Description: {fn.description}") ``` ## Best practices ### Write clear, purposeful docstrings The reasoning model relies heavily on function docstrings to determine when and how to invoke your custom tools. Well-crafted docstrings directly impact tool performance and reliability. * **Function description**: Include both a short and long description. The short description should describe when to invoke the function. The long description should specify the conditions or scenarios when the agent should use this tool versus other available options. * **Parameter documentation**: Provide clear, specific descriptions for each parameter that help the reasoning model map conversation context to each argument. Avoid generic descriptions like "input value" — instead use contextual descriptions like "user's email address from the conversation" or "the product ID mentioned in the request." * **Return value documentation**: Clearly describe what the function returns and how the agent should interpret or use the result in its response. **Effective docstring:** ```python Python theme={null} def get_user_order_history(user_email: str, days_back: int = 30) -> List[Dict]: """Retrieve a user's recent order history from the e-commerce database. Use this function when a user asks about their past orders, purchase history, or needs information about previous transactions. Only invoke when you have confirmed the user's email address. Args: user_email (str): The customer's email address as provided in the conversation days_back (int): Number of days to look back for orders (default: 30) Returns: List[Dict]: List of order dictionaries containing order_id, date, items, and total """ ``` **Ineffective docstring:** ```python Python theme={null} def get_user_order_history(user_email: str, days_back: int = 30) -> List[Dict]: """Gets orders. This function gets user orders from the database. Use it for orders. Args: user_email (str): Email days_back (int): Days Returns: List[Dict]: Orders """ ``` ### Test functions locally before deployment SeekrFlow does not validate Python syntax or runtime behavior when you create a custom function — it will be created successfully even if the code contains errors. However, when the agent attempts to invoke a faulty function during a conversation, it will fail. Before creating a custom function, always: * Verify the function runs without syntax errors * Test with representative input data * Handle expected edge cases (null values, empty strings, invalid inputs) ### Use external services for complex logic Custom tools support single function definitions only — helper functions and nested functions within the same file are not supported. For workflows requiring multiple functions or complex business logic, create an external service that your custom tool can call. ## Imports and package support SeekrFlow uses Pyodide to execute custom tools in a secure sandboxed environment. * **Natively supported packages**: Pyodide includes many popular Python packages out of the box. See the [complete list of pre-installed packages](https://pyodide.org/en/0.27.6/usage/packages-in-pyodide.html). * **External packages**: For packages not natively supported, Pyodide automatically attempts to install them at runtime using `micropip`. This works for pure Python packages — those that do not require compiled extensions or system-level dependencies. ### Package best practices * Use natively supported packages when possible for faster execution and guaranteed compatibility. * Verify pure Python compatibility for external packages — check that they have wheels available on PyPI and do not depend on C extensions. * Test thoroughly when using external packages, as installation failures will cause your custom tool to fail at runtime. * If a required package does not compile in Pyodide, create an external service that uses the package and call it from your custom tool via API. # File search Source: https://docs.seekr.com/flow/sdk/agents/filesearch-tool Retrieve relevant data from a vector database using semantic search. File search, sometimes referred to as agentic RAG, gives your agents access to your business documents within an agentic application. When invoked, the tool retrieves the most relevant document chunks to help your agent complete its task. ## When to use file search Anytime you have a use case where you want to leverage your business documentation to complete a task — summarize documents, answer questions based on company knowledge, or generate reports using internal data — configure a file search tool. ## Prerequisites File search requires a populated vector database. To create and populate one, see [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database). ## Create a file search tool ```python Python theme={null} from seekrai import SeekrFlow from seekrai.types import CreateFileSearch, FileSearchConfig client = SeekrFlow() file_search_tool = client.tools.create( CreateFileSearch( name="doc_search", description="Search through company documents, policies, procedures, and knowledge base articles.", config=FileSearchConfig( file_search_index="", top_k=5, score_threshold=0.7 ) ) ) print(f"Tool created: {file_search_tool.id}") ``` ## Parameters | Parameter | Required | Description | | - | - | - | | `name` | Yes | A unique name for the tool. | | `description` | Yes | Description that helps the agent understand when to use this tool. | | `file_search_index` | Yes | ID of your vector database containing the documents. | | `top_k` | No | Maximum number of chunks to return from the search. | | `score_threshold` | No | Minimum similarity score for a chunk to be included in results. | ## Link to an agent ```python Python theme={null} from seekrai.types import CreateAgentRequest agent = client.agents.create( CreateAgentRequest( name="DocBot", instructions="You are DocBot, an expert assistant that can search through company documents to answer questions. Always cite the specific documents you reference. Respond only with data returned from the file search tool.", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=[file_search_tool.id] ) ) print(f"Agent ID: {agent.id}") print(f"Agent status: {agent.status}") ``` ## Best practices ### Tool description * Write clear, concise descriptions that specify when the tool should be invoked — for example, "Use this tool to search internal company policies when a user asks about HR procedures." * Include example queries or scenarios to help the agent understand the tool's intended use. * Clearly define the scope and limitations of the tool — for example, "This tool only searches technical documentation, not customer support tickets." ### top_k * **Higher values** increase the likelihood of including relevant results but may introduce more noise. Use for exploratory queries or when context is broad. * **Lower values** give more focused results but risk missing relevant information. Use for targeted tasks. * Common settings are between 3 and 10. ### score_threshold * Use `score_threshold` to filter out weak or irrelevant matches, improving overall result quality. * Start with a moderate threshold (such as 0.5–0.7) and adjust based on observed retrieval quality. ## Source tracing When file search retrieves chunks during a run, the assistant message includes source tracing fields for each chunk alongside the retrieved text. | Field | Description | | - | - | | `chunk_id` | Unique identifier for the retrieved chunk. Use it with the chunk endpoint to get the full provenance record, including `file_id` and exact Markdown location. | | `text` | The full text of the chunk as indexed. | | `page` | Page number in the source document (`null` for native Markdown and JSON). | | `lines` | Line range in the ingested Markdown. | | `section` | Heading hierarchy path from the document root to this chunk. | For the full retrieval workflow — from run response to original source file — see [Source tracing](/flow/sdk/explainability/source-tracing). # MCP connector Source: https://docs.seekr.com/flow/sdk/agents/mcp-connector Connect a remote MCP server to your agent so it can invoke external tools without a custom integration. With the MCP connector tool, agents can call tools hosted on external Model Context Protocol (MCP) servers. SeekrFlow handles authentication, token refresh, and outbound requests. ## When to use Use an MCP connector tool when you want to connect an agent to an external MCP server. ## Prerequisites * An MCP server URL * For OAuth servers without dynamic client registration: a `client_id` and `client_secret` from the provider ## Create an MCP connector tool SeekrFlow supports three authentication modes depending on your MCP server. > [!NOTE] > > An MCP connector tool connects to an entire MCP server. You cannot select individual tools from a server. ### Servers with dynamic client registration (DCR) If the MCP server supports DCR, provide the server URL. SeekrFlow registers itself as an OAuth client and initiates the authorization flow. ```python Python theme={null} from seekrai import SeekrFlow from seekrai.types import CreateMCPConnector, MCPConnectorConfig client = SeekrFlow() mcp_connector_tool = client.tools.create( CreateMCPConnector( name="my_mcp_tool", description="Access external data and actions via the Example MCP server.", config=MCPConnectorConfig( url="https://mcp.example.com" ) ) ) print(f"Tool ID: {mcp_connector_tool.id}") print(f"Status: {mcp_connector_tool.status}") print(f"Authorization URL: {mcp_connector_tool.config.AUTHORIZATION_URL}") ``` The tool is created with a status of `pending_authorization`. Open the `AUTHORIZATION_URL` from the response in a browser and complete the OAuth flow. Once authorized, the tool status changes to `active` and it can be linked to an agent. > [!CAUTION] > > **Authorization window** > > You must complete the OAuth flow within one hour. If the window expires, the tool moves to `failed` status and cannot be recovered. Delete it and create a new one. ### Servers without dynamic client registration If your MCP server requires OAuth but does not support DCR, you'll need to register SeekrFlow as an OAuth client with the provider first. Use the SeekrFlow redirect URI provided in your account settings when configuring the OAuth client. Once you have a `client_id` and `client_secret` from the provider: ```python Python theme={null} mcp_connector_tool = client.tools.create( CreateMCPConnector( name="my_mcp_tool", description="Access external data and actions via the Example MCP server.", config=MCPConnectorConfig( url="https://mcp.example.com", client_id="your-client-id", client_secret="your-client-secret" ) ) ) print(f"Status: {mcp_connector_tool.status}") print(f"Authorization URL: {mcp_connector_tool.config.AUTHORIZATION_URL}") ``` Open the `AUTHORIZATION_URL` and complete the OAuth flow. The tool becomes `active` once authorized. ### Servers with no authentication For MCP servers that require no authentication, provide only the URL: ```python Python theme={null} mcp_connector_tool = client.tools.create( CreateMCPConnector( name="my_mcp_tool", description="Access the Example MCP server.", config=MCPConnectorConfig( url="https://mcp.example.com" ) ) ) print(f"Tool ID: {mcp_connector_tool.id}") print(f"Status: {mcp_connector_tool.status}") ``` The tool is created with `active` status immediately. ## Tool status | Status | Description | Can link to agent? | | - | - | - | | `pending_authorization` | OAuth flow not yet completed. Expires after one hour. | No | | `active` | Authentication complete. Tool is ready to use. | Yes | | `failed` | Authorization timed out, or the tool failed at runtime (expired token, unreachable server, revoked access). | No | If a tool enters `failed` status, delete it and create a new one. ## Link to an agent ```python Python theme={null} from seekrai.types import CreateAgentRequest agent = client.agents.create( CreateAgentRequest( name="MyAgent", instructions="You are an expert assistant. Use the MCP tool to access external data when needed.", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=[mcp_connector_tool.id] ) ) print(f"Agent ID: {agent.id}") ``` Only `active` tools can be linked to an agent. ## Manage your tool You can update a tool's name and description at any time: ```python Python theme={null} from seekrai.types import UpdateMCPConnector updated_tool = client.tools.update( mcp_connector_tool.id, UpdateMCPConnector( name="updated_name", description="Updated description." ) ) ``` > [!NOTE] > > **Changing the MCP server URL or credentials** > > MCP connector tools cannot be duplicated. If you need to connect to a different server or change credentials, create a new MCP connector tool and update your agent's `tool_ids`. ## Best practices ### Tool description Write a description that tells the agent specifically when to invoke this tool and what kind of data or actions it provides. | Effective | Ineffective | | - | - | | "Use this tool to query live inventory data from the warehouse management system. Invoke it when the user asks about stock levels, item availability, or order fulfillment status." | "Use this tool to access the MCP server." | ### Handle tool failures If a tool moves to `failed` during production use (for example, due to a provider token expiry), the agent will still call it, the call will fail, and the run will continue. To avoid unexpected failures, monitor tool status regularly and recreate tools before they impact your agent. # Run an agent Source: https://docs.seekr.com/flow/sdk/agents/run-an-agent Use threads and messages to start runs and retrieve agent responses. Threads, messages, and runs work together to run your agent. A thread holds the conversation context, with messages capturing your input and the agent's responses as it calls tools. A run starts the agent on a thread. ## Create a thread **Endpoint:** [`POST /v1/threads`](/flow/reference/create_thread_endpoint_v1_threads_post) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() thread = client.agents.threads.create() print("Thread created: ", thread.id) ``` ## Create a message **Endpoint:** [`POST /v1/threads/{thread_id}/messages`](/flow/reference/create_message_endpoint_v1_threads__thread_id__messages_post) ```python Python theme={null} message = client.agents.threads.create_message( thread_id=thread.id, role="user", content="Explain the concept of derivatives for my calculus class" ) print(f"Message created! ID: {message.id}, Content: {message.content}") ``` ## Start a run Once your thread has a message, start a run against it. SeekrFlow supports synchronous and streaming runs. ### Run synchronously In synchronous mode, the agent processes the request and returns the complete response when generation is finished. **Endpoint:** [`POST /v1/threads/{thread_id}/runs`](/flow/reference/run_agent_v1_threads__thread_id__runs_post) ```python Python theme={null} import time agent_id = "your_agent_id" thread_id = "your_thread_id" run = client.agents.runs.run( agent_id=agent_id, thread_id=thread_id, stream=False ) run_id = run.run_id print(f"✓ Run started → {run_id}") while True: run = client.agents.runs.retrieve(run_id, thread_id=thread_id) if run.status in ['completed']: break time.sleep(1) final_message = client.agents.threads.list_messages(thread_id)[0] print(final_message.content) ``` ### Run with streaming In streaming mode, the agent's response is sent back incrementally as it's generated, allowing your application to display results in real time. **Endpoint:** [`POST /v1/threads/{thread_id}/runs/stream`](/flow/reference/run_agent_stream_v1_threads__thread_id__runs_stream_post) ```python Python theme={null} agent_id = "your_agent_id" thread_id = "your_thread_id" # With stream=True, run() returns an AgentStreaming object stream = client.agents.runs.run( agent_id=agent_id, thread_id=thread_id, stream=True ) # pretty_print consumes the stream, displaying reasoning, tool calls, # and the final answer as they arrive stream.pretty_print() ``` To handle the streamed events yourself instead of printing them, iterate `stream.raw_events()`. Consume the stream only once, with either `pretty_print()` or `raw_events()`. ## Retrieve messages ### Retrieve a message **Endpoint:** [`GET /v1/threads/{thread_id}/messages/{message_id}`](/flow/reference/get_message_endpoint_v1_threads__thread_id__messages__message_id__get) ```python Python theme={null} message = client.agents.threads.retrieve_message( thread_id=thread.id, message_id=message.id ) print("Message retrieved!") print(f"Thread ID: {message.thread_id}, Message ID: {message.id}") ``` ### Retrieve all messages from a thread **Endpoint:** [`GET /v1/threads/{thread_id}/messages`](/flow/reference/list_messages_endpoint_v1_threads__thread_id__messages_get) ```python Python theme={null} thread_id = "your_thread_id" messages = client.agents.threads.list_messages(thread_id=thread_id) print(f"Messages in thread {thread_id}:") for message in messages: print(f"Message ID: {message.id}") print(f"Role: {message.role}") print(f"Content: {message.content}") print("-" * 10) ``` ## Manage threads ### List threads **Endpoint:** [`GET /v1/threads`](/flow/reference/list_threads_endpoint_v1_threads_get) ```python Python theme={null} threads = client.agents.threads.list(limit=20, order="desc") print("Available threads:") for thread in threads: print(f"ID: {thread.id}, Status: {thread.status}") if thread.agent_id is not None: print(f"Agent ID: {thread.agent_id}") ``` ### Retrieve a thread **Endpoint:** [`GET /v1/threads/{thread_id}`](/flow/reference/get_thread_endpoint_v1_threads__thread_id__get) ```python Python theme={null} thread = client.agents.threads.retrieve(thread_id=thread.id) print(f"Thread retrieved: ID={thread.id}, Status={thread.status}") ``` ### Delete a thread **Endpoint:** [`DELETE /v1/threads/{thread_id}`](/flow/reference/delete_thread_endpoint_v1_threads__thread_id__delete) ```python Python theme={null} deleted_status = client.agents.threads.delete(thread_id=thread.id) print(f"Thread {thread.id} deleted: {deleted_status}") ``` ## Manage messages ### Update a message **Endpoint:** [`PATCH /v1/threads/{thread_id}/messages/{message_id}`](/flow/reference/update_message_endpoint_v1_threads__thread_id__messages__message_id__patch) ```python Python theme={null} thread_id = "your_thread_id" message_id = "your_message_id" updated_message = client.agents.threads.update_message( thread_id=thread_id, message_id=message_id, content="What can you help me with?" ) print(f"Message updated in thread {thread_id}!") print(f"Message ID: {updated_message.id}") print(f"New Content: {updated_message.content}") ``` ### Delete a message **Endpoint:** [`DELETE /v1/threads/{thread_id}/messages/{message_id}`](/flow/reference/delete_message_endpoint_v1_threads__thread_id__messages__message_id__delete) ```python Python theme={null} thread_id = "your_thread_id" message_id = "your_message_id" deleted_status = client.agents.threads.delete_message( thread_id=thread_id, message_id=message_id ) print(f"Message {message_id} deleted from thread {thread_id}!") ``` ## Track file search sources When an agent uses file search, each retrieved chunk's source tracing fields are appended to the assistant message content: | Field | Description | | - | - | | `chunk_id` | Unique chunk ID — use this to call the chunk endpoint for full Markdown provenance | | `page` | Source document page number (`null` for native Markdown or JSON) | | `lines` | Line range in the ingested Markdown (e.g. `42-67`) | | `section` | Heading hierarchy path from document root to the chunk | Use `chunk_id` with `GET /v1/flow/vectordb/{database_id}/chunk/{chunk_id}` to retrieve the `file_id` and download the original source document. ## Understand data structures ### Thread ```python Python theme={null} class ThreadStatus(str, Enum): AVAILABLE = "available" LOCKED = "locked" class Thread(BaseModel): id: str object: str created_at: datetime status: ThreadStatus active_run_id: Optional[str] meta_data: dict[str, Any] ``` ### Message ```python Python theme={null} class ThreadMessage(BaseModel): id: str object: str = 'thread.message' created_at: datetime thread_id: str role: str # e.g., 'user', 'assistant' content: ThreadMessageContentType agent_id: Optional[str] run_id: Optional[str] meta_data: dict[str, Any] ``` # Use structured outputs Source: https://docs.seekr.com/flow/sdk/agents/structured-outputs Control the format of agent responses using Pydantic models or JSON schemas. Structured outputs use a Pydantic `BaseModel` or JSON schema to enforce a response format on your agent, giving you typed, integration-ready data without extra parsing or post-processing. Use them when agent responses feed directly into external systems like APIs or databases, or when extracting structured information from unstructured content like documents and emails. ## Define a schema with Pydantic Define a Pydantic model in the `response_format` parameter: **Endpoint:** [`POST /v1/threads/{thread_id}/runs`](/flow/reference/run_agent_v1_threads__thread_id__runs_post) ```python Python theme={null} from pydantic import BaseModel, Field from typing import List from seekrai import SeekrFlow class ProductReview(BaseModel): product_name: str = Field(description="The full product name as listed") pros: List[str] = Field(description="List of positive aspects, maximum 3 items") cons: List[str] = Field(description="List of negative aspects, maximum 3 items") recommended: bool = Field(description="Whether the reviewer recommends this product") # Use structured output with your agent result = client.agents.runs.run( agent_id="your-agent-id", thread_id=thread.id, response_format=ProductReview ) ``` ## Define nested Pydantic objects You can also define multiple levels of Pydantic classes: **Endpoint:** [`POST /v1/threads/{thread_id}/runs`](/flow/reference/run_agent_v1_threads__thread_id__runs_post) ```python Python expandable theme={null} from pydantic import BaseModel, Field from typing import List from seekrai import SeekrFlow # Define nested objects first class ReviewerInfo(BaseModel): name: str verified_purchase: bool review_date: str class ProductSpecs(BaseModel): brand: str model: str price: float category: str # Main object that includes nested objects class ProductReview(BaseModel): product_name: str = Field(description="The full product name as listed") specs: ProductSpecs = Field(description="Technical specifications of the product") reviewer: ReviewerInfo = Field(description="Information about the reviewer") pros: List[str] = Field(description="List of positive aspects, maximum 3 items") cons: List[str] = Field(description="List of negative aspects, maximum 3 items") recommended: bool = Field(description="Whether the reviewer recommends this product") # Use structured output with your agent result = client.agents.runs.run( agent_id="your-agent-id", thread_id=thread.id, response_format=ProductReview ) # Agent will return nested data matching this structure: # { # "product_name": "Wireless Headphones", # "specs": { # "brand": "Sony", # "model": "WH-1000XM4", # "price": 299.99, # "category": "Electronics" # }, # "reviewer": { # "name": "John Smith", # "verified_purchase": true, # "review_date": "2024-01-15" # }, # "pros": ["Great sound quality", "Long battery life"], # "cons": ["Expensive", "Heavy"], # "recommended": true # } ``` ## Handle validation errors When the agent cannot map its response to the defined schema, a validation error is returned. **Endpoint:** [`POST /v1/threads/{thread_id}/runs`](/flow/reference/run_agent_v1_threads__thread_id__runs_post) ```python Python theme={null} # Validation Error - 422 { "error": "Value Error", "feedVersion": "1.0.0", "message": "Value error, Response format JSON schema could not be validated: ", "requestUrl": "https://services-api.seekr.com/v1/agents/runs", "status": 422 } ``` If you receive a validation error, handle the error as shown: ```python Python expandable theme={null} from seekrai import SeekrFlow from pydantic import BaseModel, Field from typing import List class ProductReview(BaseModel): product_name: str specs: ProductSpecs # Nested object reviewer: ReviewerInfo # Nested object pros: List[str] cons: List[str] recommended: bool try: result = client.agents.runs.run( agent_id="your-agent-id", thread_id=thread.id, response_format=ProductReview ) print(result) except Exception as e: print("Structured output validation failed:", str(e)) ``` ## Improve schema accuracy When using structured outputs, we recommend the following: 1. **Keep schemas simple and focused.** Complex structures with excessive fields or deep nesting can reduce model accuracy. Limit nesting to one level deep. While multiple levels are supported, single-level nesting produces the most consistent results. 2. **Use clear field names.** Choose descriptive field names that help the model accurately map response content to your schema. For example, `customer_email` is clearer than `email`, and `total_price_usd` is clearer than `price`. 3. **Use few-shot prompting.** Include examples in your agent's instructions to guide accurate field mapping. Sample inputs and expected outputs help the model understand how to structure its response. 4. **Test your schemas thoroughly.** Validate your schemas against real queries and edge cases before deploying. Test with a range of input types to ensure consistent results. # Tools Source: https://docs.seekr.com/flow/sdk/agents/tools Create and manage tools in the tool library. Tools extend what agents can do. While models provide reasoning capabilities, tools allow agents to take actions—accessing external systems, querying knowledge stores, executing code, or performing web searches to accomplish tasks. The tool library lets you create and manage tools independently of agents, then link them to any agent by tool ID. ## Tool types | Type | SDK class | Description | | - | - | - | | [File search](/flow/sdk/agents/filesearch-tool) | `CreateFileSearch` | Semantic search and retrieval across vector databases | | [Web search](/flow/sdk/agents/websearch-tool) | `CreateWebSearch` | Real-time information retrieval from web sources | | [Custom tools](/flow/sdk/agents/custom-tools) | `CreateRunPython` | Python code execution for data analysis and computations, with optional developer-defined functions for specialized business logic | | [Agent as tool](/flow/sdk/agents/agent-as-tool) | `CreateAgentAsTool` | Delegate subtasks to another agent and return the result to the supervisor | | [MCP connector](/flow/sdk/agents/mcp-connector) | `CreateMCPConnector` | Connect to external MCP providers through a secure gateway | See the sub-pages for type-specific configuration and parameters. ## Create a tool Create a tool in the library using `client.tools.create()`: ```python Python theme={null} from seekrai import SeekrFlow from seekrai.types import CreateWebSearch client = SeekrFlow() tool = client.tools.create( CreateWebSearch( name="my_web_search", description="Search the web for information relevant to the user's query." ) ) print(f"Tool created: {tool.id}") ``` For tools that require configuration, include a config object: ```python Python theme={null} from seekrai.types import CreateFileSearch, FileSearchConfig tool = client.tools.create( CreateFileSearch( name="my_file_search", description="Search the knowledge base for relevant information.", config=FileSearchConfig( file_search_index="", top_k=10, score_threshold=0.5 ) ) ) ``` ## Retrieve a tool ```python Python theme={null} tool = client.tools.retrieve("") print(tool.name, tool.type) ``` ## List tools ```python Python theme={null} tools = client.tools.list() for tool in tools.data: print(f"{tool.name} ({tool.type}): {tool.id}") ``` ## Update a tool Use `client.tools.update()` to make partial changes to a tool. Provide only the fields you want to change. Omitted fields remain unchanged. **Endpoint:** [`PATCH /v1/flow/tools/{tool_id}`](/flow/reference/patch_tool_v1_flow_tools__tool_id__patch) ```python Python theme={null} from seekrai.types import UpdateWebSearch updated_tool = client.tools.update( tool_id="", request=UpdateWebSearch( description="Updated description for web search." ) ) ``` > [!WARNING] > > Tool updates propagate immediately to all agents using the tool. ## Preview a tool update Use `client.tools.update_diff()` to simulate an update without applying it. The response shows exactly what would change. **Endpoint:** [`PATCH /v1/flow/tools/{tool_id}/diff`](/flow/reference/diff_tool_changes_v1_flow_tools__tool_id__diff_patch) ```python Python theme={null} from seekrai.types import UpdateWebSearch diff = client.tools.update_diff( tool_id="", request=UpdateWebSearch( name="my_web_search_v2", description="Updated description for web search." ) ) print(diff) ``` The response includes the complete before and after tool state, and a `diff` object identifying each changed field: ```python Python theme={null} ToolDiffResponse( before=..., after=..., diff={ "name": { "before": "my_web_search", "after": "my_web_search_v2" }, "description": { "before": "Search the web for information.", "after": "Updated description for web search." } } ) ``` ## Duplicate a tool ```python Python theme={null} duplicate = client.tools.duplicate("", "my_duplicate_tool") ``` ## Delete a tool ```python Python theme={null} result = client.tools.delete("") print(result.message) ``` > [!WARNING] > > You cannot delete a tool that is linked to an active agent. Demote or delete the agent first. ## List linked agents Check which agents use a specific tool before updating or deleting it: ```python Python theme={null} agents = client.tools.list_agents("") for agent in agents: print(f"{agent.name} ({agent.status}): {agent.id}") ``` ## Link tools to an agent When creating or updating an agent, specify tool IDs in the `tool_ids` parameter: ```python Python theme={null} from seekrai.types import CreateAgentRequest agent = client.agents.create( CreateAgentRequest( name="my_agent", instructions="You are a helpful assistant.", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=["", ""] ) ) ``` For more on agent creation and management, see [Create and manage agents](/flow/sdk/agents/create-agents). # Web search Source: https://docs.seekr.com/flow/sdk/agents/websearch-tool Real-time information retrieval from web sources. The web search tool gives agents access to real-time web information, including current events, recent developments, and external references. ## Create a web search tool ```python Python theme={null} from seekrai import SeekrFlow from seekrai.types import CreateWebSearch client = SeekrFlow() web_search_tool = client.tools.create( CreateWebSearch( name="my_web_search", description="Search the web for current information, news, recent developments, and real-time data." ) ) print(f"Tool created: {web_search_tool.id}") ``` ## Parameters | Parameter | Required | Description | | - | - | - | | `name` | Yes | A unique name for the tool. | | `description` | Yes | Description that helps the agent understand when to use this tool. | ## Link to an agent ```python Python theme={null} from seekrai.types import CreateAgentRequest agent = client.agents.create( CreateAgentRequest( name="WebSearchBot", instructions="You are an expert assistant with access to real-time web information. Use the web search tool for current events, recent developments, or information not in your training data.", model_id="meta-llama/Llama-3.3-70B-Instruct", tool_ids=[web_search_tool.id] ) ) print(f"Agent ID: {agent.id}") print(f"Agent status: {agent.status}") ``` ## Best practices ### Tool description A good description clearly states when the tool should be used, what type of content it should retrieve, and what scenarios it should avoid. **Effective description:** "Use this tool to search for real-time product pricing and availability on external e-commerce websites. Only invoke this tool when the user explicitly asks for current prices, stock information, or product comparisons that are not already covered in internal documents. Avoid using this tool for general product information, technical specifications, or reviews — use the file search tool instead if available." **Ineffective description:** "Use this when the user asks a question that you think would benefit from web search." # Data engine Source: https://docs.seekr.com/flow/sdk/data-engine SDK workflows for uploading files, running ingestion, and creating data jobs for fine-tuning and semantic search. The data engine transforms raw content into structured, AI-ready data. It manages the complete data lifecycle from file ingestion through preparation for training and retrieval workflows. Fine-tuning data workflows are built around **data jobs** — managed operations that bundle file ingestion, Markdown review, prompt configuration, and alignment generation into a single tracked unit. For a conceptual overview of the data engine and its capabilities, see [Data engine](/flow/components/data-engine). ## Data engine workflows > [card] [Prepare and ingest files](/flow/sdk/data-engine/file-ingestion) > > Upload source documents (PDF, DOCX, PPT, Markdown) and convert them to Markdown via the ingestion API. > [card] [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) > > Track ingestion progress through data job status, per-file records, and timeline events. > [card] [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database) > > Set up a vector database and run document ingestion to generate embeddings for semantic search and retrieval. > [card] [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning) > > Use a data job to generate a QA pair dataset for instruction fine-tuning. > [card] [Create context-grounded fine-tuning data](/flow/sdk/data-engine/context-grounded-fine-tuning-data) > > Use data jobs to generate training data grounded in an existing knowledge source. > [card] [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs) > > List, filter, update metadata, and cancel data jobs. # Use AWS Bedrock for ingestion and inference Source: https://docs.seekr.com/flow/sdk/data-engine/aws-bedrock Configure SeekrFlow to use AWS Bedrock for document ingestion and agent inference on self-managed EKS deployments. > [!NOTE] > > **Self-managed only** > > AWS Bedrock support is available for SeekrFlow Self-Managed deployments on AWS/EKS. It is not available on SeekrFlow SaaS. For self-managed EKS deployments, SeekrFlow can route document ingestion and agent inference through AWS Bedrock instead of SeekrFlow's built-in models. This lets you run agent inference, embedding generation, and document conversion on AWS. ## Prerequisites * AWS credentials with Bedrock Runtime permissions (`bedrock-runtime:InvokeModel`, `bedrock-runtime:Converse`) * Desired Titan embedding and Claude models enabled in the AWS Console for your region * EKS deployment (agent inference is EKS-only) ## Ingestion ### Bedrock embedding models When you create a vector database with a `bedrock:`-prefixed model name, SeekrFlow routes all embedding requests to AWS Bedrock instead of SeekrFlow's built-in models. The `bedrock:` prefix is stripped before making API calls to AWS. | Model ID | Dimensions | Languages | Notes | | - | - | - | - | | `bedrock:amazon.titan-embed-text-v2:0` | 256, 512, 1024 | 100+ | Recommended. Best for RAG, document search, and reranking. | | `bedrock:amazon.titan-embed-text-v1` | 1536 | 25+ | Legacy. Text retrieval and semantic similarity. | | `bedrock:amazon.titan-embed-g1-text-02` | 1536 | 25+ | Legacy G1 model. | | `bedrock:amazon.titan-embed-image-v1` | 256, 384, 1024 | N/A | Multimodal (text + image) embeddings. | To create a vector database with a Bedrock embedding model: ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() vector_db = client.vector_database.create( model="bedrock:amazon.titan-embed-text-v2:0", name="my-bedrock-db", description="Vector database using Bedrock embeddings" ) ``` For a full walkthrough of vector database setup and file ingestion, see [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database). ### Bedrock vision PDF conversion In Bedrock mode, SeekrFlow supports two PDF conversion methods: | Method | Description | | - | - | | `pymupdf` | Text-based extraction. Fast and lightweight. | | `bedrock-vision` | Vision-based extraction using a Bedrock Claude model. Renders each page as an image and extracts content using the model. Best for scanned documents and image-heavy PDFs. | Other conversion methods (bookmark, seekr-saas, smoldocling, etc.) are not available in Bedrock mode. To enable vision-based conversion, set the `BEDROCK_VISION_MODEL` environment variable. When set, the ingestion pipeline automatically restricts available conversion methods to `pymupdf` and `bedrock-vision`. ### Environment variables | Variable | Required | Default | Description | | - | - | - | - | | `AWS_ACCESS_KEY_ID` | Yes\* | None | AWS access key for Bedrock API access. | | `AWS_SECRET_ACCESS_KEY` | Yes\* | None | AWS secret key for Bedrock API access. | | `AWS_REGION` | No | `us-east-1` | AWS region for all Bedrock API calls. | | `BEDROCK_VISION_MODEL` | No | None | Bedrock vision model for PDF conversion. Must use the `bedrock:` prefix — for example, `bedrock:us.anthropic.claude-3-5-sonnet-20241022-v2:0`. | > [!NOTE] > > AWS credentials can also be provided via IAM roles, instance profiles, or any standard boto3 credential chain. ## Agent inference When Bedrock is configured, Claude 4.5 is available for all intra-agent inference. Bedrock models appear alongside other models in the agent model-selection UI and are configured via Helm at deploy time. > [!NOTE] > > **Current limitations** > > * Available for agents only. Model Chat is not supported. > * Reasoning and speed optimization parameters are ignored. ## Combining ingestion and inference You can use Bedrock for ingestion, inference, or both, including fully Bedrock-backed RAG agents. # Choose a chunking method Source: https://docs.seekr.com/flow/sdk/data-engine/choose-chunking-method Segment ingested content with the markdown, semantic, or sliding window chunking methods, and attach per-chunk metadata. The `chunking_method` parameter on `create_ingestion_job` controls how SeekrFlow segments your content into chunks before embedding. Choose the method that best fits your documents. ## Markdown chunking (default) **Intelligent structure-aware chunking** that automatically detects logical content breaks: * Respects document structure and heading hierarchies * Keeps related content together (headings with their content) * Preserves tables with their headers * Groups small sections to optimize chunk sizes ## Semantic chunking Call with `chunking_method="semantic"` to enable meaning-aware segmentation. This method detects sentence boundaries, embeds paragraphs, and groups them by meaning using hierarchical clustering, rather than relying on document position: * Searches for topic shifts instead of raw heading boundaries to keep tightly related sentences together * Automatically merges short paragraphs or bullets when they express the same idea * Honors document structure when it provides strong signals but can span across headings if the semantics match * Applies `token_count` and `overlap_tokens` as safety caps, splitting only when a semantic chunk would exceed those limits **When to use it:** * Long narrative content (wikis, blogs, requirements) where sections do not follow strict Markdown hierarchy * Mixed-format documents where context spans multiple small headings or callouts No additional markup is required. Tune `token_count` and `overlap_tokens` to control chunk granularity. ## Sliding window chunking Call with `chunking_method="sliding"` to split content into fixed-size overlapping windows. This method has no structural awareness, which makes it fast and predictable. Use it for plain-text or homogeneous content that lacks clear document structure. To force chunk boundaries at specific points, insert `---DOCUMENT_BREAK---` markers in your Markdown: ```text Markdown theme={null} # Section 1 This content will be in one chunk... ---DOCUMENT_BREAK--- # Section 2 This content will be in a separate chunk... ---DOCUMENT_BREAK--- # Section 3 This starts another chunk... ``` Set `token_count` (for example, `1000`) and `overlap_tokens` (for example, `100`) in the same `create_ingestion_job` call to control chunk size and overlap. Document break markers apply only to sliding window chunking. With `markdown` or `semantic` chunking, a marker does not create a boundary, and the literal marker text stays in the chunk. Remove the markers from your Markdown before you ingest it with either of those methods. > [!NOTE] > > If the content between two document break markers exceeds `token_count`, the sliding window splits it into multiple chunks. ### Add per-chunk metadata With sliding window chunking, you can attach different metadata to different chunks by embedding a metadata block inside a section. Place the block between `---CHUNK_META_START---` and `---CHUNK_META_END---`, with a single line of JSON in between. The block is scoped to the section it appears in and is removed from the text before indexing and never becomes part of the chunk content. ```text Markdown theme={null} # Introduction ---CHUNK_META_START--- {"author": "Jane Smith", "source": "chapter_1", "classification": "public", "year": 2024} ---CHUNK_META_END--- This is the first chunk of the document. ---DOCUMENT_BREAK--- # Conclusion This chunk has no metadata block and falls back to the job-level metadata from the ingestion request. ``` Per-chunk metadata follows the same [metadata rules](/flow/sdk/data-engine/manage-chunk-metadata#metadata-rules) as job-level metadata, but a block that breaks them is handled differently. An ingestion request with invalid metadata is rejected outright, while inside a block an invalid field is dropped with a warning and the rest of the chunk still ingests. Per-chunk metadata behaves as follows: * It is supported only with sliding window chunking. * A section's block replaces the job-level metadata for that chunk. The two are not merged. * A block applies to chunks only. It does not change the `metadata` on a file record, which keeps the job-level values. * A section with no block inherits the job-level metadata from the ingestion request, or no metadata if the request supplied none. * When a section is longer than `token_count` and splits into several chunks, every chunk from that section carries the section's metadata. * When a section contains more than one block, the last block applies. Use a single block per section. > [!WARNING] > > Ingestion does not reject metadata blocks that appear with `markdown` or `semantic` chunking. The block is not applied, and its marker lines and JSON remain in the chunk text, where they become part of the embedded content. Use these markers only with `chunking_method="sliding"`. # Create context-grounded fine-tuning data Source: https://docs.seekr.com/flow/sdk/data-engine/context-grounded-fine-tuning-data Generate structured context data for fine-tuning using data jobs. > [!WARNING] > > Context-grounded fine-tuning stops working on November 9, 2026. You can keep using it until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). Context-grounded data jobs ground model responses in an existing knowledge source. Two job types are available: * **`context_grounded_files`** — aligns against uploaded and ingested documents. Follows the same file preparation and ingestion steps as `principle_files`, but no system prompt is required. * **`context_grounded_vector_db`** — aligns against a pre-built SeekrFlow vector database. No file upload or ingestion is needed. Neither type requires a system prompt to start. Not sure which approach fits your use case? See [Fine-tuning](/flow/components/fine-tuning). ## context_grounded_files ### Step 1: Create the job **Endpoint:** [`POST /v1/flow/data-jobs`](/flow/reference/submit_data_job_v1_flow_data_jobs_post) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() data_job = client.data_jobs.create( name="Customer support context grounding", instructions="Generate QA pairs grounded in the ingested support docs.", job_type="context_grounded_files", ) data_job_id = data_job.id print("Data job ID:", data_job_id) ``` ### Step 2: Upload and attach files Upload your source files using the [Files API](/flow/sdk/data-engine/file-ingestion), then attach them to the job. Ingestion runs automatically for non-Markdown files. Markdown files are alignment-ready immediately. **Endpoint:** [`POST /v1/flow/data-jobs/{id}/add-files`](/flow/reference/add_files_to_data_job_v1_flow_data_jobs__data_job_id__add_files_post) ```python Python theme={null} data_job = client.data_jobs.add_files( data_job_id, file_ids=[ "file-25e34f96-2130-11f0-9236-3e11346bffff", "file-efd0b334-2130-11f0-9236-3e11346bffff", ], method="accuracy-optimized", ) print("Status:", data_job.status) ``` Poll `GET /v1/flow/data-jobs/{id}` until `status` is `ready_to_start`. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) for details on job states and error handling. ### Step 3: Start alignment No system prompt is required. Call `/start` once `status` is `ready_to_start`. **Endpoint:** [`POST /v1/flow/data-jobs/{id}/start`](/flow/reference/start_data_job_alignment_v1_flow_data_jobs__data_job_id__start_post) ```python Python theme={null} detail = client.data_jobs.start(data_job_id) print("Alignment job:", detail.alignment_job.id, detail.alignment_job.status) ``` **Prerequisites:** * `status` must be `ready_to_start` * At least one processed Markdown file attached (ingested or uploaded) ### Step 4: Monitor alignment ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) print("Status:", detail.status) if detail.alignment_job: print("Alignment job:", detail.alignment_job.id, detail.alignment_job.status) if detail.alignment_job.status_message: print("Status detail:", detail.alignment_job.status_message) ``` `status_message` gives a human-readable description of the alignment job's current state, including the reason if the job fails. Once `status` shows `completed`, retrieve the output files as described in Step 5. ### Step 5: Retrieve output files **Endpoint:** [`GET /v1/flow/data-jobs/{id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get) ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) outputs = detail.alignment_job.output_files for f in outputs: print(f.id, f.filename, f.file_type, f.purpose) ``` The output file with `"purpose": "fine-tune"` (the `.parquet`) is the file ID to use when creating a fine-tuning job. ## context_grounded_vector_db Use this job type when your knowledge source is already indexed in a SeekrFlow vector database. No file upload or ingestion is needed — attach the vector database ID and start. ### Step 1: Create the job and attach the vector database **Endpoints:** `POST /v1/flow/data-jobs` [Submit data job](/flow/reference/submit_data_job_v1_flow_data_jobs_post) · `PATCH /v1/flow/data-jobs/{id}` [Update data job](/flow/reference/patch_data_job_v1_flow_data_jobs__data_job_id__patch) Create the job and set `vector_database_id` before starting. No file upload or ingestion is needed. ```python Python theme={null} data_job = client.data_jobs.create( name="Customer support refresh", instructions="Generate QA pairs grounded in the existing vector store.", job_type="context_grounded_vector_db", ) data_job_id = data_job.id data_job = client.data_jobs.update( data_job_id, vector_database_id="9aab2ceb-7c7b-4c07-8ff4-5416dfad221a", ) print("Vector DB set:", data_job.vector_database_id) ``` ### Step 2: Start alignment **Endpoint:** [`POST /v1/flow/data-jobs/{id}/start`](/flow/reference/start_data_job_alignment_v1_flow_data_jobs__data_job_id__start_post) ```python Python theme={null} detail = client.data_jobs.start(data_job_id) print("Alignment job:", detail.alignment_job.id, detail.alignment_job.status) ``` **Prerequisites:** * `status` must be `ready_to_start` * `vector_database_id` must be set * No system prompt required ### Step 3: Monitor alignment ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) print("Status:", detail.status) if detail.alignment_job: print("Alignment job:", detail.alignment_job.id) ``` Once `status` shows `completed`, retrieve the output files as described in Step 4. ### Step 4: Retrieve output files **Endpoint:** [`GET /v1/flow/data-jobs/{id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get) ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) outputs = detail.alignment_job.output_files for f in outputs: print(f.id, f.filename, f.file_type, f.purpose) ``` The output file with `"purpose": "fine-tune"` (the `.parquet`) is the file ID to use when creating a fine-tuning job. # Create and populate a vector database Source: https://docs.seekr.com/flow/sdk/data-engine/create-and-populate-a-vector-database Set up a vector database and ingest documents to generate embeddings for semantic search and retrieval. This guide covers setting up the vector database, processing your documents, creating embeddings, and monitoring ingestion jobs. A complete example is available following the step-by-step guide, along with guidance for managing your vector databases. ## Step 1: Set up a vector database Seekr's Vector Database SDK provides advanced semantic search capabilities by transforming text into vector embeddings, making it possible to perform semantic searches that focus on meaning and context. This approach provides a smarter and more intuitive way to retrieve documents compared to traditional keyword-based methods. First, choose an embedding model. Omit `model` to use the default, `ibm-granite/granite-embedding-311m-multilingual-r2`. For the available models and their dimensions, input limits, language support, and country of origin, see [Embedding models](/flow/components/models/embedding-models). Keep your chunk size within the model's maximum input tokens. Chunks longer than the limit are not fully represented in the resulting vectors. > [!WARNING] > > The embedding model is fixed when you create the database and cannot be changed afterward without re-embedding your documents. Settle this choice before you continue. ### Create an empty vector database Create the vector database with your chosen model: ```python Python theme={null} from seekrai import SeekrFlow # Initialize the client. Omit api_key if your key is set as an environment variable. client = SeekrFlow(api_key="YOUR_KEY_HERE") # Create the vector database vector_db = client.vector_database.create( model="ibm-granite/granite-embedding-311m-multilingual-r2", name="QuickStart_DB", description="Quick start example database", ) database_id = vector_db.id print(f"Created database: {vector_db.name} (ID: {database_id})") ``` **Sample response:** ```text Output theme={null} Created database: QuickStart_DB (ID: b7123456789-09876-4567) ``` ## Step 2: Upload files Upload your source documents to get the `file_id`s for ingestion. Files can be up to 4GB each. For supported file types and file-preparation guidance, see [Prepare and ingest files](/flow/sdk/data-engine/file-ingestion). > [!TIP] > > If you already have `file_id`s from a separate upload, skip this step and reuse them. ```python Python theme={null} # Upload a file # Replace with the path to your file. # On Windows, use a raw string to avoid backslash issues: r"C:\Users\username\Downloads\document.pdf" file_path = "/Users/username/Downloads/document.pdf" upload_response = client.files.upload(file_path, purpose="alignment") file_id = upload_response.id print(f"Uploaded file with ID: {file_id}") ``` To upload several files at once, or to list and delete uploaded files, see [Prepare and ingest files](/flow/sdk/data-engine/file-ingestion). ## Step 3: Start a vector database ingestion job Next, create a job to ingest documents into your vector database. This step converts the files and creates embeddings from them. Choose an ingestion method and a chunking method, set the chunk size, then start the job. ### Choose an ingestion method **Accuracy-optimized (default)** When you use `method="accuracy-optimized"` or omit the method parameter, the system prioritizes accuracy. Depending on what data is available in your PDF document (bookmarks, tables, text layers), the system combines multiple extraction techniques for best results. **Key features:** * Uses both OCR and direct text extraction, then blends them together * Employs LLM agents to correct and enhance document hierarchy * Applies advanced table detection algorithms for accurate table formatting > [!NOTE] > > Documents over 100 pages can take up to 30 minutes to process. **Speed-optimized** When you use `method="speed-optimized"`, the system balances quality with processing speed. It automatically selects faster methods based on document size while maintaining reasonable accuracy for smaller documents. **Key features:** * Small documents still use high-accuracy methods * Larger documents use speed optimized algorithms to meet time constraints > [!NOTE] > > Optimized to complete in approximately 3 minutes regardless of document size. Once ingestion is complete, you'll receive a Markdown file that you can use for fine-tuning. > [!NOTE] > > **Ingestion mode and the UI** > > When ingesting files through the SeekrFlow UI, speed-optimized mode is always used. The SDK lets you choose between speed-optimized and accuracy-optimized. ### Choose a chunking method Set `chunking_method` to control how SeekrFlow segments content into chunks. The default is `markdown`; `semantic` and `sliding` are also available. See [Choose a chunking method](/flow/sdk/data-engine/choose-chunking-method) for how each method works and how to attach per-chunk metadata. ### Set chunk size and overlap The `token_count` parameter specifies the target size of each chunk, ensuring each chunk is neither too large (risking truncation by model limits) nor too small (losing semantic coherence). **Best practices:** * Common ranges: For embedding and retrieval, 200–500 tokens per chunk is a widely used range, balancing context and efficiency. The example here uses a token count of 512. * Adjust for document type: If your documents are dense or have complex structure (e.g., legal, technical), consider slightly larger chunks; for conversational or highly variable content, smaller chunks may work better. The `overlap_tokens` parameter creates overlapping regions between adjacent chunks at chunk boundaries, reducing the risk of missing relevant information that spans two chunks. Adjust chunking parameters based on document characteristics: | Document type | Recommended `token_count` | Recommended `overlap_tokens` | | - | - | - | | Technical documentation | 384-512 | 50-75 | | Legal documents | 512-768 | 75-100 | | Conversational content | 256-384 | 25-50 | ### Create the ingestion job ```python Python theme={null} # Create the ingestion job ingestion_job = client.vector_database.create_ingestion_job( database_id=database_id, files=[file_id], method="accuracy-optimized", chunking_method="markdown", token_count=512, overlap_tokens=50, ) job_id = ingestion_job.id print(f"Created ingestion job: {job_id}") ``` **Sample response:** ```text Output theme={null} Created ingestion job: ij-d80bd45a-4bb5-4bac-bbf3-7e3345409bc8 ``` ### Attach metadata at ingestion To attach user-defined metadata to the chunks created by an ingestion job, include an optional `metadata` object in the request. Job-level metadata is copied onto every chunk produced from every file in the job, and stored on each file record, where it appears as the `metadata` field in the job response. You can later filter or edit it with the chunk metadata methods (see [Manage chunk metadata](/flow/sdk/data-engine/manage-chunk-metadata)). ```python Python theme={null} ingestion_job = client.vector_database.create_ingestion_job( database_id=database_id, files=[file_id], method="accuracy-optimized", chunking_method="markdown", token_count=512, overlap_tokens=50, metadata={ "year": 2024, "doc_type": "annual_report", "department": "finance", "is_confidential": True, }, ) ``` The metadata object must follow a few constraints (flat object, typed values, 20 keys maximum); see [Metadata rules](/flow/sdk/data-engine/manage-chunk-metadata#metadata-rules) for the full list. To set different metadata on different chunks within one job, use the per-chunk metadata blocks described under [Add per-chunk metadata](/flow/sdk/data-engine/choose-chunking-method#add-per-chunk-metadata). ## Step 4: Monitor ingestion status (optional) After starting an ingestion job, you can track job progress, view per-file statuses, and diagnose any failures. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) for details on checking job states, interpreting `file_records`, and resolving errors. Once `status` shows `completed`, your vector database is ready to query. Every ingested chunk also captures provenance metadata (source page, line ranges, heading path) automatically. To trace query results back to their source, see [Source tracing](/flow/sdk/explainability/source-tracing). ## Complete example This example demonstrates the entire workflow for creating a vector database, adding files, and kicking off an ingestion job: ```python Python expandable theme={null} from seekrai import SeekrFlow import time import os client = SeekrFlow() # Step 1: Create vector database print("Creating vector database...") db_name = f"QuickStart_DB_{int(time.time())}" vector_db = client.vector_database.create( model="ibm-granite/granite-embedding-311m-multilingual-r2", name=db_name, description="Quick start example database" ) database_id = vector_db.id print(f"Created database: {vector_db.name} (ID: {database_id})") # Step 2: Upload file print("Uploading file...") file_path = "document.pdf" # Replace with your file path upload_response = client.files.upload(file_path, purpose="alignment") file_id = upload_response.id print(f"Uploaded file with ID: {file_id}") # Step 3: Begin vector database ingestion print("Creating ingestion job...") ingestion_job = client.vector_database.create_ingestion_job( database_id=database_id, files=[file_id], method="accuracy-optimized", token_count=512, overlap_tokens=50 ) job_id = ingestion_job.id print(f"Created ingestion job with ID: {job_id}") # Step 4: Monitor ingestion status # For per-file tracking and error diagnostics, see Monitor ingestion. print("Waiting for ingestion job to complete...") interval = 5 # Check every 5 seconds while True: job_status = client.vector_database.retrieve_ingestion_job(database_id, job_id) status = job_status.status print(f"Ingestion job status: {status}") if status == "completed": print(f"Vector database ready with ID: {database_id}") break elif status == "failed": error = getattr(job_status, "error_message", "Unknown error") print(f"Ingestion job failed: {error}") break time.sleep(interval) print("Setup complete!") ``` # Prepare and ingest files Source: https://docs.seekr.com/flow/sdk/data-engine/file-ingestion Upload multiple files simultaneously in their original formats and the AI-Ready Data Engine will automatically extract relevant data and structure them into a dataset that can be used for fine-tuning. Begin the data preparation process by gathering source documents for upload to the Data Engine. Aim to collect documents that are relevant to the domain, and that are structured in a clear and logical way, with headings and subheadings for readability. ## Step 1: Prepare your file for upload ### Supported file types * Markdown (`.md`) * Text (`.txt`) * PDF (`.pdf`) * Word Documents (`.docx`, `.doc`) * PowerPoint (`.ppt`, `.pptx`) ### Length requirements * Your file should have at least 4 cohesive sections, each detailed enough to form a meaningful “chunk.” * Although exact token counts are not mandatory, each chunk should contain enough substantive text to form meaningful document chunks. ### File formatting guidelines Before uploading, make sure your files are properly formatted by following these steps: **PDF and DOCX**: 1. Use clear headings and avoid images without context. 2. Ensure text content is structured logically for conversion. > [card] [Example PDF](https://drive.google.com/file/d/1wwwh2YeZyD24he-GbS4PvMDv5ZnFe2qQ/view?usp=sharing) **Markdown**: 1. Use correct header hierarchy (`#H1, ##H2, ###H3,` etc.). 2. Aim for six heading levels or fewer (`######`). 3. There's a clear, logical flow of information throughout. 4. Avoid missing or empty headers and skipped levels. 5. Ensure all sections have meaningful content under them. > [!NOTE] > > Google Docs users can export files as Markdown, PDF, or DOCX. > [!NOTE] > > The Data Engine automatically corrects many formatting issues when it processes your files. Markdown files with headers deeper than six levels are accepted instead of rejected, and missing or malformed elements are repaired where possible. If a file can't be repaired, the job stops and reports the specific issue to fix before resubmitting. Once your files are in order, proceed to the next step. ## Step 2: Upload files Use SeekrFlow’s Files API to upload source documents. Documents can be in the following formats: * PDF * DOCX * DOC * Markdown * Text (.txt) * PowerPoint (.ppt, .pptx) The following examples show how to upload a single file or multiple files of varying types: ### Upload a single file Upload a single file, up to 4GB. **Endpoint:** [`PUT /v1/flow/files`](/flow/reference/file_upload_v1_flow_files_put) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow(api_key="your-api-key") #Note: If your API key is stored as an environment variable, you can leave the parentheses empty, as shown below. # Upload a file upload_resp = client.files.upload("example.pdf", purpose="alignment") print(upload_resp.id) ``` #### Sample response ```curl cURL theme={null} Uploading file example.pdf: 100%|█| 21.6M/21.6M [00:21<00:00, 1.02MB file-25e34f96-2130-11f0-9236-3e11346bffff ``` ### Upload multiple files Upload multiple files up to 4GB each. The endpoint accepts an array of files as input, including large batches of 5,000 files or more in a single submission. Submission time stays constant regardless of batch size. > [!NOTE] > > File size limits differ between the API/SDK and [UI](https://apps.seekr.com/flow), which supports file uploads up to 10 files/100mb each. The following example uploads two files, one PDF and one DOCX, simultaneously: **Endpoint:** [`PUT /v1/flow/bulk_files`](/flow/reference/bulk_file_upload_v1_flow_bulk_files_put) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() bulk_resp = client.files.bulk_upload( ["example1.pdf", "example2.pdf"], purpose="alignment" ) # Access and print the ID of each uploaded file for resp in bulk_resp: print(resp.id) ``` ### List and delete files Keep track of uploaded files and remove duplicates or erroneous uploads as needed. List all uploaded files: **Endpoint:** [`GET v1/flow/files`](/flow/reference/list_files_v1_flow_files_get) ```python Python theme={null} # List all files files_response = client.files.list() for file in files_response.data: print(f"ID: {file.id}, Filename: {file.filename}") ``` Delete a file from the system: **Endpoint:** [`DELETE v1/flow/files/{file_id}`](/flow/reference/delete_file_v1_flow_files__file_id__delete) ```python Python theme={null} # Delete a file client.files.delete(file_id) print(f"Successfully deleted file {file_id}") ``` ## Step 3: Start an ingestion job (for PDFs, DOCX, DOC, and PPT/PPTX only) **Endpoint:** [`POST /v1/flow/alignment/ingestion`](/flow/reference/ingest_files_v1_flow_alignment_ingestion_post) > [!NOTE] > > When using data jobs, ingestion is triggered automatically when you attach files via `POST /v1/flow/data-jobs/{id}/add-files` — you do not need to call this endpoint directly. See [Create instruction fine-tuning data](/flow/sdk/data-engine/standard-instruction-finetuning) for the complete data job workflow. If your original source was a PDF, DOCX, DOC, PPT, or PPTX, you must first convert it to Markdown. If you already have a Markdown file, skip this step. > [!WARNING] > > Do not ingest Markdown files. This will return an error. If your file has tables embedded, make sure there are no empty cells. Empty cells run the risk of shifting all of your content in your table over to fill in the empty cell. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow(api_key="your api key") ingestion = client.ingestion # Start ingestion on one or more uploaded file IDs response = ingestion.ingest( files=["file-25e34f96-2130-11f0-9236-3e11346bffff", "file-efd0b334-2130-11f0-9236-3e11346bffff"], method="accuracy-optimized" ) print("Ingestion Job ID:", response.id) ``` Once ingestion is complete, you’ll receive a Markdown file that you can use for fine-tuning. > [!NOTE] > > **Ingestion mode and the UI** > > When ingesting files through the SeekrFlow UI, speed-optimized mode is always used. The SDK lets you choose between speed-optimized and accuracy-optimized. ### Choose an ingestion method #### Accuracy-optimized (default) When you use `method="accuracy-optimized"` or omit the method parameter, the system prioritizes accuracy. Depending on what data is available in your PDF document (bookmarks, tables, text layers), the system combines multiple extraction techniques for best results. **Key features:** * Uses both OCR and direct text extraction, then blends them together * Employs LLM agents to correct and enhance document hierarchy * Applies advanced table detection algorithms for accurate table formatting > [!NOTE] > > Documents over 100 pages can take up to 30 minutes to process. #### Speed-optimized When you use `method="speed-optimized"`, the system balances quality with processing speed. It automatically selects faster methods based on document size while maintaining reasonable accuracy for smaller documents. **Key features:** * Small documents still use high-accuracy methods * Larger documents use speed optimized algorithms to meet time constraints > [!NOTE] > > Optimized to complete in approximately 3 minutes regardless of document size. Once ingestion is complete, you'll receive a Markdown file that you can use for fine-tuning. ## Step 4: Check ingestion status After starting ingestion, you can track job progress, view per-file statuses, and diagnose any failures. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) for details on checking job states, interpreting `file_records`, and resolving errors. Once `status` shows `completed`, your output file(s) will be available for the next step. ## Step 5: Review and edit ingested file Before moving on to the next step, download the Markdown files created during ingestion to make sure all the information was transferred successfully. This is your opportunity to make any necessary edits in a Markdown editor, then re-upload your file for best results. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() retrieve_resp = client.files.retrieve_content("file-dc6f19d1-b55a-43a0-a38a-56f0e7bd8d8d") file_id = retrieve_resp.id print(f"Retrieve file with ID: {file_id}") ``` #### Markdown editing guidelines Check to make sure standard Markdown formatting conventions are being followed: * Clear hierarchy with appropriate heading levels (`#H1, ##H2, ###H3,` etc.) * Logical flow of information from beginning to end * Consistent formatting throughout the document * Clear separation between sections using headings and whitespace * Meaningful content below each header In addition, do a sweep for incorrect text or characters that may have been picked up during ingestion. For example: ```text Markdown theme={null} # California State Univ University, Monter , Monterey Bay [Digital Commons @ CSUMB](https://digitalcommons.csumb.edu/) ## Movie Music: Film Soundtracks or Film Soundtracks Thr acks Throughout Hist oughout History ``` This file has picked up some erroneous text during ingestion. It's best to remove these to ensure the highest-quality QA pairs for fine-tuning (though a few minor additions like `/`or extra line breaks likely won't affect quality). Once you're satisfied, save your file with a `.md` extension and upload it: ```python Python theme={null} upload_resp = client.files.upload("edited_example.md", purpose="alignment") file_id = upload_resp.id print(f"Uploaded file with ID: {file_id}") ``` ```curl cURL theme={null} Uploading file edited_example.md: 100%|███████████████████████████████████| 41.8k/41.8k [00:01<00:00, 35.3kB/s] Uploaded file with ID: file-9b9bf862-26cd-11f0-958d-52c2a8425a49 ``` Keep the new file ID for the next step. ## Step 6: In-context learning with Markdown (optional) Once you’ve reviewed and edited your ingested Markdown (Step 5), you can use it directly in your prompts without fine-tuning. This works well for simpler, single documents that fit within a context window — for example, an airline’s customer service plan. ### Example The following Markdown file was generated by the AI-Ready Data Engine from a PDF source. Its clearly structured sections make it a good candidate for in-context learning. ```text Markdown expandable theme={null} # American Airlines Customer Service Plan ## Our Commitment American Airlines and American Eagle are in business to provide safe, dependable and friendly air transportation. ## Accommodations for Unaccompanied Minors Children 5–14 years old may travel under our unaccompanied minor (UMNR) service on nonstop or same-plane flights. - Children 8–14 may travel on connecting flights via select airports (CLT, DFW, LAX, etc.). - Children 15–17 may optionally use UMNR service. - UMNR service is not available for codeshare or partner flights. ## Customers with Disabilities American maintains Special Assistance Coordinators (SACs) to arrange accommodations such as: - Pre-reserved seating - Boarding assistance - Wheelchair support - In-cabin storage of assistive devices ## Flight Delays and Cancellations For delays or cancellations: - Rebooking on the next available flight is provided at no cost. - Hotel and meal vouchers are issued if delays are caused by American and result in overnight stays. - In cases of diversions, we provide transportation and accommodations as needed. ## AAdvantage® Program Members earn miles for flights, credit card use, hotel stays, car rentals, and more. Miles can be redeemed for travel, upgrades, or donated. ``` Pass the file contents as context in your prompt: ```text Markdown theme={null} You are a helpful customer support agent. Use only the following context to answer the question. --- Context (american_airlines_customer_service.md) --- Question: "What assistance does American Airlines provide if a flight is diverted to another city?" ``` The model uses the Markdown structure to locate the relevant section and return an answer without any model retraining. ### When to use in-context learning * Best for simple, single documents that fit within a context window (typically 4k–16k tokens) * Reduces initial setup — no model training required * Becomes impractical for large document sets or policies with complex conditional logic * When you need to scale beyond a single document or require consistent precision, consider RAG or fine-tuning instead # Generate a metadata snapshot Source: https://docs.seekr.com/flow/sdk/data-engine/generate-metadata-snapshot Summarize the most common metadata keys and values across a vector database's chunks. A metadata snapshot is a compact summary of the user-defined metadata in a vector database. It captures the most common keys, the most frequent values for each key, and each key's inferred type, giving you a quick view of the metadata present across the database's chunks. A snapshot captures up to the 100 most common keys, with up to the 10 most common values per key, sampled from as many as 10,000 chunks. ## Prerequisites A populated vector database whose chunks carry user-defined metadata. To attach metadata during ingestion or edit it afterward, see [Manage chunk metadata](/flow/sdk/data-engine/manage-chunk-metadata). ## Generate a snapshot Use `generate_metadata_snapshot` to build or rebuild the snapshot for a vector database. The call samples the index, ranks the keys and values by frequency, and stores the result. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() result = client.vector_database.generate_metadata_snapshot( database_id="", ) print(f"Captured {result.keys_captured} keys at {result.created_at}") ``` Generating a snapshot replaces the previous one for that vector database rather than adding to it. **Returns:** | Field | Description | | - | - | | `vector_database_id` | ID of the vector database the snapshot describes. | | `keys_captured` | Number of metadata keys captured in this snapshot. | | `created_at` | When the snapshot was generated. | ## Read a snapshot Use `get_metadata_snapshot` to retrieve the current snapshot, including each key's type and its top values. ```python Python theme={null} snapshot = client.vector_database.get_metadata_snapshot( database_id="", ) for key in snapshot.keys: print(key.key_name, key.value_type, key.top_values) ``` **Returns:** | Field | Description | | - | - | | `vector_database_id` | ID of the vector database. | | `created_at` | When the current snapshot was generated. | | `keys` | List of captured metadata keys. Each entry has `key_name`, a `value_type` of `string`, `number`, or `boolean`, and a `top_values` list. | ## Keep the snapshot current SeekrFlow regenerates the snapshot automatically after an ingestion job adds documents to the vector database, so newly introduced keys and values reach the agent without any manual action. Generate a snapshot manually whenever you want to refresh it on demand, such as after editing metadata in place with `update_metadata`. ## Limitations * A snapshot includes only the 100 most common keys, with the 10 most common values each. Metadata that appears rarely across the sampled chunks might not be represented. * Values are ranked by how often they occur in the sample, so their order reflects frequency, not business priority. # Manage chunk metadata Source: https://docs.seekr.com/flow/sdk/data-engine/manage-chunk-metadata Edit user-defined metadata on chunks and list or filter chunks by metadata. User-defined metadata lets you attach structured business fields (such as `year`, `doc_type`, `department`, or `is_confidential`) to the chunks in a vector database, then retrieve and update those fields after ingestion. You can attach metadata when you ingest files (see [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database)), then use the methods here to browse chunks, filter them by metadata, and edit metadata in place. ## Metadata rules The same rules apply wherever metadata is accepted (ingestion request, manual chunking blocks, and the edit method below): * Metadata is a flat JSON object. Nested objects and arrays are not allowed. * A metadata object has 20 or fewer keys. * Keys are strings of 255 characters or fewer and cannot start with `_` (reserved for system fields). * Values are strings, numbers, booleans, or datetimes. Numbers must be finite, and datetimes are stored as ISO 8601 strings. * Keys and string values cannot be empty or whitespace-only. String values are trimmed, and embedded newlines become spaces. * `null` is not a valid value. To leave a field unset, omit the key. A request that breaks these rules returns a `422` validation error naming the offending key. > [!NOTE] > > Validation is strict on the ingestion request and on `update_metadata`, where one invalid field rejects the whole call. Inside manual chunking blocks it is lenient, where an invalid field is dropped with a warning and ingestion continues. ## List and filter chunks Use `list_chunks` to return a paginated list of chunks from a vector database. Filter by file, by specific chunk IDs, or by metadata fields. When you provide more than one filter, results must match all of them. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() result = client.vector_database.list_chunks( database_id="", metadata={"year": {"$gte": 2023}, "doc_type": "meeting_notes"}, limit=20, offset=0, ) print(f"{result.total} matching chunks") for chunk in result.data: print(chunk.chunk_id, chunk.metadata) ``` **Parameters:** | Parameter | Description | | - | - | | `database_id` | ID of the vector database. | | `file_id` | Optional. Return only chunks from this file. | | `chunk_ids` | Optional. Return only these chunk IDs. | | `metadata` | Optional. Filter by metadata key-value pairs. | | `limit` | Maximum results to return. Default 20, maximum 100. | | `offset` | Pagination offset. Default 0. | **Metadata filter operators:** Match a value exactly by giving it directly (`{"doc_type": "SOP"}`), or use an operator object for comparisons: | Operator | Meaning | | - | - | | `$in` | Value is one of a list, for example `{"severity": {"$in": ["P0", "P1"]}}`. | | `$gt` | Greater than. | | `$gte` | Greater than or equal to. | | `$lt` | Less than. | | `$lte` | Less than or equal to. | String filters are case-sensitive and match the whole value. `{"region": "EMEA"}` matches `EMEA` but not `emea`, and `{"doc_type": "Annual Report"}` matches only the full two-word value. To discover the exact values and casing in a vector database, use the [metadata snapshot](/flow/sdk/data-engine/generate-metadata-snapshot). Comparison operators apply to numbers. An empty or whitespace-only `file_id`, `chunk_ids` entry, or metadata filter value returns a `422` error rather than matching everything. Each chunk in the response includes its `chunk_id`, `file_id`, `text`, `metadata`, `hierarchy`, and `locations`. ## Edit chunk metadata Use `update_metadata` to overwrite the metadata on chunks in a vector database. Target the chunks with either `chunk_ids` or `file_ids`, but not both. Editing is scoped to the vector database, so updating a file's chunks here does not affect chunks of the same file in another vector database. ```python Python theme={null} # Update specific chunks client.vector_database.update_metadata( database_id="", chunk_ids=["chunk-1", "chunk-2"], metadata={"source": "manual_review", "category": "support_doc"}, ) # Update every chunk belonging to one or more files client.vector_database.update_metadata( database_id="", file_ids=["file-abc123"], metadata={"department": "finance", "year": 2024}, ) ``` > [!CAUTION] > > This operation is destructive. The metadata object you provide replaces all existing metadata on each targeted chunk, so include any fields you want to keep. To find the chunks and current metadata to edit, list them first with `list_chunks`. If the `file_ids` or `chunk_ids` you provide are well-formed but match no chunks in the vector database, the call returns a `404` error instead of reporting success on an update that changed nothing. ## Clear metadata An empty `metadata` object clears all metadata from the targeted chunks: ```python Python theme={null} client.vector_database.update_metadata( database_id="", file_ids=["file-abc123"], metadata={}, ) ``` > [!CAUTION] > > Clearing metadata is irreversible, and it uses the same method as a normal edit. A metadata object that is empty by accident, such as one built by a loop that added no fields, wipes the metadata on every targeted chunk. Send `{}` only when you intend to clear. ## Delete metadata Metadata is removed automatically when its chunks are deleted. Deleting a file from a vector database removes that file's chunks and their metadata. See [Create and populate a vector database](/flow/sdk/data-engine/create-and-populate-a-vector-database) for file deletion. # Manage data jobs Source: https://docs.seekr.com/flow/sdk/data-engine/manage-data-jobs List, filter, clone, update metadata, and cancel data jobs. Use the data jobs API to list and filter jobs, clone a job, update names and instructions, and cancel in-progress alignment runs. ## List data jobs **Endpoint:** [`GET /v1/flow/data-jobs`](/flow/reference/get_data_jobs_v1_flow_data_jobs_get) Returns a paginated list of all data jobs for the authenticated user. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() jobs = client.data_jobs.list() for job in jobs.data: print(job.id, job.name, job.status, job.created_at) ``` ### Filter and sort | Parameter | Type | Options | Default | | - | - | - | - | | `job_type` | string | `principle_files`, `context_grounded_files`, `context_grounded_vector_db` | — | | `sort_by` | string | `name`, `created_at`, `job_type` | `created_at` | | `sort_order` | string | `asc`, `desc` | `desc` | | `limit` | int | 1–100 | 25 | | `offset` | int | ≥ 0 | 0 | > [!WARNING] > > The `context_grounded_files` and `context_grounded_vector_db` job types stop working on November 9, 2026. You can keep using them until then. For new projects, choose another [fine-tuning method](/flow/components/fine-tuning#fine-tuning-methods). ```python Python theme={null} # List only principle_files jobs, most recent first jobs = client.data_jobs.list( job_type="principle_files", sort_by="created_at", sort_order="desc", limit=10, ) for job in jobs.data: print(job.id, job.name, job.status) ``` ## Get job detail **Endpoint:** [`GET /v1/flow/data-jobs/{id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get) Returns the full job detail including ingestion jobs, file records, timeline events, and alignment status. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) for a field-by-field reference. ```python Python theme={null} detail = client.data_jobs.retrieve("dj-1234567890") print("Status:", detail.status) print("Files:", len(detail.files)) print("Ingestion jobs:", len(detail.ingestion_jobs)) ``` ## Clone a data job **Endpoint:** [`POST /v1/flow/data-jobs/{id}/clone`](/flow/reference/clone_data_job_v1_flow_data_jobs__data_job_id__clone_post) Create a new, editable data job pre-populated from an existing one. The clone copies the source job's configuration and starts as a fresh job that you can adjust before starting alignment. Give the clone a new `name`, or omit `name` to reuse the source job's name. ```python Python theme={null} clone = client.data_jobs.clone( "dj-1234567890", name="Customer support refresh v3", ) print("Cloned job ID:", clone.id) ``` Cloning returns the full job detail, the same shape as [Get job detail](#get-job-detail). ## Update job attributes **Endpoint:** [`PATCH /v1/flow/data-jobs/{id}`](/flow/reference/patch_data_job_v1_flow_data_jobs__data_job_id__patch) Update the job name, instructions, system prompt, or vector database ID without recreating the job. ```python Python theme={null} data_job = client.data_jobs.update( "dj-1234567890", name="Customer support refresh v2", instructions="Cover airline escalation policies in the generated dataset.", system_prompt="You are an airline support expert. Always cite the policy section.", ) print("Updated name:", data_job.name) ``` **Editable fields:** | Field | Notes | | - | - | | `name` | Keep under 255 characters. | | `instructions` | Natural-language instructions that guide alignment toward the intended task. | | `system_prompt` | Required for `principle_files` jobs before starting. Immediately overwrites the stored value. | | `vector_database_id` | Required for `context_grounded_vector_db` jobs before starting. | > [!WARNING] > > Once alignment starts, job inputs are locked. Attempting to update a running job returns `409 Conflict`. ## Cancel a job **Endpoint:** [`POST /v1/flow/data-jobs/{id}/cancel`](/flow/reference/cancel_data_job_v1_flow_data_jobs__data_job_id__cancel_post) Cancels the alignment run associated with the data job. Only applies when alignment is in `pending`, `queued`, or `running` state. ```python Python theme={null} client.data_jobs.cancel("dj-1234567890") print("Job cancelled.") ``` Attempting to cancel a job whose alignment is not in a cancellable state returns `304 Not Modified`. # Manage vector databases Source: https://docs.seekr.com/flow/sdk/data-engine/manage-vector-databases List, retrieve, and delete vector databases and their files with the SeekrFlow SDK. Use these operations to inspect and clean up your vector databases and their files. Each example assumes an initialized `client` and, where applicable, a `database_id` or `file_id`. ## List all vector databases ```python Python theme={null} databases = client.vector_database.list() for db in databases.data: print(f"ID: {db.id}, Name: {db.name}") ``` ## Get a specific vector database ```python Python theme={null} # Get vector database details db_details = client.vector_database.retrieve(database_id) print(f"Name: {db_details.name}") print(f"Last updated: {db_details.updated_at}") ``` ## Delete a vector database ```python Python theme={null} # Delete a vector database client.vector_database.delete(database_id) print(f"Successfully deleted database {database_id}") ``` ## List all files in a vector database ```python Python theme={null} # List files in vector database db_files = client.vector_database.list_files(database_id) for file in db_files.data: print(f"ID: {file.id}, Filename: {file.filename}") ``` ## Delete a file from a vector database ```python Python theme={null} # Delete a file from vector database client.vector_database.delete_file(database_id, file_id) print(f"Successfully deleted file {file_id} from {database_id}") ``` # Monitor ingestion Source: https://docs.seekr.com/flow/sdk/data-engine/monitor-ingestion Track ingestion progress, interpret per-file statuses, and resolve errors through the data job detail endpoint. Ingestion status is surfaced through the data job that triggered it. `GET /v1/flow/data-jobs/{id}` returns a canonical view of your job — including nested ingestion jobs, per-file records, timeline events, and the derived `status` that tells you whether you're ready to start alignment. ## Understand data job status A data job runs in two phases: 1. **Ingestion** – files are converted and, for a vector database job, chunked and embedded. This begins when you attach files. 2. **Alignment** – training pairs are generated from the ingested content. This begins when you call `/start`, and only after ingestion has completed. The phase a job is in determines which operations apply. Cancelling targets the alignment job, so a job still in ingestion has nothing to cancel. Timeline events name the phase they belong to, which is why alignment events appear on a data job. While ingestion is in progress, the data job moves through these states: | Status | Description | | - | - | | `file_processing` | At least one ingestion job is queued or running. | | `needs_review` | Manual action required — failed ingestion records, missing files, or missing system prompt. | | `ready_to_start` | All ingestion completed successfully and prerequisites for alignment are met. | Once you call `/start`, the status mirrors the alignment job (`running`, `completed`, `failed`, etc.). ## Pre-generation validation Before a data job begins generating data, SeekrFlow validates the job and stops it early when it can't produce useful results. Stopping early avoids spending tokens on a job that wouldn't succeed. A job is stopped when: * The instructions are empty or contain only whitespace. * The instructions can't be interpreted as a data-generation task. * The uploaded documents don't match the instructions. * No content in the uploaded documents is relevant enough to the instructions. When a job stops for one of these reasons, its `status_message` names the specific cause and the adjustment to make. Review the message, revise the instructions or documents, and resubmit the job. SeekrFlow also sends an email when a job is stopped this way. The email includes the job ID, the source file, the reason the job stopped, and the steps to resubmit. ## Check job status List all data jobs: **Endpoint:** [`GET /v1/flow/data-jobs`](/flow/reference/get_data_jobs_v1_flow_data_jobs_get) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() jobs = client.data_jobs.list() for job in jobs.data: print(job.id, job.status, job.created_at) ``` Retrieve a specific data job: **Endpoint:** [`GET /v1/flow/data-jobs/{id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get) ```python Python theme={null} detail = client.data_jobs.retrieve("dj-1234567890") print("Job ID:", detail.id) print("Status:", detail.status) ``` **Sample response:** ```json JSON theme={null} { "id": "dj-1b75f4d5-5c9e-4d33-b164-a2393bc5ab6d", "name": "Customer support refresh", "instructions": "Train a support assistant to answer Q4 product questions.", "job_type": "principle_files", "status": "ready_to_start", "created_at": "2025-11-14T07:35:21.700005Z", "updated_at": "2025-11-14T07:37:52.464993Z", "ingestion_jobs": [...], "files": [...], "timeline": [...] } ``` ## Inspect ingestion jobs and file records The `ingestion_jobs` array contains one entry per ingestion run. Each entry includes a `records` array with independent status and timestamps for every file processed. ```python Python theme={null} detail = client.data_jobs.retrieve("dj-1234567890") for ingestion_job in detail.ingestion_jobs: print(f"Ingestion job: {ingestion_job.id} — {ingestion_job.status}") for record in ingestion_job.records: print(f" {record.filename}: {record.status}") if record.processing_at: print(f" Started: {record.processing_at}") if record.completed_at: print(f" Finished: {record.completed_at}") if record.status == "failed": print(f" Error: {record.error_message}") print(f" Fix: {record.suggested_fix}") ``` ### File record fields | Field | Description | | - | - | | `record_id` | Unique identifier for the file record | | `filename` | Source filename | | `status` | Per-file processing state | | `method` | Ingestion method used (`speed-optimized` or `accuracy-optimized`) | | `queue_position` | Position in queue when `status` is `queued` | | `progress` | Confirmed progress for this file, from 0 to 1 | | `progress_at` | When `progress` was last confirmed | | `projected_progress` | Estimated progress ahead of the last confirmation, from 0 to 1 | | `projected_progress_at` | When `projected_progress` was calculated | | `error_message` | Plain-language description of what went wrong | | `suggested_fix` | Recommended action to resolve the error | | `created_at` | When the file record was created | | `processing_at` | When the file entered the `running` state | | `completed_at` | When the file entered the `completed` state | | `failed_at` | When the file entered the `failed` state | | `progress` | Fraction of the file processed, from 0–1 | | `progress_at` | When `progress` was last measured | | `projected_progress` | Estimated current progress, from 0–1, for advancing a progress indicator between measurements | | `projected_progress_at` | When `projected_progress` was calculated | > [!NOTE] > > `progress` is not a completion signal. A finished record does not necessarily reach 1, and all four progress fields are `null` for records processed before progress reporting shipped. Use `status` to determine whether a file is complete. ### Track per-file progress Every file reports its own progress through both document conversion and vector database ingestion, so a job with one slow file is distinguishable from a job that has stalled. Two values work together: * `progress` is confirmed. It only moves when a step actually completes, so it never goes backwards, and it reaches 1 only when the file is genuinely finished. * `projected_progress` estimates where the file has reached between confirmations. It advances during long steps, such as table extraction on a large PDF, when `progress` would otherwise appear frozen. Confirmed progress catches up to the earlier projection as steps complete. Reading a single file across a run: ```json JSON theme={null} { "progress": 0.0, "projected_progress": 0.060 } { "progress": 0.060, "projected_progress": 0.268 } ``` Use `progress` when you need a value you can trust, and `projected_progress` to drive a progress indicator that keeps moving. ### File list The `files` array in the data job detail provides a unified view of ingestion outputs and manually uploaded Markdown files: * Entries with a `record_id` came from ingestion and include per-file processing metadata. * Markdown uploads have `record_id: null` because they skip ingestion and are immediately alignment-ready. ## Read the timeline The `timeline` array contains ordered milestone events for the job lifecycle. ```json JSON expandable theme={null} [ { "timestamp": "2025-11-14T07:35:21.700005Z", "event_type": "Created", "message": "Data job created.", "metadata": {} }, { "timestamp": "2025-11-14T07:35:22.483459Z", "event_type": "File Processing Started", "message": "Started processing files.", "metadata": { "ingestion_job_id": "ij-a19a1923-1d18-4fc7-8365-96d12ea734ce", "status": "running", "record_count": 5 } }, { "timestamp": "2025-11-14T07:37:52.435803Z", "event_type": "File Processing Completed", "message": "Finished processing files.", "metadata": { "ingestion_job_id": "ij-a19a1923-1d18-4fc7-8365-96d12ea734ce", "status": "completed", "record_count": 5 } } ] ``` Events are pre-sorted by timestamp. The timeline reports every milestone a job reached, so a job that ended early still shows the steps it completed. ### Event types | Event type | Meaning | | - | - | | Created | The data job was created. | | File Processing Started | Ingestion began processing files. | | File Processing In Progress | Ingestion is processing files. | | File Processing Completed | Ingestion finished processing files. | | Alignment Job Created | An alignment job was created for this job. | | Alignment Job Started | Alignment began. | | Alignment Job Completed | Alignment finished successfully. | | Alignment Job Failed | Alignment failed. | | Alignment Job Stopped | Alignment stopped before completing. | | Alignment Job Cancelled | Alignment was cancelled. | Terminal events carry the reason in `metadata.status_message`. Read it to find out why a job failed, stopped, or was cancelled, rather than inferring from status alone. ## Resolve ingestion failures When a file fails, its record includes `error_message` and `suggested_fix`. The data job remains in `needs_review` until every failed record is resolved — either fixed and retried, or removed. ```python Python theme={null} detail = client.data_jobs.retrieve("dj-1234567890") for ingestion_job in detail.ingestion_jobs: for record in ingestion_job.records: if record.status == "failed": print(f"File: {record.filename}") print(f"Error: {record.error_message}") print(f"Fix: {record.suggested_fix}") ``` To retry, re-upload the corrected file and attach it to the job again via `POST /v1/flow/data-jobs/{id}/add-files`. To skip the file, remove it via `POST /v1/flow/data-jobs/{id}/remove-files`. At least one viable file must remain before alignment can start. ## Troubleshoot common errors | Error | Suggested fix | | - | - | | The file appears to be empty. | Upload a file with content. | | The PDF may be corrupted, password-protected, or in an unsupported format. | Upload a valid, unprotected PDF. | | The PDF contains pages that exceed the maximum supported size. | Re-export the PDF with smaller page dimensions. | | The file was not found or is not owned by the current user. | Re-upload the file or verify the correct `file_id`. | | Service temporarily unavailable. | Retry the job after a brief wait. | | Internal processing failure. | If the issue persists, contact support. | ### Document processing issues | Issue | Possible cause | Solution | | - | - | - | | Files fail to upload | File exceeds size limit | Split large files or compress them | | | Invalid file format | Ensure file extension matches actual format | | | Network timeout | Implement retry logic with exponential backoff | | Markdown parsing errors | Improper heading hierarchy | Fix heading structure (ensure proper nesting) | | | Unsupported Markdown syntax | Use standard Markdown formatting | | PDF extraction issues | Protected PDF | Remove password protection before uploading | ### File ingestion issues | Issue | Possible cause | Solution | | - | - | - | | Slow ingestion | Complex document structure | Adjust chunking parameters | | | Resource constraints | Monitor system resources during ingestion | | Failed ingestion job | Malformed content | Check files for compatibility issues | | | Service timeout | Increase timeout settings | # Create instruction fine-tuning data Source: https://docs.seekr.com/flow/sdk/data-engine/standard-instruction-finetuning Generate a QA pair dataset for instruction fine-tuning using a data job. This guide walks you through creating a `principle_files` data job, which generates a QA pair Parquet file you can use for instruction fine-tuning. The workflow bundles file upload, ingestion, prompt configuration, and alignment into a single managed job. **Before you start:** Upload your source files using the [Files API](/flow/sdk/data-engine/file-ingestion) and have your file IDs ready before Step 2. Not sure which approach fits your use case? See [Fine-tuning](/flow/components/fine-tuning). ## Step 1: Create a data job **Endpoint:** [`POST /v1/flow/data-jobs`](/flow/reference/submit_data_job_v1_flow_data_jobs_post) Create a job shell with `job_type` set to `principle_files`. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() data_job = client.data_jobs.create( name="Customer support refresh", instructions="Train a support assistant to answer Q4 product questions.", job_type="principle_files", ) data_job_id = data_job.id print("Data job ID:", data_job_id) ``` **Sample response:** ```json JSON theme={null} { "id": "dj-1b75f4d5-5c9e-4d33-b164-a2393bc5ab6d", "name": "Customer support refresh", "job_type": "principle_files", "status": "needs_setup" } ``` ## Step 2: Add files to the job **Endpoint:** [`POST /v1/flow/data-jobs/{id}/add-files`](/flow/reference/add_files_to_data_job_v1_flow_data_jobs__data_job_id__add_files_post) Attach uploaded file IDs to the job. Non-Markdown files (PDF, DOCX, PPT) trigger ingestion automatically. Markdown files are marked as alignment-ready immediately. ```python Python theme={null} data_job = client.data_jobs.add_files( data_job_id, file_ids=[ "file-25e34f96-2130-11f0-9236-3e11346bffff", "file-efd0b334-2130-11f0-9236-3e11346bffff", ], method="accuracy-optimized", ) print("Data job status:", data_job.status) ``` > [!NOTE] > > **Ingestion mode and the UI** > > When ingesting files through the SeekrFlow UI, speed-optimized mode is always used. The SDK lets you choose between speed-optimized and accuracy-optimized. ### Choose an ingestion method | Method | Approx. time (100+ pages) | Description | | - | - | - | | `accuracy-optimized` (default) | \~30 min | Combines OCR and direct extraction, runs LLM hierarchy cleanup, and uses advanced table detection. | | `speed-optimized` | \~3 min | Faster extraction heuristics for large documents; smaller documents still use the richer pipeline. | ## Step 3: Monitor ingestion Poll `GET /v1/flow/data-jobs/{id}` until the job status is no longer `file_processing`. ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) print("Status:", detail.status) for ingestion_job in detail.ingestion_jobs: for record in ingestion_job.records: print(f" {record.filename}: {record.status}") if record.status == "failed": print(f" Fix: {record.suggested_fix}") ``` | Status | Meaning | | - | - | | `file_processing` | Ingestion still running — wait | | `needs_review` | One or more files failed — resolve `suggested_fix` in `records` | | `ready_to_start` | Ingestion complete and prerequisites met | If a file fails, fix the source, re-upload it, and attach it to the job again. To skip the file instead, remove it via `POST /v1/flow/data-jobs/{id}/remove-files`. See [Monitor ingestion](/flow/sdk/data-engine/monitor-ingestion) for a full reference on job states and error codes. ## Step 4: Review and edit ingested Markdown Download the generated Markdown files from the `files` array in the job detail and review for accuracy. Re-upload any corrected versions and remove the originals before starting alignment. ```python Python theme={null} retrieve_resp = client.files.retrieve_content("file-dc6f19d1-b55a-43a0-a38a-56f0e7bd8d8d") print(f"Retrieved file: {retrieve_resp.id}") ``` Once you've reviewed and edited, re-upload and attach the corrected file: ```python Python theme={null} upload_resp = client.files.upload("edited_example.md", purpose="alignment") print(f"Uploaded file with ID: {upload_resp.id}") ``` See [Prepare and ingest files](/flow/sdk/data-engine/file-ingestion) for Markdown editing guidelines and in-context learning considerations. ## Step 5: Set a system prompt A `system_prompt` is required for `principle_files` jobs before alignment can start. You can generate one from high-level instructions or write your own. ### Generate a prompt **Endpoint:** [`POST /v1/flow/data-jobs/gen_system_prompt`](/flow/reference/generate_system_prompt_v1_flow_data_jobs_gen_system_prompt_post) > [!NOTE] > > `gen_system_prompt` returns a suggested prompt but does not save it to the job. You must call `PATCH /v1/flow/data-jobs/{id}` to set it. ```python Python theme={null} result = client.data_jobs.generate_system_prompt( instructions="I want to train a chatbot to answer questions about horror movie tropes.", ) print(result.system_prompt) ``` ### Set the prompt on the job **Endpoint:** [`PATCH /v1/flow/data-jobs/{id}`](/flow/reference/patch_data_job_v1_flow_data_jobs__data_job_id__patch) ```python Python theme={null} data_job = client.data_jobs.update( data_job_id, system_prompt=result.system_prompt, ) print("Prompt set:", data_job.system_prompt) ``` You can also write your own prompt directly via the PATCH endpoint without calling `gen_system_prompt` first. > [!WARNING] > > Once alignment starts, the system prompt is locked. Make any changes before calling `/start`. ## Step 6: Start alignment **Endpoint:** [`POST /v1/flow/data-jobs/{id}/start`](/flow/reference/start_data_job_alignment_v1_flow_data_jobs__data_job_id__start_post) The `/start` endpoint enforces pre-flight validation before launching. Requirements for `principle_files`: * `status` must be `ready_to_start` * `system_prompt` must be set * At least one processed Markdown file must be attached ```python Python theme={null} detail = client.data_jobs.start(data_job_id) print("Alignment job:", detail.alignment_job.id, detail.alignment_job.status) ``` If prerequisites are not met, the endpoint returns `422 Unprocessable Entity` with a descriptive message. ## Step 7: Monitor alignment Poll `GET /v1/flow/data-jobs/{id}` to track progress. ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) print("Status:", detail.status) if detail.alignment_job: print("Alignment job:", detail.alignment_job.id, detail.alignment_job.status) if detail.alignment_job.status_message: print("Status detail:", detail.alignment_job.status_message) print("Fine-tuning job IDs:", detail.fine_tuning_job_ids) ``` `status_message` gives a human-readable description of the alignment job's current state, including the reason if the job fails. ## Step 8: Retrieve output files **Endpoint:** [`GET /v1/flow/data-jobs/{id}`](/flow/reference/get_data_job_v1_flow_data_jobs__data_job_id__get) Once `status` shows `completed`, the `alignment_job.output_files` field in the job detail lists the files the alignment job generated. ```python Python theme={null} detail = client.data_jobs.retrieve(data_job_id) outputs = detail.alignment_job.output_files for f in outputs: print(f.id, f.filename, f.file_type, f.purpose) ``` ```json JSON expandable theme={null} [ { "id": "file-f883ecfb-1353-4693-928f-0467b268b07b", "filename": "freeway_facts_part_1-20250630191733-raft-qa-pairs-messages.jsonl", "file_type": "jsonl", "purpose": "alignment", "bytes": 0 }, { "id": "file-2d497c5c-55fa-4bbe-80a3-0b4eccda4d6f", "filename": "freeway_facts_part_1-20250630191733-raft-qa-pairs.parquet", "file_type": "parquet", "purpose": "fine-tune", "bytes": 324 } ] ``` `output_files` lists only the generated files. The input files are in the job detail's `files` array. The output file with `"purpose": "fine-tune"` (the `.parquet`) is the file ID to use when creating a fine-tuning job. # Deployments Source: https://docs.seekr.com/flow/sdk/deployments Create and manage model endpoints for real-time inference with the Python SDK. Deployments host a model on dedicated compute infrastructure and make it available for inference requests and agent usage. For conceptual background, see [Deployments](/flow/components/deployments). ## Create a deployment ### Base model ```python Python theme={null} from seekrai import SeekrFlow from seekrai.types.deployments import DeploymentType client = SeekrFlow() deployment = client.deployments.create( name="my-base-model-deployment", description="Base model deployment for inference.", model_type=DeploymentType.BASE_MODEL, model_id="meta-llama/Llama-3.3-70B-Instruct", n_instances=1 ) print(f"Deployment ID: {deployment.id}") print(f"Status: {deployment.status}") ``` ### Fine-tuned model ```python Python theme={null} deployment = client.deployments.create( name="my-fine-tuned-deployment", description="Fine-tuned model deployment for inference.", model_type=DeploymentType.FINE_TUNED_RUN, model_id="ft-1234567890", n_instances=1 ) print(f"Deployment ID: {deployment.id}") print(f"Status: {deployment.status}") ``` ## Parameters | Parameter | Required | Description | | - | - | - | | `name` | Yes | A name for the deployment. Must be 5–100 characters. | | `description` | Yes | A description of the deployment. Must be 5–1000 characters. | | `model_type` | Yes | `DeploymentType.BASE_MODEL` for a base model or `DeploymentType.FINE_TUNED_RUN` for a fine-tuned model. | | `model_id` | Yes | The model ID (base model name or fine-tuning job ID) to deploy. | | `n_instances` | Yes | Number of dedicated instances to provision. Must be between 1 and 50. | ## Deployment status | Status | Description | | - | - | | `Pending` | Deployment requested, infrastructure provisioning in progress. | | `Active` | Serving inference traffic. | | `Inactive` | Paused, not serving requests. | | `Failed` | Error during startup or runtime. | ## Promote a deployment Promote a deployment to make it active and ready to serve inference requests. ```python Python theme={null} deployment = client.deployments.promote(deployment.id) print(f"Status: {deployment.status}") ``` ## Demote a deployment Demote a deployment to pause it without deleting the endpoint. ```python Python theme={null} deployment = client.deployments.demote(deployment.id) print(f"Status: {deployment.status}") ``` ## List deployments ```python Python theme={null} deployments = client.deployments.list() for d in deployments.data: print(f"{d.name} ({d.status}): {d.id}") ``` ## Retrieve a deployment ```python Python theme={null} deployment = client.deployments.retrieve("") print(f"{deployment.name}: {deployment.status}") ``` # Explainability Source: https://docs.seekr.com/flow/sdk/explainability Trace model outputs back to the sources and training examples that influenced them. Explainability traces model responses back to their origins—whether retrieved context in an agentic workflow or training examples from fine-tuning. This allows you to see which inputs influenced specific outputs. The Explainability SDK provides two capabilities for understanding model outputs. For conceptual background on use cases and when to use each capability, see [Explainability](/flow/components/explainability). ## Explainability workflows > [card] [Context attribution](/flow/sdk/explainability/context-attribution) > > Identify which retrieved sources influenced each statement in an agent's response. Works with any agent using file search, web search, or other tools. > [card] [Training data attribution](/flow/sdk/explainability/training-data-attribution) > > Identify which fine-tuning examples influenced a fine-tuned model's response. > [card] [Source tracing](/flow/sdk/explainability/source-tracing) > > Trace retrieved chunks back to their exact location in the source document — file, page, and lines. # Attribute a response to its sources Source: https://docs.seekr.com/flow/sdk/explainability/context-attribution Context attribution identifies which sources influenced each statement in an agent's response and scores how strongly each one contributed. Run it from the SDK or REST API with the `explainability` methods. For how it works and the full list of source types, see [Context attribution](/flow/components/explainability/context-attribution). ## Attribute a response from an agent run Use this method to attribute a response from a completed SeekrFlow agent thread. The SDK extracts the context, query, and response from the thread automatically. **Endpoint:** [`POST /v1/explainability/context-attributor-from-run`](/flow/reference/get_context_attribution_from_run_v1_explainability_context_attributor_from_run_post) ```python Python theme={null} import os from seekrai import SeekrFlow client = SeekrFlow(api_key=os.environ["SEEKR_API_KEY"]) attribution = client.explainability.get_context_attribution_from_run( thread_id="", ) print(attribution) ``` To target a specific run rather than the latest, and to tune the analysis: ```python Python theme={null} attribution = client.explainability.get_context_attribution_from_run( thread_id="", run_id="", granularity="sentence", top_k=5, ) ``` ## Attribute raw context Use this method when you have the context, query, and response as text strings, for example when running attribution outside of SeekrFlow agents or in a custom pipeline. **Endpoint:** [`POST /v1/explainability/context-attributor`](/flow/reference/get_context_attribution_v1_explainability_context_attributor_post) ```python Python theme={null} attribution = client.explainability.get_context_attribution( context="France is a country in Western Europe with Paris as its capital. " "The Eiffel Tower is a wrought-iron lattice tower in Paris...", query="What is the capital of France and what is it known for?", response="Paris is the capital of France. It is known for the Eiffel Tower.", granularity="sentence", top_k=5, ) print(attribution) ``` ## Attribute a specific portion of a response Set `highlight` to focus attribution on one sentence or phrase instead of the whole response. When `highlight` is set, `segments` is empty and sources are returned in the top-level `sources` field: ```python Python theme={null} attribution = client.explainability.get_context_attribution_from_run( thread_id="", highlight="It is known for the Eiffel Tower.", ) for source in attribution.sources: print(source.attribution, source.text) ``` ## Reading the result Both methods return the same structure: the attributed `response_text`, a list of `segments` (one per sentence or chunk of the response), and the `sources` scored against each segment. Each source carries its `source_type`, the matched `text`, an `attribution` score, and its `offset` in the context. Tool-response sources add tool metadata (`tool_name`, `tool_call_id`, and a `tool` object whose fields vary by tool). For example, an `mcp_tool` object identifies an MCP tool call, including a sub-agent invoked as a tool, through its `tool_name`. For the source types you can encounter, see [Source types](/flow/components/explainability/context-attribution#source-types). A result looks like this, with each segment carrying the sources that influenced it. Here one statement is attributed to an MCP tool response and another to the agent's instructions: ```json JSON expandable theme={null} { "response_text": "Ticket OPS-482 is in progress. Always confirm status with the owner before closing.", "segments": [ { "segment_index": 0, "segment_text": "Ticket OPS-482 is in progress.", "char_offset": 0, "sources": [ { "source_type": "tool_response", "id": 0, "text": "{\"ticket_id\": \"OPS-482\", \"status\": \"In Progress\", \"owner\": \"Dana Ruiz\"}", "attribution": 0.89, "offset": 0, "tool_name": "get_ticket", "tool_call_id": "call_a1b2c3", "tool": { "type": "mcp_tool", "tool_name": "get_ticket", "tool_input": { "ticket_id": "OPS-482" } } } ] }, { "segment_index": 1, "segment_text": "Always confirm status with the owner before closing.", "char_offset": 31, "sources": [ { "source_type": "system_prompt", "id": 1, "text": "Always confirm ticket status with the owner before marking anything closed.", "attribution": 0.76, "offset": 142 } ] } ], "highlight": null } ``` ### Attribution scores Each source has an `attribution` value between -1 and 1. Positive values indicate the source supported the response, meaning removing it would have caused the output to change. Values near 0 indicate little influence. Negative values are uncommon and indicate the source may have had a conflicting effect on the output. ## Best practices * **Granularity:** Sentence-level gives the most interpretable results. When context is large and speed matters more than precision, use `"chunk"` with `get_context_attribution_from_run` or `"paragraph"` with `get_context_attribution`. * **top_k:** Values of 3–5 work well for most use cases. Increase toward 10 when debugging multi-hop answers where many sources contribute. * **num_ablations:** Leave unset in production. Override only when benchmarking or reproducing a specific result. * **Segments with no strong sources:** This indicates the model generated that content from prior knowledge rather than retrieved context. It is expected behavior, not an error. ## Common errors For the full list of status codes, see the API reference. The errors you are most likely to act on: * **404 Not found** – The thread or run ID does not exist. Check the IDs you provided. * **422 Unprocessable entity** – The thread has no assistant response, because generation is still in progress or the agent run failed. * **503 Service unavailable** – The request timed out. Retry, reduce context size, or use a coarser granularity. # Trace a response to source documents Source: https://docs.seekr.com/flow/sdk/explainability/source-tracing Trace model output back to the original source document using provenance metadata captured at ingestion. Source tracing lets you prove that any model or agent answer came directly from the exact files you uploaded. Every chunk retrieved from a vector database carries a traceable lineage that connects the model output to the retrieved chunk, its Markdown location, and the original uploaded file. This is designed to support auditability, compliance, and operational decision-making in environments where document-level proof of origin is required. ## How source tracing works When a file is ingested into a vector database, the pipeline captures provenance metadata for every chunk (line range, character offsets, heading hierarchy, and source page number) and stores it alongside the embedding. No additional configuration is required. ## Retrieve source tracing fields from a run After a run completes, list the thread's messages to access the assistant response. When the agent invoked the file search tool, each retrieved chunk carries its source tracing fields: `chunk_id` (use it to fetch full provenance), `page`, `lines`, and `section` (the heading hierarchy path from the document root). `page` is `null` for native Markdown and JSON. **Endpoint:** [`GET /v1/threads/{thread_id}/messages`](/flow/reference/list_messages_endpoint_v1_threads__thread_id__messages_get) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() messages = client.agents.threads.list_messages(thread_id="") # The assistant response carries the retrieved chunks and their source tracing fields assistant = next(m for m in messages if m.role == "assistant") print(assistant.content) # each file search chunk includes chunk_id, page, lines, and section ``` ## Retrieve chunk provenance Use `chunk_id` with the chunk endpoint to retrieve the full provenance record, which includes the `file_id` of the original uploaded file, the chunk `text` as indexed, and a list of `locations`. **Endpoint:** [`GET /v1/flow/vectordb/{database_id}/chunk/{chunk_id}`](/flow/reference/get_vector_database_chunk_v1_flow_vectordb__database_id__chunk__chunk_id__get) Retrieve a chunk with the `seekrai` SDK using `retrieve_chunk`. The returned object surfaces the same fields as the REST response, so you can read `file_id` and walk each location directly. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() chunk = client.vector_database.retrieve_chunk( database_id="", chunk_id="", # from the file search result ) print(chunk.file_id) # original uploaded file print(chunk.text) # chunk text as indexed for location in chunk.locations: print(location["page_number"], location["hierarchy"]) ``` Use the `file_id` to download the original uploaded file and complete the chain of custody: ```python Python theme={null} client.files.retrieve_content(chunk.file_id, output="source-document.pdf") ``` ## Reading the result Each entry in a chunk's `locations` pins the answer to a precise place in the ingested Markdown: the line range and character offsets, the heading `hierarchy` from the document root to the chunk, and the `page_number` in the source document (1-indexed, and `null` for native Markdown and JSON). Combined with `file_id`, these fields let you open the original document and point to the exact passage an answer was drawn from. For the complete record, see the [chunk endpoint reference](/flow/reference/get_vector_database_chunk_v1_flow_vectordb__database_id__chunk__chunk_id__get). ## Supported file types | File type | `page_number` | `hierarchy` | `lines` | `char_start` / `char_end` | | - | - | - | - | - | | PDF | ✓ | ✓ | ✓ | ✓ | | DOCX | ✓ | ✓ | ✓ | ✓ | | PPTX | ✓ | ✓ | ✓ | ✓ | | Markdown | — | ✓ | ✓ | ✓ | | JSON | — | ✓ | ✓ | ✓ | ## Complete workflow The full source tracing workflow follows this sequence: ```mermaid theme={null} flowchart TD A("Run the agent
POST /v1/threads/{thread_id}/runs") B("List messages
GET /v1/threads/{thread_id}/messages") C("Retrieve chunk provenance
GET /v1/flow/vectordb/{database_id}/chunk/{chunk_id}") D("Download source document
GET /v1/flow/files/{file_id}/content") A -->|"chunk_id, page, section"| B B -->|"file_id, Markdown location"| C C -->|"original file"| D ``` 1. Run the agent against a thread (**Endpoint:** [`POST /v1/threads/{thread_id}/runs`](/flow/reference/run_agent_v1_threads__thread_id__runs_post)), then wait for the run to complete. 2. List the thread's messages (**Endpoint:** [`GET /v1/threads/{thread_id}/messages`](/flow/reference/list_messages_endpoint_v1_threads__thread_id__messages_get)) to find the assistant response. Each retrieved chunk includes `chunk_id`, `page`, and `section`. 3. Call the chunk endpoint with `chunk_id` to get `file_id` and confirm the exact Markdown lines the answer was drawn from. 4. Use `file_id` with the file download endpoint (**Endpoint:** [`GET /v1/flow/files/{file_id}/content`](/flow/reference/file_download_content_v1_flow_files__file_id__content_get)) to retrieve the original uploaded file and complete the chain of custody. # Attribute a response to training data Source: https://docs.seekr.com/flow/sdk/explainability/training-data-attribution Training data attribution surfaces the training data that influenced fine-tuned model outputs. By tracing model responses back to specific question-answer pairs from the training dataset, it helps debug model behavior and audit responses. > [!NOTE] > > This method requires a fine-tuned model created with Seekr's [fine-tuning feature](/flow/sdk/fine-tuning). The method works with models trained after September 22, 2025. Attribution isn't available for preference or reinforcement fine-tunes, including continued fine-tunes that use either method. > [!NOTE] > > For a model created with [continued fine-tuning](/flow/sdk/fine-tuning/continue-a-fine-tuned-model), results include only examples from the training data of that model's own training run. Results never include examples from the fine-tunes it builds on. ## Retrieve influential fine-tuning data **Endpoint:** [`GET /v1/flow/explain/models/{model_id}/influential-finetuning-data`](/flow/reference/get_influential_training_data_route_v1_flow_explain_models__model_id__influential_finetuning_data_get) ```python Python theme={null} import os from seekrai import SeekrFlow client = SeekrFlow(api_key=os.environ["SEEKR_API_KEY"]) model_id = "deployment-" influential_data = client.explainability.get_influential_finetuning_data( model_id=model_id, question="What is SeekrFlow?" ) print(influential_data) ``` > [!NOTE] > > `model_id` takes the deployment ID of a deployed fine-tuned model. A fine-tuning job ID or a model name returns a 404. To find the deployment ID, list your deployments and use the `id` field. If you already have a model response from a prior `chat.completions` call, provide it as `answer` to skip an extra generation: ```python Python theme={null} chat_response = client.chat.completions.create( model=model_id, messages=[{"role": "user", "content": "What is SeekrFlow?"}] ) influential_data = client.explainability.get_influential_finetuning_data( model_id=model_id, question="What is SeekrFlow?", answer=chat_response.choices[0].message.content, ) ``` ## Reading the result The response contains `results`, a list of influential question-answer pairs, along with the `answer` used (echoed back if you provided one, otherwise generated internally) and the schema `version`. Each result carries its `id`, the source `file_id` (use it to trace back and edit the training documents), the `messages` content in `Q: \nA: ` form, and an `influence_level` of `high`, `medium`, or `low`. Irrelevant pairs are filtered out and not returned. For the complete response schema, see the endpoint reference above. ## Best practices * **Interpreting influence levels:** `high` means the Q/A pair strongly shaped the response; `medium` means moderate impact; `low` means minimal contribution. Look for recurring `high` pairs to understand the training patterns driving a response. * **Unexpected results:** If unrelated pairs are surfacing with high influence, review and refine your fine-tuning dataset. * **Empty results:** The model may simply not have found training pairs relevant to the prompt. This is not an error. A continued fine-tune also returns no results for a prompt that matches only the training data of an earlier round. ## Common errors * **TypeError** – Raised by the SDK when a required parameter such as `question` is missing or invalid. * **404 Not found** – No deployed model matches the provided `model_id`. Confirm you used the deployment ID and that the deployment is active. For all status codes, see the [endpoint reference](/flow/reference/get_influential_training_data_route_v1_flow_explain_models__model_id__influential_finetuning_data_get). # Fine-tuning Source: https://docs.seekr.com/flow/sdk/fine-tuning Train models on your data with the SeekrFlow Python SDK. For conceptual background on fine-tuning methods, training requirements, and when to use each approach, see [Fine-tuning](/flow/components/fine-tuning). ## Fine-tuning workflows > [card] [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job) > > Set up projects, configure training and infrastructure, and launch a fine-tuning job. > [card] [Reinforcement tuning](/flow/sdk/fine-tuning/grpo-fine-tuning) > > Train reasoning models with reward-based optimization using GRPO. > [card] [Preference tuning](/flow/sdk/fine-tuning/preference-tuning) > > Align model outputs with human preferences using DPO. > [card] [Vision language tuning](/flow/sdk/fine-tuning/vision-language-tuning) > > Fine-tune vision-language models on image-text datasets. > [card] [Low-rank adaptation](/flow/sdk/fine-tuning/lora) > > Apply low-rank adaptation to reduce training cost and memory usage. > [card] [Continue a fine-tuned model](/flow/sdk/fine-tuning/continue-a-fine-tuned-model) > > Start a new fine-tune from a completed fine-tuned model and view its lineage. > [card] [Deploy a fine-tuned model](/flow/sdk/fine-tuning/promote-a-fine-tuned-model) > > Promote models for inference, run chat completions, and manage deployments. # Continue a fine-tuned model Source: https://docs.seekr.com/flow/sdk/fine-tuning/continue-a-fine-tuned-model Start a new fine-tune from a completed fine-tuned model and view its lineage with the SeekrFlow Python SDK. For conceptual background on continued fine-tuning, including eligibility and how lineage works, see [Continued fine-tuning](/flow/components/fine-tuning/continued-fine-tuning). > [!NOTE] > > Continued fine-tuning requires `seekrai` 0.37.0 or later. Upgrade with `pip install --upgrade seekrai`. ## Start a continued fine-tune **Endpoint:** [`POST /v1/flow/fine-tune`](/flow/reference/fine_tune_v1_flow_fine_tune_post) To continue a fine-tune, set `parent_finetune_id` in your `TrainingConfig` to the ID of the completed fine-tune. The new run starts from the parent's latest saved checkpoint and uses the training file and settings you provide. The parent must be a completed fine-tune that belongs to your team and has saved checkpoints. It can be a full fine-tune or a LoRA fine-tune. The `model` parameter is optional. If you include it, it must match the parent's base model. ```python Python expandable theme={null} from seekrai import SeekrFlow from seekrai.types import TrainingConfig, InfrastructureConfig client = SeekrFlow() training_config = TrainingConfig( training_files=[""], parent_finetune_id="", n_epochs=1, n_checkpoints=1, batch_size=4, learning_rate=1e-5, experiment_name="helperbot_v2", ) infrastructure_config = InfrastructureConfig( n_accel=8, accel_type="MI300X", ) fine_tune = client.fine_tuning.create( training_config=training_config, infrastructure_config=infrastructure_config, project_id=123, ) print(fine_tune.id) print(fine_tune.model) print(fine_tune.parent_finetune_id) ``` The response includes the parent's base model in `model` and the parent's ID in `parent_finetune_id`. You can continue with any supported training method. Set `fine_tune_type` and the method's parameters in `TrainingConfig` as you would for a new fine-tune. For example, set `fine_tune_type` to `PREFERENCE` to refine a standard fine-tune with preference training. See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job) for project setup, file upload, and monitoring. ## Continue with LoRA To continue a LoRA fine-tune, or to continue a full fine-tune with LoRA, set `lora_config` in your `TrainingConfig`. A LoRA parent requires a `lora_config`. ```python Python expandable theme={null} from seekrai import SeekrFlow from seekrai.types import TrainingConfig, InfrastructureConfig from seekrai.types.finetune import LoRAConfig client = SeekrFlow() training_config = TrainingConfig( training_files=[""], parent_finetune_id="", n_epochs=1, n_checkpoints=1, batch_size=4, learning_rate=1e-5, experiment_name="helperbot_lora_v2", lora_config=LoRAConfig( r=16, alpha=32, ), ) infrastructure_config = InfrastructureConfig( n_accel=8, accel_type="MI300X", ) fine_tune = client.fine_tuning.create( training_config=training_config, infrastructure_config=infrastructure_config, project_id=123, ) print(fine_tune.lora_adapter_merged) print(fine_tune.lora_total_rank) ``` SeekrFlow chooses how to combine the new run with the parent, and the response reports the outcome when you create the job. * `lora_adapter_merged` is `True` when SeekrFlow merges the adapter into full model weights. The fine-tune then deploys as its own model. The value is `False` for every other run. * `lora_total_rank` is the total rank of the combined adapter the run ships. For example, continuing a rank 16 adapter with a rank 16 LoRA run produces a `lora_total_rank` of 32. The value is `None` when the run ships full model weights or a single adapter that wasn't combined, in which case the run's rank is its `lora_config.r`. A full fine-tune continued with LoRA always ships full model weights, so `lora_adapter_merged` is `True`. For the full table of parent and run combinations, see [Continue with LoRA](/flow/components/fine-tuning/continued-fine-tuning#continue-with-lora). Follow these rules when you continue with LoRA: * Set `r` to 128 or lower. Each run's rank has a maximum of 128. * Keep the combined rank at 256 or lower to get one adapter. The combined rank is the parent adapter's rank plus the new run's `r`. A higher combined rank produces full model weights. * Omit `target_modules` from `extras` to train the parent's target modules. When the result is a combined adapter, the new run must train the parent's target modules. * Use plain LoRA. The parent and the new run can't use `use_dora`, `modules_to_save`, `rank_pattern`, `alpha_pattern`, `layers_to_transform`, a `bias` other than `"none"`, or an `init_lora_weights` value other than the default or `"gaussian"`. ## View a fine-tune's lineage **Endpoint:** [`GET /v1/flow/fine-tunes/{fine_tune_id}/lineage`](/flow/reference/get_fine_tune_lineage_v1_flow_fine_tunes__fine_tune_id__lineage_get) Use `lineage` to retrieve the chain of fine-tunes a model descends from. The chain is ordered oldest first and ends with the fine-tune you request. ```python Python theme={null} lineage = client.fine_tuning.lineage("") print(f"Depth: {lineage.depth}") for node in lineage.data: print(f"Generation {node.generation}: {node.id} (parent: {node.parent_finetune_id})") ``` **Sample output:** ```text theme={null} Depth: 1 Generation 0: ft-1111aaaa-0000-0000-0000-000000000000 (parent: None) Generation 1: ft-2222bbbb-0000-0000-0000-000000000000 (parent: ft-1111aaaa-0000-0000-0000-000000000000) ``` Generation 0 is the run trained from the base model. Each node also reports `model`, `fine_tune_type`, `status`, `created_at`, and `completed_at`. For LoRA runs, each node reports `lora`, which is `True` when the run trained LoRA, along with `lora_adapter_merged` and `lora_total_rank`. If the lineage includes deleted fine-tunes, they stay in the chain and report `deleted_at`. To retrieve the lineage of a fine-tune that you deleted, set `include_deleted=True`. If `truncated` is `True`, the chain stops before the run trained from the base model, and `truncated_reason` states why. Check `truncated` before you treat a `depth` of `0` as a fine-tune with no parent. Every fine-tune you retrieve with `client.fine_tuning.retrieve` or `client.fine_tuning.list` includes `parent_finetune_id`. The value is `None` for a run trained from a base model. ## Errors | Status | Cause | | - | - | | 404 | The parent doesn't exist, was deleted, or belongs to another team. All three cases return the same response. | | 422 | The parent hasn't completed, uses a different base model, or has no saved checkpoints. The message states the reason. | | 422 | A LoRA request is invalid. The message states the reason. The cases follow this table. | | 502 | A temporary storage error occurred while reading checkpoints. Retry shortly. | A LoRA request returns 422 when any of these apply: * You continue a LoRA fine-tune without a `lora_config`. * The parent or the new run uses a LoRA option outside plain LoRA. * The request sets `target_modules` that differ from the parent's when the result is a combined adapter. * The LoRA parent has no recorded LoRA configuration. * The run's `r` is over 128. If you set neither `model` nor `parent_finetune_id`, `TrainingConfig` raises a `ValueError` before the request is sent. ## Data attribution [Training data attribution](/flow/components/explainability/training-data-attribution) for a continued model returns only examples from the training data of that model's own training run. It never returns examples from the fine-tunes it builds on. Training data attribution isn't available for continued fine-tunes that use preference or reinforcement tuning. # Create a fine-tuning job Source: https://docs.seekr.com/flow/sdk/fine-tuning/create-fine-tuning-job Launch and manage model fine-tuning jobs in SeekrFlow with step-by-step guidance for configuring training parameters, setting up infrastructure, and monitoring progress through event tracking and loss visualization. ## Start a fine-tuning job Here’s a comprehensive example of how to create a fine-tuning job for a Llama 3 8B Instruct model with specific training parameters. ### Before you start: prepare your training data How you prepare your training data depends on what you’re starting with: * **If you have raw documents** (PDFs, DOCX, Markdown): use the Data Engine to ingest and convert them into a training-ready dataset first. See \[doc:data-engine-sdk]. * **If you already have a prepared JSONL or Parquet file**: upload it directly in Step 3 below. To create a fine-tuning job, you’ll first create a project, to which you can associate a fine-tuning run. You can also retrieve project information and get a list of all of your projects: ### Step 1: Create a project ```python Python theme={null} import os from seekrai import SeekrFlow client = SeekrFlow() # Create a new project proj = client.projects.create(name="my_project", description="a bot that answers questions about film tropes") ``` ### Step 2: Retrieve project ID You can locate your specific project with its ID, which you'll need for creating your fine-tuning job, by listing all projects. Project ID is an integer and precedes the project name you set; e.g., `id=588, name='horrorbotv4'`. This is also where to find the rest of the information for your project, including creation and update timestamps, number of runs and number of deployments. **Endpoints:** `GET v1/flow/projects` [List projects](/flow/reference/get_projects_v1_flow_projects_get) `GET v1/flow/projects/{project_id}` [Get project](/flow/reference/get_project_by_id_v1_flow_projects__project_id__get) ```python Python theme={null} # List all projects client.projects.list() # Get project info client.projects.retrieve(proj.id) ``` Before you start a fine-tuning run, you'll need to upload your training file and retrieve its file ID. ### Step 3: Upload a training file **Endpoint:** [`PUT /v1/flow/files`](/flow/reference/file_upload_v1_flow_files_put) **Accepted formats:** JSONL and Parquet The required JSONL schema varies by `purpose`. See [Upload file](/flow/reference/file_upload_v1_flow_files_put) for the correct schema for each purpose value. **cURL example:** ```curl cURL theme={null} curl -X PUT https://flow.seekr.com/v1/flow/files \ -H "Authorization: " \ -F "files=@/path/to/training_data.jsonl" \ -F "purpose=fine-tune" ``` **SDK example:** ```python Python theme={null} response = client.files.upload("/path/to/training_data.jsonl", purpose="fine-tune") print(f"Uploaded file ID: {response.id}") ``` ### Step 4: Retrieve training file ID **Endpoint:** [`GET v1/flow/files`](/flow/reference/list_files_v1_flow_files_get) ```python Python theme={null} # List all files files_response = client.files.list() for file in files_response.data: print(f"ID: {file.id}, Filename: {file.filename}") ``` **Sample response:** ```curl cURL theme={null} ID: file-1234567890, Filename: example_converted_2025-04-24_17-25-58-20250424211627-qa-pairs.parquet ``` ### Step 5: Training configuration **Endpoint:** [`POST v1/flow/fine-tunes`](/flow/reference/fine_tune_v1_flow_fine_tune_post) Next, specify a `TrainingConfig` object and an `InfrastructureConfig` object. The `TrainingConfig` defines all parameters that affect the actual code of the training script, such as the base model to be fine-tuned, number of epochs, quantization, etc. The `InfrastructureConfig` defines the infrastructure for the fine-tuning job. AMD Instinct MI300X is available on SeekrFlow, with other compute options available for on-prem installations and AI appliances. This example uses 8 MI300X instances, which triggers SeekrFlow to run on multi-card training mode: ```python Python expandable theme={null} from seekrai.types import TrainingConfig, InfrastructureConfig from seekrai import SeekrFlow import os base_url = "https://flow.seekr.com/v1/" client = SeekrFlow(base_url=base_url) proj = client.projects.create(name="helperbot", description="a bot answers questions about film tropes") training_config = TrainingConfig( training_files=['file-317b8ad2-21dd-11f0-9126-3a035e72fce7'], #find the file id of your parquet file by listing all files model="meta-llama/Meta-Llama-3-8B-Instruct", n_epochs=1, n_checkpoints=1, batch_size=4, learning_rate=1e-5, experiment_name="helperbot_v1", ) infrastructure_config = InfrastructureConfig( n_accel=8, accel_type="MI300X", ) ``` > [!NOTE] > > `batch_size`, `learning_rate`, `max_length`, and `gradient_checkpointing` are optional. Omit any of them and SeekrFlow computes a default from the selected algorithm, model size, and dataset size. Set a value to override its default, as shown above. `n_epochs` is required. ### Step 6: Fine-tune a base model Now that you've created your configuration files, you're ready to fine-tune a model! **Endpoint:** [`POST v1/flow/fine-tune`](/flow/reference/fine_tune_v1_flow_fine_tune_post) ```python Python theme={null} fine_tune = client.fine_tuning.create( training_config=training_config, infrastructure_config=infrastructure_config, project_id = 123, ) ft_id = fine_tune.id #print status print(client.fine_tuning.retrieve(fine_tune.id).status) ``` **Sample response:** ```curl cURL theme={null} Uploading file-1234567890-qa-pairs.parquet: 100%|█| 85.8k/85.8k [00:00<00:00, 86.2kB/s] FinetuneJobStatus.STATUS_QUEUED ``` ### Resolve a refused job SeekrFlow validates a job when you submit it, before it consumes accelerator time. Two checks run: * **Memory fit** – the configuration is estimated against the requested hardware. Jobs that cannot fit are refused. For vision-language jobs, the estimate measures the images in your dataset. * **Dataset** – schemas and file types are checked, and malformed training files are rejected. A refused job returns a 400. The response includes a `gpu_memory_rejection` object describing what was evaluated and what would fit: ```json Refusal response theme={null} { "detail": "Full fine-tuning of models this large on a single GPU is not supported\n\nmeta-llama/Llama-3.1-70B-Instruct | MI300X x1 | bs=1 seq=2500 gc=on\n\n Suggestions:\n 1. Set n_accel to 8\n 2. Use LoRA (add lora_config)", "gpu_memory_rejection": { "message": "Full fine-tuning of models this large on a single GPU is not supported", "summary": "meta-llama/Llama-3.1-70B-Instruct | MI300X x1 | bs=1 seq=2500 gc=on\n\n Suggestions:\n 1. Set n_accel to 8\n 2. Use LoRA (add lora_config)", "model": "meta-llama/Llama-3.1-70B-Instruct", "accel_type": "MI300X", "n_accel": 1, "batch_size": 1, "max_length": 2500, "grad_ckpt": true } } ``` In the Python SDK, a refusal raises `InvalidRequestError` carrying this message. Act on the suggestions in `summary`, then resubmit. ## Tune model hyperparameters Hyperparameters are the configurable parts of a model's learning process, and tuning them allows you to tweak model performance for optimal results. Hyperparameters play a crucial role in the training process, impacting both performance and training efficiency. Here’s a guide to essential hyperparameters, organized by impact level and the logical order for tuning large text models. ### Learning rate This is the most critical hyperparameter, because it determines whether your model will converge properly. Tune this one first, since it forms the foundation of your optimization process. **Consider impact on convergence:** The learning rate controls how much the model’s weights are updated with respect to the loss gradient. A high learning rate can lead to rapid convergence but risks overshooting the optimal solution, while a low learning rate ensures stable convergence but may require more training epochs. **Start with a small value:** A common practice is to start with a small learning rate (e.g., 0.001) and adjust based on the training performance. ### Batch size Next in the tuning sequence, batch size directly interacts with learning rate: the effective learning rate is often considered learning rate × batch size, e.g., if you increase batch size from 32 to 64, you might try increasing learning rate by approximately 2× to maintain similar training dynamics. **Note:** This relationship isn't perfectly linear in practice; at very large batch sizes, more increases in learning rate can lead to instability. **Memory constraints:** Larger batch sizes require more memory, but can lead to faster and more stable training due to more accurate gradient estimates. **Training speed:** Smaller batch sizes can lead to noisier updates, but may converge faster due to more frequent weight updates. **Experimentation:** Start with a moderate batch size (e.g., 32 or 64) and adjust based on memory availability and training speed. ### Epochs Number of epochs should be determined after you've established stable learning rate and batch size settings, because these parameters together will determine how quickly your model converges. **Overfitting:** More epochs allow the model to learn more from the data, but also increase the risk of overfitting (where the model learns the task *too* well, leading to poor generalization on unseen data). **Training time:** The number of epochs impacts the total training time. Ensure that the chosen number of epochs balances training time with model performance. ### Max length Max length defines context window capacity and affects the model's ability to understand and generate coherent text. It's a high-impact architectural decision that affects the model's fundamental capabilities, but is often constrained by hardware limitations. **Sequence length:** The maximum length of input sequences the model will handle. Longer sequences can capture more context but require more memory and computation. **Balance length:** Choose a length that balances capturing sufficient context with computational efficiency. **Task requirements:** Set these based on the typical length of the input data for your task. ## Monitor your fine-tuning run All job runs are tracked using SeekrFlow's event monitoring and tracking system. To retrieve the status and progress of a run, use this: **Endpoint:** [`GET v1/flow/fine-tunes/{fine_tune_id}`](/flow/reference/get_fine_tune_v1_flow_fine_tunes__fine_tune_id__get) ```python Python theme={null} print(client.fine_tuning.retrieve(fine_tune.id).status) ``` ### Read why a job failed When a job fails, SeekrFlow analyzes the failure logs and returns a plain-language explanation in `error_analysis` on the job record. The field is `null` while a job is running and on jobs that completed successfully. ```python Python theme={null} job = client.fine_tuning.retrieve(fine_tune.id) if job.error_analysis: print(job.error_analysis) ``` ### Plot training loss > [!NOTE] > > A training loss chart is automatically generated for you via our [UI](https://apps.seekr.com/flow): Just navigate to Projects and choose your project from the directory. ```python Python expandable theme={null} import matplotlib.pyplot as plt ft_id = fine_tune.id events = client.fine_tuning.retrieve(ft_id).events ft_response_events_sorted = sorted(events, key=lambda x: x.epoch) epochs = [event.epoch for event in ft_response_events_sorted] losses = [event.loss for event in ft_response_events_sorted] plt.figure(figsize=(8, 4)) plt.plot(epochs, losses, marker="o", linestyle="-", color="b") plt.xlabel("Epoch") plt.ylabel("Loss") plt.title("Training Loss Over Epochs") plt.grid(True) max_labels = 10 step = max(1, len(epochs) // max_labels) plt.xticks(epochs[::step], rotation=45) plt.tight_layout() plt.show() ``` ### Interpret a training loss chart ![](https://mintcdn.com/seekr/xCjyiASvtfX59CGv/images/docs/2d86a8564b10af2b42ffc9ea02fc8c20935189a3f244a61b7933feee2371bd86-Screenshot_2025-03-31_at_12.59.39_PM.png?fit=max\&auto=format\&n=xCjyiASvtfX59CGv\&q=85\&s=c04b992f0f23e7de78041447348d0a47) A training loss chart gives a visual snapshot of how well your model is learning during fine-tuning by tracking its loss over time. The training loss measures how closely predictions match actual values. A lower value and downward curve forming an elbow shape signal progress; watch out for a flat line or rising lines to indicate learning issues. **Loss:** The Y-axis represents training loss, which quantifies the difference between the model's predictions and the actual target values. A lower loss indicates better performance. **Epochs:** The upper X-axis shows epochs, where each epoch corresponds to one complete pass through the entire training dataset. **Steps:** The lower X-axis represents the training steps, calculated as: Total Steps = (Total Number of Samples ÷ number of instances \* Batch Size) × Number of Epochs **Decreasing loss curve:** Indicates that the model is learning and improving its predictions. **Plateauing loss curve:** The model may have reached its learning capacity with the current configuration. * Try adjusting hyperparameters (e.g., learning rate, batch size) and retrain to see if the model improves. **Increasing loss curve:** May indicate overfitting or issues with the training process. * Review data quality to ensure the training data is clean and representative of the problem space, and retrain with a higher-quality dataset. # Reinforcement tuning Source: https://docs.seekr.com/flow/sdk/fine-tuning/grpo-fine-tuning SeekrFlow supports reinforcement tuning using group relative policy optimization (GRPO). Reinforcement tuning trains a model to generate higher-quality outputs by scoring candidates against reference answers using one or more graders. To train a model with reinforcement tuning, follow the same process as standard fine-tuning with a few modifications. First, ensure your dataset has a `reference_answer` field containing the correct answer for each problem. Include a system prompt instructing the model to use the reasoning format: ```python Python theme={null} { "messages":[ { "role": "system", "content": "A conversation between User and Assistant. The user asks a question, and the Assistant solves it. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within and tags, respectively, i.e., reasoning process here answer here " }, { "role": "user", "content": "Find the smallest positive $a$ such that $a$ is a multiple of $4$ and $a$ is a multiple of $14.$" } ], "reference_answer": "28" } ``` [Download sample dataset](/samples/numina-math-dataset-small.json) Upload this dataset with the purpose `reinforcement-fine-tune`. See [Upload file](/flow/reference/file_upload_v1_flow_files_put) for the full schema reference. Set `fine_tune_type` and define a reward function using `reward_components` in your `TrainingConfig`: ```python Python expandable theme={null} from seekrai import SeekrFlow from seekrai.types import TrainingConfig, InfrastructureConfig from seekrai.types.finetune import ( FineTuneType, Grader, GraderType, RewardComponents, StringOperation, TextSimilarityOperation ) client = SeekrFlow() training_config = TrainingConfig( training_files=[''], model="meta-llama/Llama-3.2-1B", n_epochs=1, n_checkpoints=1, batch_size=4, learning_rate=1e-6, # lower learning rate is typical for reinforcement tuning experiment_name="helperbot_grpo_v1", fine_tune_type=FineTuneType.REINFORCEMENT, reward_components=RewardComponents( graders=[Grader(type=GraderType.MATH_ACCURACY)] ) ) ``` Create the fine-tuning job using the standard workflow. See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job) for the full process. > [!TIP] > > LoRA can be used with reinforcement tuning to reduce memory requirements. See [LoRA](/flow/sdk/fine-tuning/lora) for configuration details. ## Reward functions A reward function defines how model outputs are scored during training. In SeekrFlow, reward functions are built from one or more **graders** — individual scoring operations that each evaluate a specific quality of the output. ### Grader types | Type | Enum value | Description | Operations | | - | - | - | - | | Numerical accuracy | `GraderType.MATH_ACCURACY` | Returns `1` if the model output is numerically equal to the reference answer, else `0`. | None | | String check | `GraderType.STRING_CHECK` | Returns `1` if the model output matches the reference based on the selected operation. | `equals`, `not_equals`, `contains`, `case_insensitive_contains` | | Text similarity | `GraderType.TEXT_SIMILARITY` | Returns a similarity score between the model output and the reference answer. | `bleu`, `rouge` | | LLM (LLM-as-a-judge) | `GraderType.LLM` | Uses an LLM to score how closely the model output matches the reference answer in meaning and quality. | None | ### Create graders ```python Python theme={null} # Numerical accuracy — no operation needed math_grader = Grader(type=GraderType.MATH_ACCURACY) # String check — requires an operation keyword_grader = Grader( type=GraderType.STRING_CHECK, operation=StringOperation.CONTAINS ) # Text similarity — requires an operation similarity_grader = Grader( type=GraderType.TEXT_SIMILARITY, operation=TextSimilarityOperation.BLEU ) # LLM-as-a-judge — no operation; optional generation parameters judge_grader = Grader(type=GraderType.LLM) ``` ### LLM grader The LLM grader (LLM-as-a-judge) scores each candidate response with an LLM instead of a deterministic metric. The judge compares the model output to the `reference_answer` and rates how well it matches in meaning and quality. Use it for open-ended or subjective outputs, such as semantic correctness, helpfulness, or tone, where string check and text similarity are too rigid. The LLM grader takes no operation. It accepts optional generation parameters that control how the judge produces its scores: | Parameter | Type | Default | Description | | - | - | - | - | | `temperature` | float, 0.0–1.5 | `0.0` | Sampling temperature for the judge. Keep it near `0` for consistent, reproducible scores. | | `top_p` | float, 0.0–1.0 | None | Nucleus sampling cutoff for the judge. | | `seed` | integer ≥ 0 | None | Fixes the judge's sampling so scores are reproducible across runs. | | `max_completion_tokens` | integer ≥ 1 | `512` | Maximum number of tokens the judge can generate while scoring each response. | The judge runs on infrastructure managed by SeekrFlow, so you don't configure an inference endpoint or model for it. ```python Python theme={null} # LLM grader with custom generation parameters judge_grader = Grader( type=GraderType.LLM, temperature=0.0, max_completion_tokens=256, seed=42 ) ``` The LLM grader takes a `weight` and combines with other graders the same way, as shown next. ### Combine graders with weights Assign weight percentages to combine multiple graders into a single reward function. Weights must sum to `1.0`. If no weights are provided, graders are weighted equally. ```python Python theme={null} reward = RewardComponents( graders=[ Grader(type=GraderType.MATH_ACCURACY, weight=0.4), Grader(type=GraderType.STRING_CHECK, weight=0.3, operation=StringOperation.EQUALS), Grader(type=GraderType.LLM, weight=0.3, temperature=0.0) ] ) ``` ### Format reward weight By default, 10% of the reward score is based on whether the model uses the correct output format (`` and `` tags). You can adjust this with `format_reward_weight`: ```python Python theme={null} reward = RewardComponents( format_reward_weight=0.2, graders=[ Grader(type=GraderType.MATH_ACCURACY, weight=0.3), Grader(type=GraderType.TEXT_SIMILARITY, weight=0.5, operation=TextSimilarityOperation.BLEU) ] ) ``` > [!NOTE] > > When `format_reward_weight` is set explicitly, the sum of all weights (format + graders) must equal `1.0`. # Low-rank adaptation Source: https://docs.seekr.com/flow/sdk/fine-tuning/lora Apply low-rank adaptation to fine-tuning jobs with the SeekrFlow Python SDK. For conceptual background on LoRA, including when to use it and how it compares to full fine-tuning, see [Low-rank adaptation (LoRA)](/flow/components/fine-tuning/lora). ## Add LoRA to a fine-tuning job To use LoRA, set `lora_config` in your `TrainingConfig` using `LoRAConfig`. LoRA works with all fine-tuning methods: instruction, reinforcement, preference, and vision language tuning. ```python Python expandable theme={null} from seekrai import SeekrFlow from seekrai.types import TrainingConfig, InfrastructureConfig from seekrai.types.finetune import LoRAConfig client = SeekrFlow() training_config = TrainingConfig( training_files=[""], model="meta-llama/Meta-Llama-3-8B-Instruct", n_epochs=1, n_checkpoints=1, batch_size=4, learning_rate=1e-5, experiment_name="helperbot_lora_v1", lora_config=LoRAConfig( r=16, alpha=32, ), ) infrastructure_config = InfrastructureConfig( n_accel=8, accel_type="MI300X", ) fine_tune = client.fine_tuning.create( training_config=training_config, infrastructure_config=infrastructure_config, project_id=123, ) print(fine_tune.id) ``` ## LoRAConfig parameters | Parameter | Type | Default | Description | | - | - | - | - | | `r` | integer | `8` | Adapter rank. Controls adapter capacity and the complexity of patterns the adapter can learn. | | `alpha` | float | `32` | Scaling factor for adapter influence. Controls how strongly learned patterns affect base model behavior. | | `dropout` | float | `0.1` | Dropout probability applied to adapter layers during training. | | `bias` | string | `"none"` | Whether to train bias parameters. Accepted values: `"none"`, `"all"`, `"lora_only"`. | | `extras` | object | — | Optional dictionary for additional LoRA parameters. | For guidance on choosing rank and alpha values, see [Low-rank adaptation (LoRA)](/flow/components/fine-tuning/lora). See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job) for the full workflow including project setup, file retrieval, and monitoring. ## Continue a LoRA fine-tune To train a completed LoRA fine-tune further on new data, set `parent_finetune_id` and `lora_config` in your `TrainingConfig`. See [Continue a fine-tuned model](/flow/sdk/fine-tuning/continue-a-fine-tuned-model#continue-with-lora). # Preference tuning Source: https://docs.seekr.com/flow/sdk/fine-tuning/preference-tuning Fine-tune models on preference data using direct preference optimization (DPO) with the SeekrFlow Python SDK. For conceptual background on preference tuning, including when to use it and how it compares to other methods, see [Preference tuning (DPO)](/flow/components/fine-tuning/preference-tuning). ## Upload a preference dataset Preference datasets must follow a specific schema with a prompt, a chosen response, and a rejected response. SeekrFlow's data engine does not currently generate preference datasets — you must prepare them externally. ### Dataset schema Each record requires three fields: `messages` (the prompt context), `chosen` (the preferred response), and `rejected` (the dispreferred response). See [Upload file](/flow/reference/file_upload_v1_flow_files_put) for the full schema reference. ```json JSON expandable theme={null} { "messages": [ { "role": "system", "content": "You are an assistant helping a financial analyst understand investment risk." }, { "role": "user", "content": "Explain whether investing in a single startup is high or low risk." } ], "chosen": [ { "role": "assistant", "content": "Investing in a single startup is generally considered high risk..." } ], "rejected": [ { "role": "assistant", "content": "It depends on the startup..." } ] } ``` Upload with the `preference-fine-tune` file purpose. Datasets must be in JSONL or Parquet format. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() # Single file upload upload_resp = client.files.upload( "dpo-dataset.parquet", purpose="preference-fine-tune", ) # Bulk file upload bulk_resp = client.files.bulk_upload( ["dpo-dataset1.parquet", "dpo-dataset2.parquet"], purpose="preference-fine-tune", ) ``` SeekrFlow validates the schema on upload. Uploads fail if the file format is not JSONL or Parquet, or if the schema does not match the expected preference dataset structure. ## Create a preference tuning job Set `fine_tune_type` to `FineTuneType.PREFERENCE` in the training configuration. Preference tuning supports an optional `beta` parameter that controls the KL-divergence penalty — how far the tuned model can deviate from the base model. Values range from `0.0` to `1.0`, with `0.0` as the default. ```python Python expandable theme={null} from seekrai.types.finetune import FineTuneType from seekrai.types import TrainingConfig, InfrastructureConfig from seekrai import SeekrFlow client = SeekrFlow() training_config = TrainingConfig( training_files=[""], model="meta-llama/Llama-3.2-1B", n_epochs=1, n_checkpoints=1, batch_size=8, learning_rate=1e-5, experiment_name="dpo-fine-tune-job", fine_tune_type=FineTuneType.PREFERENCE, beta=0.5, ) infrastructure_config = InfrastructureConfig( accel_type="MI300X", n_accel=8, ) fine_tune = client.fine_tuning.create( training_config=training_config, infrastructure_config=infrastructure_config, project_id=123, ) print(fine_tune.id) ``` Preference tuning works with all base models in SeekrFlow. The remaining steps for monitoring, deployment, and inference are the same as other fine-tuning methods. See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job) for the full workflow. # Deploy a fine-tuned model for inference Source: https://docs.seekr.com/flow/sdk/fine-tuning/promote-a-fine-tuned-model Deploy a completed fine-tuning job to a dedicated endpoint, run inference against it, and demote or reactivate the deployment. After a fine-tuning job completes, deploy the resulting model to serve inference requests. A deployment hosts the model on dedicated compute and gives you a deployment ID to use as the `model` in chat completions. For more deployment operations, see [Deployments](/flow/sdk/deployments). ## Deploy your fine-tuned model ### Find your fine-tuning job ID **Endpoint:** [`GET v1/flow/fine-tunes`](/flow/reference/list_fine_tune_v1_flow_fine_tunes_get) List your fine-tuning jobs to find the ID of the completed job you want to deploy. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() print(client.fine_tuning.list()) ``` Each job in the response includes its ID, training files, training parameters, project ID, and status. Deploy a job only after its status is `completed`. ```text Output theme={null} FinetuneResponse(id='ft-1234567890', training_files=['file-0987654321'], model='meta-llama/Meta-Llama-3-8B-Instruct', accel_type=, n_accel=8, n_epochs=1, batch_size=1, learning_rate=1e-05, created_at=datetime.datetime(2025, 4, 25, 14, 29, 41, 817017, tzinfo=TzInfo(UTC)), experiment_name='12345-examplev1', status=, events=None, inference_available=False, project_id=679, completed_at=datetime.datetime(2025, 4, 25, 14, 52, 34, 785756, tzinfo=TzInfo(UTC)), description=None), ``` ### Check a specific job **Endpoint:** [`GET v1/flow/fine-tunes/{fine_tune_id}`](/flow/reference/get_fine_tune_v1_flow_fine_tunes__fine_tune_id__get) Retrieve a single job to confirm its status before you deploy it. ```python Python theme={null} print(client.fine_tuning.retrieve("ft-1234567890")) ``` ### Create a deployment **Endpoint:** [`POST v1/flow/deployments`](/flow/reference/deploy_v1_flow_deployments_post) Create a deployment that points at your fine-tuning job ID. ```python Python theme={null} from seekrai.types.deployments import DeploymentType deployment = client.deployments.create( name="customer-support-deployment", # 5–100 characters description="Fine-tuned model for chat support", # 5–1000 characters model_type=DeploymentType.FINE_TUNED_RUN, model_id="ft-1234567890", # Your fine-tuning job ID n_instances=1, # Dedicated instances, 1–50 ) print("Deployment ID:", deployment.id) ``` A new deployment starts in `Pending` status and becomes `Active` when it's ready to serve requests. You don't need to promote it. ### Wait for the deployment to become active **Endpoint:** [`GET v1/flow/deployments/{deployment_id}`](/flow/reference/deployment_by_id_v1_flow_deployments__deployment_id__get) Check the deployment status until it reaches `Active`. ```python Python theme={null} import time from seekrai.types.deployments import DeploymentStatus while True: status = client.deployments.retrieve(deployment.id).status if status == DeploymentStatus.ACTIVE: break if status == DeploymentStatus.FAILED: raise RuntimeError(f"Deployment {deployment.id} failed") time.sleep(15) print("Status:", status.value) ``` **Sample response:** ```text Output theme={null} Status: Active ``` Use the deployment ID as the `model` when you run inference. ## Run inference ### Stream chat completions Send chat completion requests to test your model's task or domain performance and get a sense of the end-user experience. **Endpoint:** [`POST v1/inference/chat/completions`](/flow/reference/route_chat_completion_v1_inference_chat_completions_post) ```python Python theme={null} stream = client.chat.completions.create( model=deployment.id, messages=[ {"role": "system", "content": "You are SeekrBot, a helpful AI assistant trained to answer questions about financial products and services."}, {"role": "user", "content": "Who are you?"}, ], stream=True, max_tokens=1024, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True) ``` **Sample response:** ```text Output theme={null} I am SeekrBot, a knowledgeable guide to the realm of financial products and services. ``` > [!NOTE] > > For `model`, you can use any supported base model or the ID of an active deployment. ### Configure request parameters Adjust parameters such as `temperature`, `max_tokens`, `top_p`, and `stop` to control the model's output. For every supported parameter and its allowed values, see [Create chat completion](/flow/reference/route_chat_completion_v1_inference_chat_completions_post). ### Return token log probabilities during inference You can also return the token log probabilities, or "logprobs". Logprobs reveal the model’s certainty for each generated token. Low-confidence predictions highlight gaps in training data. During staging, you can flag outputs with low confidence (for example, strongly negative logprobs) for manual review or retraining. Unusually high logprobs for irrelevant tokens can signal hallucinations. During staging, this can help refine prompts or adjust temperature settings. Logprob requests follow the OpenAI convention: * To return the logprobs of the generated tokens, set `logprobs=True`. * To also return the top *n* most likely tokens and their associated logprobs, set `top_logprobs=n`, where *n* > 0. ```python Python theme={null} stream = client.chat.completions.create( model=deployment.id, messages=[{"role": "user", "content": "Tell me about New York."}], stream=True, logprobs=True, top_logprobs=5, # The maximum depends on the deployment; higher values can return a validation error ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="", flush=True) print(chunk.choices[0].logprobs) ``` ## Manage your deployment ### Demote a deployment **Endpoint:** [`PUT v1/flow/deployments/{deployment_id}/demote`](/flow/reference/demote_v1_flow_deployments__deployment_id__demote_put) When you're done with the model, demote the deployment to stop serving requests. The deployment and its ID remain, and you can reactivate it later. ```python Python theme={null} deployment = client.deployments.demote("deployment-1234567890") print("Status:", deployment.status.value) ``` The deployment passes through `Pending` before it reaches `Inactive`. ### Reactivate a demoted deployment **Endpoint:** [`PUT v1/flow/deployments/{deployment_id}/promote`](/flow/reference/promote_v1_flow_deployments__deployment_id__promote_put) To serve requests from a demoted deployment again, promote it. You can only promote a deployment in `Inactive` status. Promoting an `Active` deployment returns a 400 error. ```python Python theme={null} deployment = client.deployments.promote("deployment-1234567890") print("Status:", deployment.status.value) ``` ## Run validation checks Before you use a deployed model in production, validate its performance to ensure a smooth transition. Make sure your model is ready for production deployment by running comprehensive validation checks. ### Prepare representative validation data Start by curating diverse validation datasets that mirror real-world inputs, including edge cases and difficult examples your model encounters in production. **Example:** For a customer service chatbot handling clothing returns, include: * Simple queries ("How do I return this shirt?") * Complex scenarios ("I received the wrong size in a different color than ordered") * Edge cases ("I started a return but the tracking shows it's still at my house") * Multi-intent queries ("I want to exchange this and add something to my order") ### Run comprehensive checks Next, evaluate prediction quality and system performance to ensure all production requirements are satisfied. ## Track critical metrics Statistics are a critical tool for making sure your AI is trustworthy. These commonly used metrics evaluate a model's performance. ### Prediction quality metrics | Metric | Definition | When to prioritize | | - | - | - | | Accuracy | Correct predictions ÷ total predictions | Clear-cut, factual tasks (for example, classification); in contexts where incorrect outputs could lead to significant consequences (medical, legal, financial) | | Precision | True positives ÷ predicted positives | When false positives are the most significant concern (for example, content moderation) | | Recall | True positives ÷ actual positives | When false negatives are the most significant concern (for example, compliance monitoring) | | F1 score | Harmonic mean of precision and recall | When balance between precision and recall is needed | In practice, there's often a trade-off between minimizing false positives and false negatives. The relative cost of each error type helps determine whether to prioritize precision or recall when optimizing a model. The F1 score is specifically designed to balance the concerns of both, by combining precision and recall into a single metric. Going back to the clothing returns chatbot, you might prioritize F1 score when the costs of incorrectly rejecting valid returns (customer dissatisfaction) and incorrectly accepting invalid returns (financial loss) are both significant concerns that need to be balanced. ### System performance metrics * **Latency:** Response time per prediction * **Throughput:** Prediction volume capacity (for example, 1,000 requests per second) ## Identify areas for improvement and iterate ### Conduct an error analysis Categorize and investigate patterns in incorrect predictions to identify underlying causes. ### Implement targeted improvements Apply insights from error analysis to refine the model through iterative improvements: * [Hyperparameter tuning](/flow/sdk/fine-tuning/create-fine-tuning-job) * Additional training data * Model architecture modifications # Vision language tuning Source: https://docs.seekr.com/flow/sdk/fine-tuning/vision-language-tuning Fine-tune vision-language models on image-text datasets using the SeekrFlow Python SDK. For conceptual background on vision language tuning, including supported models and when to use it, see [Vision language tuning](/flow/components/fine-tuning/vision-language-tuning). ## Prepare a vision language dataset Upload a dataset that follows the vision-language message schema. Each training example is a single-turn conversation where user messages contain both image and text content. ### Example dataset schema ```json JSON theme={null} { "messages": [ { "role": "user", "content": [ {"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}, {"type": "text", "text": "What product is this?"} ] }, { "role": "assistant", "content": [ {"type": "text", "text": "This is the ACME Widget Pro X7, a second-generation industrial sensor unit. It features the distinctive blue housing and triple-port connector array."} ] } ] } ``` ### Dataset validation SeekrFlow validates the dataset on upload and rejects datasets with: * Malformed message content or missing required fields * Unsupported image formats * Schema violations against the expected multimodal structure ## Upload a vision language dataset Upload your dataset with `purpose=fine-tune`. See [Upload file](/flow/reference/file_upload_v1_flow_files_put) for the full schema reference. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow() response = client.files.upload("vlm-dataset.jsonl", purpose="fine-tune") print(f"Uploaded file ID: {response.id}") ``` ## Create a vision language fine-tuning job ```python Python expandable theme={null} from seekrai.types import TrainingConfig, InfrastructureConfig from seekrai import SeekrFlow client = SeekrFlow() training_config = TrainingConfig( training_files=[ "file-830e9be3-25tt-13y1-0298-3a035e73o90" # Vision-language dataset file ID ], model="meta-llama/Llama-3.2-11B-Vision-Instruct", n_epochs=1, n_checkpoints=1, batch_size=4, learning_rate=1e-5, experiment_name="vlm_helperbot_v1", ) infrastructure_config = InfrastructureConfig( n_accel=8, accel_type="MI300X", ) fine_tune = client.fine_tuning.create( training_config=training_config, infrastructure_config=infrastructure_config, project_id=123, ) print(fine_tune.id) ``` All other `TrainingConfig` parameters behave the same as in text-only instruction fine-tuning. See [Create a fine-tuning job](/flow/sdk/fine-tuning/create-fine-tuning-job) for the full workflow including project setup, file retrieval, and monitoring. # Get started with the SDK Source: https://docs.seekr.com/flow/sdk/getting-started Install the SDK, authenticate, and make your first API call. The [SeekrFlow Python SDK](https://pypi.org/project/seekrai/) provides programmatic access to the SeekrFlow platform, including inference, agents, fine-tuning, content moderation, explainability, and data preparation. The SDK supports Python 3.9+ with synchronous and asynchronous clients. For direct HTTP access without an SDK, see [Get started with the API](/flow/reference/getting-started-with-your-api). ## Prerequisites * Python 3.9 or higher * A SeekrFlow account. See [Access SeekrFlow](/flow/app/access-seekrflow) for setup instructions. * A SeekrFlow API key, available in the [User Profile](https://apps.seekr.com/flow/user-profile#api-token) section of the dashboard. ## Installation ```bash Bash theme={null} pip install --upgrade seekrai ``` ## Authentication Set your API key as an environment variable: ```bash Linux / macOS theme={null} export SEEKR_API_KEY=your_api_key ``` ```bash Windows theme={null} set SEEKR_API_KEY=your_api_key ``` Verify the variable is set by running `echo $SEEKR_API_KEY` (or `echo %SEEKR_API_KEY%` on Windows). ## Choosing a team Resources in SeekrFlow belong to a team. If you don't select one, requests use your personal workspace. To work in a specific team, set the `SEEKR_TEAM_ID` environment variable or an `x-team-id` header on the client. See [Work with teams](/flow/sdk/teams) for details. ## Supported integrations SeekrFlow supports the native Python SDK and two third-party clients. All three provide access to the same inference engine. **SeekrFlow SDK** – Native Python client with full platform access, including agents, fine-tuning, data engine, and explainability. No additional packages required beyond `seekrai`. **OpenAI SDK** – OpenAI-compatible inference endpoint. Existing OpenAI-based applications can connect to SeekrFlow by changing the `base_url`. Install with: ```bash Bash theme={null} pip install openai ``` The OpenAI compatibility layer supports `model`, `messages`, `stream`, `temperature`, `logprobs`, `top_logprobs`, `max_tokens`, `stop`, `top_p`, `frequency_penalty`, `presence_penalty`, and `tools`. Parameters such as `tool_choice`, `parallel_tool_calls`, `n`, `logit_bias`, and `max_completion_tokens` are not supported. **LangChain** – The `ChatSeekrFlow` wrapper integrates SeekrFlow models into LangChain chains, prompts, and tools. Install with: ```bash Bash theme={null} pip install langchain langchain-community langchain-seekrflow ``` `ChatSeekrFlow` supports tool calling, structured output, JSON mode, streaming, and token usage tracking. Async APIs, image input, audio input, and video input are not currently supported. ## First API call ```python SeekrFlow SDK theme={null} import os from seekrai import SeekrFlow client = SeekrFlow(api_key=os.environ.get("SEEKR_API_KEY")) response = client.chat.completions.create( model="meta-llama/Llama-3.1-8B-Instruct", messages=[{"role": "user", "content": "What is SeekrFlow?"}], ) print(response.choices[0].message.content) ``` ```python OpenAI SDK theme={null} # Requires: pip install openai from openai import OpenAI client = OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key="your_seekr_api_key", ) response = client.chat.completions.create( model="meta-llama/Llama-3.1-8B-Instruct", messages=[{"role": "user", "content": "What is SeekrFlow?"}], ) print(response.choices[0].message.content) ``` ```bash LangChain theme={null} # Requires: pip install seekrai langchain langchain-community langchain-seekrflow import os from seekrai import SeekrFlow from langchain_seekrflow import ChatSeekrFlow from langchain.schema import HumanMessage seekr_client = SeekrFlow(api_key=os.environ.get("SEEKR_API_KEY")) llm = ChatSeekrFlow( client=seekr_client, model_name="meta-llama/Llama-3.1-8B-Instruct", ) response = llm.invoke([HumanMessage(content="What is SeekrFlow?")]) print(response.content) ``` ## Asynchronous usage The SeekrFlow SDK includes an asynchronous client for non-blocking requests. ```python Python theme={null} import os, asyncio from seekrai import AsyncSeekrFlow client = AsyncSeekrFlow(api_key=os.environ.get("SEEKR_API_KEY")) async def main(): response = await client.chat.completions.create( model="meta-llama/Llama-3.1-8B-Instruct", messages=[{"role": "user", "content": "What is SeekrFlow?"}], ) print(response.choices[0].message.content) asyncio.run(main()) ``` ## What you can build > [card] [Agents](/flow/sdk/agents) > > Create agents, attach tools, manage threads, and run multi-turn conversations. > [card] [Fine-tuning](/flow/sdk/fine-tuning) > > Train models on your data with instruction fine-tuning, reinforcement tuning, or preference tuning. > [card] [Content moderation](/flow/content-moderation-sdk) > > Classify content for safety and brand risk using Seekr ContentGuard and Meta Llama Guard. > [card] [Data engine](/flow/sdk/data-engine) > > Ingest files, generate training datasets, and build vector databases for retrieval. > [card] [Explainability](/flow/sdk/explainability) > > Retrieve the fine-tuning data that influenced a model's response. # Integrations Source: https://docs.seekr.com/flow/sdk/integrations Use SeekrFlow with OpenAI SDK and LangChain SeekrFlow is compatible with popular AI frameworks, allowing you to use familiar tools and patterns. > [card] [OpenAI compatibility](/flow/sdk/integrations/custom-functions) > > Tool calling and function definitions with the OpenAI Python SDK. > [card] [LangChain](/flow/sdk/integrations/using-seekrflow-langchain) > > Build chains and agents with the ChatSeekrFlow wrapper. # OpenAI Source: https://docs.seekr.com/flow/sdk/integrations/custom-functions This quickstart guide will help you get started using SeekrFlow via OpenAI. The Compatibility API allows developers to use SeekrFlow through OpenAI’s SDK. It makes it easy to switch existing OpenAI-based applications to use Seekr’s models while still maintaining the use of OpenAI SDK — no big refactors needed. ## Installation First, install the OpenAI SDK and import the package. Then, create a client and configure it with the Compatibility API base URL and your Seekr API key. ```python Python theme={null} import os import openai # Set the API key os.environ["OPENAI_API_KEY"] = "Your OpenAI API key here" # Create the OpenAI client and retrieve the API key. client = openai.OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key=os.environ.get("SEEKR_API_KEY") ) ``` ### Basic chat completions Here’s a basic example using the Chat Completions API: ```python Python expandable theme={null} from openai import OpenAI client = OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key="SEEKR_API_KEY", ) completion = client.chat.completions.create( model="meta-llama/Meta-Llama-3-8B", messages=[ { "role": "user", "content": "Write a haiku about eating cake at the gym.", }, ], ) print(completion.choices[0].message) ``` ### Chat with streaming To stream the response, set the stream parameter to `True`. ```python Python expandable theme={null} from openai import OpenAI client = OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key="SEEKR_API_KEY", ) stream = client.chat.completions.create( model="meta-llama/Meta-Llama-3-8B", messages=[ { "role": "user", "content": "Write a haiku about eating cake at the gym.", }, ], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="") ``` ### State management For state management, use the `messages` parameter to build the conversation history. You can include a system message via the developer role and the multiple chat turns between the user and assistant. ```python Python expandable theme={null} from openai import OpenAI client = OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key="SEEKR_API_KEY", ) completion = client.chat.completions.create( messages=[ { "role": "user", "content": "Respond in the style of Russ Hanneman.", }, { "role": "user", "content": "What does ROI mean?", }, { "role": "assistant", "content": "Radio. On. Internet.", }, { "role": "user", "content": "How did you make your first billion?", }, ], model="meta-llama/Meta-Llama-3-8B", ) print(completion.choices[0].message) ``` ### Tool use (function calling) You can utilize the tool use feature by passing a list of tools to the tools parameter in the API call. This one creates a custom unit conversion tool that can be configured dynamically. ```python Python expandable theme={null} import os from openai import OpenAI client = OpenAI( base_url="https://flow.seekr.com/v1/inference", api_key=os.environ.get("OPENAI_API_KEY") ) # Send a request to the OpenAI API to leverage the specified Llama model as a unit conversion tool. response = client.chat.completions.create( model="meta-llama/Llama-3.1-8B-Instruct", stream=False, messages=[{ "role": "user", "content": "Convert from 5 kilometers to miles" }], max_tokens=100, tools=[{ "type": "function", "function": { "name": "convert_units", "description": "Convert between different units of measurement", "parameters": { "type": "object", "properties": { "value": {"type": "number"}, "from_unit": {"type": "string"}, "to_unit": {"type": "string"} }, "required": ["value", "from_unit", "to_unit"] } } }] ) ``` Next, register the function from JSON and run the unit conversion tool: ```python Python expandable theme={null} # Parse json and register def register_from_json(json_obj): code = f"def {json_obj['name']}({', '.join(json_obj['args'])}):\n{json_obj['docstring']}\n{json_obj['code']}" print(code) namespace = {} exec(code, namespace) return namespace[json_obj["name"]] # Execute our tool def execute_tool_call(resp): tool_call = resp.choices[0].message.tool_calls[0] func_name = tool_call.function.name args = tool_call.function.arguments func = globals().get(func_name) if not func: raise ValueError(f"Function {func_name} not found") if isinstance(args, str): import json args = json.loads(args) return func(**args) execute_tool_call(response) ``` ## Supported parameters The following is the list supported parameters in the Compatibility API, including those that are not explicitly demonstrated in the examples above: * model * messages * stream * temperature * logprobs * top_logprobs * max_tokens * stop * top_p * frequency_penalty * presence_penalty ## Unsupported parameters The following parameters are not supported in the Compatibility API: * tool_choice * store * reasoning_effort * metadata * logit_bias * max_completion_tokens * n * modalities * prediction * audio * service_tier * stream_options * parallel_tool_calls * user # LangChain Source: https://docs.seekr.com/flow/sdk/integrations/using-seekrflow-langchain This quickstart guide will help you get started using LangChain with SeekrFlow chat models. This guide provides a quick overview for getting started with Seekr [chat models](https://python.langchain.com/concepts/chat_models) via our LangChain integration. ## Introduction `ChatSeekrFlow` class wraps a chat model endpoint hosted on SeekrFlow, enabling seamless integration with LangChain applications. ### Integration Details | Class | Package | Local | Serializable | Package downloads | Package latest | | - | - | - | - | - | - | | [ChatSeekrFlow](https://github.com/benfaircloth/langchain-seekrflow/blob/main/langchain_seekrflow/seekrflow.py) | [langchain-seekrflow](https://pypi.org/project/langchain-seekrflow/) | ❌ | beta | ![PyPI - Downloads](https://mintlify.s3.us-west-1.amazonaws.com/seekr/images/docs/pypi/dm/seekrai) | ![PyPI - Version](https://mintlify.s3.us-west-1.amazonaws.com/seekr/images/docs/pypi/v/seekrai) | ### Model Features | [Tool calling](https://python.langchain.com/how_to/tool_calling/) | [Structured output](https://python.langchain.com/how_to/structured_output/) | JSON mode | [Image input](https://python.langchain.com/how_to/multimodal_inputs/) | Audio input | Video input | [Token-level streaming](https://python.langchain.com/how_to/chat_streaming/) | Native async | [Token usage](https://python.langchain.com/how_to/chat_token_usage_tracking/) | [Logprobs](https://python.langchain.com/how_to/logprobs/) | | - | - | - | - | - | - | - | - | - | - | | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | **Supported Methods** `ChatSeekrFlow` supports all methods of `ChatModel`, **except async APIs**. **Endpoint Requirements** The serving endpoint `ChatSeekrFlow` wraps **must** have OpenAI-compatible chat input/output format. It can be used for: 1. **Fine-tuned Seekr models** 2. **Custom SeekrFlow models** 3. **RAG-enabled models using Seekr's retrieval system** For async usage, please refer to `AsyncChatSeekrFlow` (coming soon). ## Installation Ensure you have the necessary dependencies installed: ```bash Bash theme={null} pip install seekrai langchain langchain-community ``` You must also have an API key from Seekr to authenticate requests. ```python Python theme={null} # Standard library import getpass import os # Third-party from langchain.prompts import ChatPromptTemplate from langchain.schema import HumanMessage from langchain_core.runnables import RunnableSequence # OSS SeekrFlow integration from langchain_seekrflow import ChatSeekrFlow from seekrai import SeekrFlow ``` ## API Key Setup You'll need to set your API key as an environment variable to authenticate requests. Run the below cell. Or manually assign it before running queries: ```python Python theme={null} SEEKR_API_KEY = "your-api-key-here" ``` ```python Python theme={null} os.environ["SEEKR_API_KEY"] = getpass.getpass("Enter your Seekr API key:") ``` ## Instantiation ```python Python theme={null} os.environ["SEEKR_API_KEY"] seekr_client = SeekrFlow(api_key=SEEKR_API_KEY) llm = ChatSeekrFlow( client=seekr_client, model_name="meta-llama/Meta-Llama-3-8B-Instruct" ) ``` ## Invocation ```python Python theme={null} response = llm.invoke([HumanMessage(content="Hello, Seekr!")]) print(response.content) ``` Output: ``` Hello there! I'm Seekr, nice to meet you! What brings you here today? Do you have a question, or are you looking for some help with something? I'm all ears (or rather, all text)! ``` ## Chaining ```python Python theme={null} prompt = ChatPromptTemplate.from_template("Translate to French: {text}") chain: RunnableSequence = prompt | llm result = chain.invoke({"text": "Good morning"}) print(result) ``` **Sample response:** ``` content='The translation of "Good morning" in French is:\n\n"Bonne journée"' additional_kwargs={} response_metadata={} ``` ```python Python theme={null} def test_stream(): """Test synchronous invocation in streaming mode.""" print("\n🔹 Testing Sync `stream()` (Streaming)...") for chunk in llm.stream([HumanMessage(content="Write me a haiku.")]): print(chunk.content, end="", flush=True) # ✅ Ensure streaming is enabled llm = ChatSeekrFlow( client=seekr_client, model_name="meta-llama/Meta-Llama-3-8B-Instruct", streaming=True, # ✅ Enable streaming ) # ✅ Run sync streaming test test_stream() ``` **Sample response:** ``` 🔹 Testing Sync `stream()` (Streaming)... Here is a haiku: Golden sunset fades Ripples on the quiet lake Peaceful evening sky ``` ## Error Handling & Debugging ```python Python expandable theme={null} # Define a minimal mock SeekrFlow client class MockSeekrClient: """Mock SeekrFlow API client that mimics the real API structure.""" class MockChat: """Mock Chat object with a completions method.""" class MockCompletions: """Mock Completions object with a create method.""" def create(self, *args, **kwargs): return { "choices": [{"message": {"content": "Mock response"}}] } # Mimic API response completions = MockCompletions() chat = MockChat() def test_initialization_errors(): """Test that invalid ChatSeekrFlow initializations raise expected errors.""" test_cases = [ { "name": "Missing Client", "args": {"client": None, "model_name": "seekrflow-model"}, "expected_error": "SeekrFlow client cannot be None.", }, { "name": "Missing Model Name", "args": {"client": MockSeekrClient(), "model_name": ""}, "expected_error": "A valid model name must be provided.", }, ] for test in test_cases: try: print(f"Running test: {test['name']}") faulty_llm = ChatSeekrFlow(**test["args"]) # If no error is raised, fail the test print(f"❌ Test '{test['name']}' failed: No error was raised!") except Exception as e: error_msg = str(e) assert test["expected_error"] in error_msg, f"Unexpected error: {error_msg}" print(f"✅ Expected Error: {error_msg}") # Run test test_initialization_errors() ``` Output: ``` Running test: Missing Client ✅ Expected Error: SeekrFlow client cannot be None. Running test: Missing Model Name ✅ Expected Error: A valid model name must be provided. ``` ### API reference * `ChatSeekrFlow` class: [`langchain_seekrflow.ChatSeekrFlow`](https://github.com/benfaircloth/langchain-seekrflow/blob/main/langchain_seekrflow/seekrflow.py) * PyPI package: [`langchain-seekrflow`](https://pypi.org/project/langchain-seekrflow/) # Observability Source: https://docs.seekr.com/flow/sdk/observability Query and inspect spans to monitor agent runs Observability spans are records generated during agent runs that capture timing, model usage, token consumption, and error details. Use the observability resource to query spans across runs or retrieve the full record for a specific span. ## Query spans Use `query_spans` to retrieve span summaries matching a set of filters. All filters are optional. If `min_start_time` is not provided, the query defaults to the last 15 minutes. Start with `run_id` to scope results to a specific run. **Endpoint:** [`POST /v1/observability/spans`](/flow/reference/query_spans_v1_observability_spans_post) ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow(api_key="your_api_key") spans = client.observability.query_spans( run_id="your_run_id" ) for span in spans.spans: print(f"Span ID: {span['span_id']}, Name: {span['span_name']}, Kind: {span['kind']}") ``` Additional filters you can combine: | Parameter | Description | | - | - | | `agent_id` | Filter by agent | | `thread_id` | Filter by thread | | `trace_id` | Filter by trace | | `group` | Filter by group | | `metadata` | Filter by custom metadata key-value pairs | | `min_start_time` | Filter spans starting after this datetime. Defaults to 15 minutes before the request time if not provided. | | `max_start_time` | Filter spans starting before this datetime | | `limit` | Number of results to return (default: 100) | | `offset` | Pagination offset (default: 0) | | `order` | Sort order by start time (`asc` or `desc`, default: `desc`) | ## Retrieve a span Use `retrieve_span` to fetch the full span object for a specific span by ID. Unlike `query_spans`, which returns summaries, this returns the complete record. **Endpoint:** [`GET /v1/observability/spans/{span_id}`](/flow/reference/retrieve_span_v1_observability_spans__span_id__get) ```python Python theme={null} span = client.observability.retrieve_span(span_id="your_span_id") print(span) ``` ## Investigate a failed run A common pattern is to query spans for a run, then retrieve a specific span to investigate further. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow(api_key="your_api_key") # Get all spans for a run spans = client.observability.query_spans(run_id="your_run_id") # Find the first span with an exception failed_span = next( (s for s in spans.spans if s.get("is_exception")), None ) if failed_span: full_span = client.observability.retrieve_span(span_id=failed_span["span_id"]) print(full_span) ``` # Manage and delete resources Source: https://docs.seekr.com/flow/sdk/resource-management List and clean up agents, tools, files, vector databases, data jobs, fine-tuning jobs, and projects. Everything you create stays in your workspace until you remove it. This page collects the cleanup path for each resource type in one place. It covers how to list what you have, how to delete a single resource, and how to delete in bulk. Each example assumes an initialized `client`. See [Get started with the SDK](/flow/sdk/getting-started). ## Deletion methods | Resource | SDK method | REST endpoint | | - | - | - | | Agents | `client.agents.delete(agent_id)` | [`DELETE /v2/flow/agents/{agent_id}`](/flow/reference/delete_v2_flow_agents__agent_id__delete) | | Tools | `client.tools.delete(tool_id)` | [`DELETE /v1/flow/tools/{tool_id}`](/flow/reference/delete_tool_v1_flow_tools__tool_id__delete) | | Files | `client.files.delete(id)` | [`DELETE /v1/flow/files/{file_id}`](/flow/reference/delete_file_v1_flow_files__file_id__delete) | | Vector databases | `client.vector_database.delete(database_id)` | [`DELETE /v1/flow/vectordb/{database_id}`](/flow/reference/delete_vector_database_route_v1_flow_vectordb__database_id__delete) | | Files in a vector database | `client.vector_database.delete_file(database_id, file_id)` | [`DELETE /v1/flow/vectordb/{database_id}/files/{file_id}`](/flow/reference/delete_vector_database_file_v1_flow_vectordb__database_id__files__file_id__delete) | | Data jobs | `client.data_jobs.delete(data_job_id)` | [`DELETE /v1/flow/data-jobs/{data_job_id}`](/flow/reference/delete_data_job_v1_flow_data_jobs__data_job_id__delete) | | Fine-tuning jobs | | [`DELETE /v1/flow/fine-tunes/{fine_tune_id}`](/flow/reference/delete_fine_tune_v1_flow_fine_tunes__fine_tune_id__delete) | | Fine-tuning projects | | [`DELETE /v1/flow/projects/{project_id}`](/flow/reference/delete_project_v1_flow_projects__project_id__delete) | Delete fine-tuning jobs and projects over REST. See [Delete fine-tuning jobs and projects](#delete-fine-tuning-jobs-and-projects) for a worked example. > [!WARNING] > > Deletion is permanent for every resource in the table. Nothing is moved to a recoverable state first, and a deleted resource cannot be restored. ## List your resources Begin by listing the resource type you intend to remove. The list methods differ in shape. Some return a list directly. Others return a response object with the results under `data`. ```python Python theme={null} agents = client.agents.list_agents() # list[Agent] tools = client.tools.list().data # paginated, default limit 100 files = client.files.list().data databases = client.vector_database.list().data jobs = client.data_jobs.list().data # paginated, default limit 25 fine_tunes = client.fine_tuning.list().data projects = client.projects.list().data # paginated, default limit 100 for agent in agents: print(f"{agent.id} {agent.name}") ``` `client.tools.list()`, `client.files.list()`, `client.data_jobs.list()`, and `client.projects.list()` accept paging arguments. When a workspace holds more resources than one page returns, increase `limit` or request successive pages with `offset`. ```python Python theme={null} all_tools = [] offset = 0 while True: page = client.tools.list(offset=offset, limit=100) all_tools.extend(page.data) if len(all_tools) >= page.total: break offset += 100 print(f"{len(all_tools)} tools") ``` `client.data_jobs.list()` also filters by `job_type` and sorts with `sort_by` and `sort_order`. See [Manage data jobs](/flow/sdk/data-engine/manage-data-jobs). ## Delete a single resource Each delete method takes the resource ID. ```python Python theme={null} client.agents.delete(agent_id) client.tools.delete(tool_id) client.files.delete(file_id) client.vector_database.delete(database_id) client.data_jobs.delete(data_job_id) ``` Deleting a vector database removes the database and everything indexed in it. To remove one document and keep the database, delete the file instead. See [Manage vector databases](/flow/sdk/data-engine/manage-vector-databases). ```python Python theme={null} client.vector_database.delete_file(database_id, file_id) ``` ## Delete in bulk To remove several resources at once, filter a list call to the resources you want to delete, then iterate over the result. This example removes every tool whose name starts with a test prefix. ```python Python theme={null} targets = [t for t in client.tools.list().data if t.name.startswith("test-")] print(f"Deleting {len(targets)} tools") for tool in targets: client.tools.delete(tool.id) print(f"Deleted {tool.id} {tool.name}") ``` > [!TIP] > > Print the selection and confirm it before the delete loop runs. Deletion is permanent, and a filter that matches more than you expected cannot be undone. Delete in dependency order when resources reference each other. Delete an agent before the tools it uses, and delete a vector database before the files that were ingested into it. ## Delete fine-tuning jobs and projects Delete fine-tuning jobs and projects with a direct HTTP request to the REST endpoints. Deleting a project does not delete the fine-tuning jobs in it. The jobs are disassociated from the project and remain in your workspace. To remove them as well, delete the jobs first. ```python Python theme={null} import os import requests headers = {"Authorization": os.environ["SEEKR_API_KEY"]} # Delete a fine-tuning job and its artifacts requests.delete( f"https://flow.seekr.com/v1/flow/fine-tunes/{fine_tune_id}", headers=headers, ).raise_for_status() # Delete a project requests.delete( f"https://flow.seekr.com/v1/flow/projects/{project_id}", headers=headers, ).raise_for_status() ``` ```curl cURL theme={null} curl -X DELETE https://flow.seekr.com/v1/flow/fine-tunes/ \ -H "Authorization: " curl -X DELETE https://flow.seekr.com/v1/flow/projects/ \ -H "Authorization: " ``` Both endpoints return `204 No Content` on success. The deleted job or project no longer appears in `client.fine_tuning.list()` or `client.projects.list()`. > [!NOTE] > > [Cancelling](/flow/reference/cancel_fine_tune_v1_flow_fine_tunes__fine_tune_id__cancel_put) a job is not the same as deleting it. Cancel stops a job while it is queued or running and keeps the record, so the job stays in your list with a cancelled status. Delete removes the record and its artifacts, and works on a job in any state. To remove all finished fine-tuning jobs from a workspace, list them with the SDK and delete them over REST. ```python Python theme={null} import os import requests headers = {"Authorization": os.environ["SEEKR_API_KEY"]} finished = [j for j in client.fine_tuning.list().data if j.status == "completed"] print(f"Deleting {len(finished)} fine-tuning jobs") for job in finished: requests.delete( f"https://flow.seekr.com/v1/flow/fine-tunes/{job.id}", headers=headers, ).raise_for_status() print(f"Deleted {job.id}") ``` # Work with teams Source: https://docs.seekr.com/flow/sdk/teams Scope SDK requests to a team so resources are created in and read from the right place. Every resource in SeekrFlow (agents, fine-tuning jobs, deployments, files, and vector databases) belongs to a team. SDK requests are scoped to a single team. Resources you create are owned by that team, and list and retrieve calls return only that team's resources. For the underlying access model, see [Role-based access control](/flow/role-based-access-control). > [!NOTE] > > Threads, and the messages and runs in them, are always user-owned, so selecting a team doesn't affect them. Agents are team-owned, but the threads you run them on are not. ## Set the active team Setting a team is optional. If you don't, requests use your **personal workspace**, the private, single-member team that every user has by default. The [Teams Settings page](/flow/app/manage-permissions#find-a-team-id) in the SeekrFlow web interface lists every team you belong to and its ID. Resources returned by the SDK also include the `team_id` of their owning team. The SDK sends the team you select as the `x-team-id` request header. You can set it in two ways. **Environment variable (recommended).** Set `SEEKR_TEAM_ID` and the SDK applies it automatically to every request: ```bash Linux / macOS theme={null} export SEEKR_TEAM_ID=124cb1bb-d8d3-4e9b-9c96-2039fba43e78 ``` ```bash Windows theme={null} set SEEKR_TEAM_ID=124cb1bb-d8d3-4e9b-9c96-2039fba43e78 ``` ```python Python theme={null} import os from seekrai import SeekrFlow # Picks up SEEKR_API_KEY and SEEKR_TEAM_ID from the environment. client = SeekrFlow() ``` **Per-client header.** Set `supplied_headers` when you construct the client. This takes precedence over `SEEKR_TEAM_ID`, which is useful when one process works across several teams: ```python Python theme={null} import os from seekrai import SeekrFlow client = SeekrFlow( api_key=os.environ.get("SEEKR_API_KEY"), supplied_headers={"x-team-id": "124cb1bb-d8d3-4e9b-9c96-2039fba43e78"}, ) ``` Both approaches work the same way on the asynchronous client: ```python Python theme={null} from seekrai import AsyncSeekrFlow client = AsyncSeekrFlow(supplied_headers={"x-team-id": "124cb1bb-d8d3-4e9b-9c96-2039fba43e78"}) ``` > [!NOTE] > > The team applies to the whole client. Every call made through a client is scoped to that client's team. To act on more than one team in the same process, create a separate client per team. ## Create resources in a team Once a client is scoped to a team, every resource you create through it belongs to that team. No extra argument is needed on individual calls: ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow(supplied_headers={"x-team-id": "124cb1bb-d8d3-4e9b-9c96-2039fba43e78"}) # Owned by the client's team. uploaded = client.files.upload(file="training_data.jsonl", purpose="fine-tune") ``` ## Read resources from a team List and retrieve calls return only the resources owned by the client's team. Requests for a resource that belongs to a team you aren't a member of are rejected. ```python Python theme={null} from seekrai import SeekrFlow client = SeekrFlow(supplied_headers={"x-team-id": "124cb1bb-d8d3-4e9b-9c96-2039fba43e78"}) # Only files owned by the client's team. for f in client.files.list().data: print(f.id, f.filename) ``` Returned resources carry the `team_id` of their owning team alongside the `user_id` of the creator, so you can confirm where a resource lives: ```python Python theme={null} agent = client.agents.retrieve(agent_id) print(agent.team_id) # e.g. "124cb1bb-d8d3-4e9b-9c96-2039fba43e78" print(agent.user_id) # the user who created it ``` ## Work across multiple teams To operate on several teams in one program, create one client per team: ```python Python theme={null} from seekrai import SeekrFlow research = SeekrFlow(supplied_headers={"x-team-id": "124cb1bb-d8d3-4e9b-9c96-2039fba43e78"}) production = SeekrFlow(supplied_headers={"x-team-id": "7d9f2a10-4c6b-4f23-8a1e-5b0c9d3e4f21"}) research_files = research.files.list().data production_files = production.files.list().data ``` A resource created in one team is not visible to another. To use a resource across teams, recreate it in each team. # Use cases Source: https://docs.seekr.com/flow/use-case-identification Industry-specific examples of SeekrFlow applications across different workflows and business verticals. This page provides industry-specific examples of SeekrFlow applications across different workflow types, including potential document sources, collection strategies, and expected business impact. ## Government | | Instruction fine-tuning or retrieval workflow | Agentic workflow | | - | - | - | | **Example use case** | Automated document summarization for policy briefings with explainable citations | Fraud detection systems that flag suspicious patterns for human review | | Domain-specific elements | Regulatory language, legal frameworks, and agency-specific terminology. | Agency-specific fraud patterns, jurisdiction-based enforcement criteria | | Document sources | Federal regulations, agency handbooks, court decisions, policy manuals, precedent documents, and interagency communications | Historical transaction data, fraud case files, customer profiles with normal behavior patterns, regulatory requirements, investigation procedures, alert handling protocols, performance metrics | | Expected business impact | Enhanced policy analysis with 40% faster brief generation and 25-30% reduction in citizen services | Estimated 30-40% decrease in manual review time with potential to identify 15-25% more fraudulent activities | | HITL component | Managers or officials approve AI-generated content before publication and can provide feedback to improve future outputs | Analysts investigate flagged patterns and determine their risk level, then provide feedback to improve future outputs | ## Manufacturing and supply chain | | Instruction fine-tuning or retrieval workflow | Agentic workflow | | - | - | - | | **Example use case** | Predictive maintenance reports based on equipment sensor data | Autonomous inventory management that orders supplies when thresholds are reached | | Domain-specific elements | Production processes, equipment tolerances, supply chain dependencies | Lead time variations, supplier reliability metrics, seasonal demand patterns | | Document sources | Equipment manuals, maintenance logs, quality control standards, vendor specifications | Inventory master data, supplier agreements and fulfillment records, threshold configuration documentation, cost management frameworks, performance metric standards (e.g., service level targets, stockout tolerance thresholds) | | Expected business impact | 15-25% decrease in overall maintenance expenses with 20-30% improvement in maintenance labor utilization | 10-20% decrease in inventory holding costs with 30-50% reduction in stockout events | | HITL component | Production managers can review and adjust AI recommendations for critical equipment | Production managers can review and adjust AI purchases of critical equipment | ## Media and publishing | | Instruction fine-tuning or retrieval workflow | Agentic workflow | | - | - | - | | **Example use case** | Content personalization across platforms with brand voice adaptation | Automated content moderation with escalation paths for borderline cases | | Domain-specific elements | Content rights management, publishing workflows, audience engagement metrics | Platform-specific community guidelines, cultural context sensitivity | | Document sources | Style guides, published content archives, audience research, competitor analysis | Moderation precedents, policy documents, context-dependent examples | | Expected business impact | 20-30% reduction in content production costs, with 15-25% higher conversion rates | 50-70% decrease in policy violation exposure time with 40-60% reduction in human moderation workload | | HITL component | Editors review AI-generated headlines and summaries before publication | Community moderators can review and adjust flagged content violations | ## Hospitality and travel logistics | | Instruction fine-tuning or retrieval workflow | Agentic workflow | | - | - | - | | **Example use case** | Personalized itinerary creation with explanation of recommendations | Dynamic pricing systems that adjust based on demand patterns | | Domain-specific elements | Seasonal travel patterns, regulatory requirements, loyalty program structures | Competitive rate intelligence, demand forecasting patterns, event impact analysis | | Document sources | Guest history, booking terminology, destination descriptions, service amenities | Historical pricing performance, competitor positioning, market response patterns | | Expected business impact | 10-15% increase in average booking value with 25-30% increase in NPS | 8-12% increase in profit margin with 15-20% reduction in unbooked inventory | | HITL component | Customer service representatives can override AI-suggested solutions | Pricing systems can be reviewed and adjusted for unusual demand patterns, or price changes outside a certain range | ## Financial services | | Instruction fine-tuning or retrieval workflow | Agentic workflow | | - | - | - | | **Example use case** | Risk assessment reports with highlighted factors and confidence levels | Anomaly detection for transactions that autonomously escalates suspicious activity | | Domain-specific elements | Market mechanics, financial products, regulatory frameworks | Transaction pattern baselines, risk scoring models, regulatory thresholds | | Document sources | Regulatory filings, market reports, financial statements, compliance documents, reporting templates | Historical transaction data, regulatory compliance documents, escalation protocols, risk assessment frameworks | | Expected business impact | 40% faster report generation with 25-30% reduction in risk exposure | 40-60% improvement in fraud detection rates with 60-80% faster processing of legitimate transactions | | HITL component | Financial analysts review model outputs for major investment decisions | Analysts review and adjust flagged activity and provide feedback on accuracy to improve future outputs | ## Customer support | | Instruction fine-tuning or retrieval workflow | Agentic workflow | | - | - | - | | **Example use case** | Knowledge base article generation with source attribution | Support ticket routing and prioritization with automatic responses for common issues | | Domain-specific elements | Product terminology, service procedures, product capabilities | Support escalation paths, troubleshooting procedures, technical specifications, regulatory or compliance-related urgency factors, solution documentation structure, customer segmentation criteria | | Document sources | Product documentation, knowledge base articles, resolved ticket history, FAQs | SLA documentation, prioritization frameworks, knowledge base articles, support team structure, historical ticket database, response templates, reporting templates, performance metrics (success, customer satisfaction, accuracy, QA review processes) | | Expected business impact | 30-40% reduction in support ticket filing, with 15-20% increase in customer retention | 30-50% improvement in first-contact resolution with 15-25% increase in CSAT scores | | HITL component | Customer support can review articles and sources for accuracy and appropriateness and adjust accordingly | Support managers review alerts for potentially problematic interactions and adjust as needed | # What is SeekrFlow Source: https://docs.seekr.com/flow/what-is-seekrflow An overview of SeekrFlow's platform capabilities for building enterprise AI solutions. SeekrFlow is a complete AI development platform for organizations to build, customize, and scale generative and agentic AI solutions with full visibility and control over how AI learns, reasons, and delivers results. SeekrFlow provides a unified framework for the entire AI development lifecycle—from data preparation to model deployment and monitoring. The platform serves organizations that need enterprise-grade AI solutions with domain-specific knowledge, strict compliance requirements, and full data sovereignty. SeekrFlow supports both prebuilt solutions for common use cases and custom applications built on a robust, extensible architecture designed for enterprise scale. To start using SeekrFlow, see [Access SeekrFlow](/flow/app/access-seekrflow) for account setup and sign-in. From there, see the [User Guide](/flow/app/dashboard) for UI-based workflows or the [API Reference](/flow/reference/getting-started-with-your-api) for programmatic access. ## Key components SeekrFlow is built on several core components: * **Models** – Select from a catalog of generative and embedding models * **Agents** – Configurable AI systems that reason and execute tasks * **Data engine** – Transform raw content into AI-ready data * **Fine-tuning** – Adapt models to specific domains * **Deployments** – Launch and manage model endpoints * **Explainability** – Understand the sources and training data behind model responses * **Content moderation** – Evaluate content safety and compliance * **Observability** – Monitor agent runs, usage, and errors For detailed information about each component, see [Components](/flow/components). ## Prebuilt solutions SeekrFlow offers prebuilt AI solutions for enterprise and government use cases, including geospatial intelligence, threat analysis, procurement automation, and content moderation. All solutions can be customized with organization-specific data while maintaining security and compliance requirements. For a complete catalog of available solutions, see [Solutions](https://www.seekr.com/solutions/). ## Deployment options SeekrFlow provides flexible deployment options to meet different security, compliance, and performance requirements: * **Our cloud** – Build and deploy fast with fully managed AI as a Service, no infrastructure required * **Your cloud** – Integrate seamlessly with your preferred cloud platform * **Your data center** – Run on your terms—whether it's your own compute, on-premises, or fully air-gapped environments * **At the edge** – Deploy AI anywhere and reduce latency with edge solutions preloaded with SeekrFlow, models, storage, and networking ## Security With Seekr, your data remains yours. We never use it to train other models and give you full control to install our platform wherever your data resides: * **SOC 2 Type II certified** ensuring best-in-class security standards * **Complete data sovereignty** with ringfenced data and completions that never leave your environment * **Flexible deployment** on your cloud or hardware of choice * **Explainability and oversight** built into every component, from data processing to model outputs # Generate AI-ready data Source: https://docs.seekr.com/guard/app/ai-ready-data Build evaluation datasets from your own source documents. **AI-Ready Data** builds evaluation datasets from source documents you upload. You describe what the documents contain and what should be generated from them, and SeekrGuard runs the generation as a job you can track from the **AI-Ready Data** page. > [!NOTE] > > AI-Ready Data is in beta. Review a generated dataset before you use it in an examination. ## Create a generation job **1. Create Job** On the **AI-Ready Data** page, click **Create Job**. **2. Define Plan and Upload Data Sources** In **Data Generation Plan**, describe the documents you are uploading and what should be generated from them. The plan is required and accepts up to 10,000 characters. Your plan becomes part of the system message on every generated record, so its wording reaches the models you examine later. Drag and drop your files onto the upload area, or click **Browse** to choose them from your computer. Upload up to 10 files in PDF, Word, Markdown, or JSON format, each no larger than 100 MB. Your files are listed under **Files Uploaded**, and the **×** on a file removes it. Click **Create Job**. The button stays unavailable until you upload at least one data source. A generated file does not enter your dataset library on its own. To use it in an examination, add it as a dataset. See [Add and manage datasets](/guard/app/datasets). ## Track a job The **AI-Ready Data Jobs** table lists one row per job, newest first, paginated with **Rows per page**. | Column | Contents | | - | - | | **Job ID** | The job's identifier, prefixed `airdj-`. | | **State** | Where the job is in its lifecycle. | | **Phase** | The stage of generation currently running. | | **Created** | When you submitted the job. | | **Updated** | When the job's state last changed. | | **Records** | The number of records in the generated dataset. | | **Eval File ID** | The generated file's identifier, prefixed `file-`. | | **Filename** | The generated file's name, derived from the source document. | | **Type** | The generated file's format. | | **Stop Reason** | Why the job stopped short of completing. | | **Failure Summary** | Why the job failed. | # Chat with a model Source: https://docs.seekr.com/guard/app/chat Chat with a model and evaluate its responses inline. Talk to a registered model and score any of its responses on the spot. It is a fast way to probe behavior before setting up a full [examination](/guard/app/examinations), with generation settings and a system prompt you can change between messages. ## Before you start You need at least one registered [model](/guard/app/models), and at least one [evaluator](/guard/app/evaluators) if you want to score responses. ## Chat with a model **1. Pick a model** Open **Settings** with the gear icon. On the **Configuration** tab, choose a **Model**. A model card's **Chat with Model** button opens Chat with that model already selected. **2. Adjust the generation settings** Still on **Configuration**: * **Memory** – the **Use conversation history** toggle. When on, the model sees all previous messages. When off, each message is independent. * **Temperature** – a slider from 0 to 1 that controls randomness. Lower is more deterministic. * **Max Tokens** – a slider from 128 to 4096 that caps the response length. * **System Prompt** – an instruction that guides the model's behavior, such as *You are a helpful assistant*. **3. Choose evaluators** On the **Evaluators** tab, check the evaluators you want available for scoring. Search narrows the list, **Select all** and **Clear** work in bulk, and a chip counts your selection. Skip this if you only want to chat. **4. Send a message** Type your message and send it. The response streams in as it is generated. The **+** button starts a new chat. Models that emit chain-of-thought show a **Reasoning** chip above the answer. It pulses while the model is still thinking, and clicking it expands or collapses the reasoning. ## Evaluate a response **1. Evaluate** Point to an assistant message and click **Evaluate**. **2. Read the results** **Evaluation Results** runs your selected evaluators against that response. Each row shows the evaluator, a pass or fail mark, its score as a gauge, and a chip per judge model with that judge's score. **Show only concerning metrics** narrows the list to low or failing scores, and expanding a row shows its detail. **3. Go deeper or close** **Open in Comparison Workspace** carries the response into a [comparison](/guard/app/comparisons). **Close** returns to the chat. # Run comparisons Source: https://docs.seekr.com/guard/app/comparisons Score one response with several evaluators and judge models. Enter one response and score it with several evaluators and judge models at once, laid out as a grid. The models here do the scoring rather than being scored, so a comparison tells you how your evaluators and judges behave on text you already have. ## Before you start You need at least one [model](/guard/app/models) to judge with, and at least one LLM-as-a-Judge [evaluator](/guard/app/evaluators). ## Create a comparison **1. New Comparison** On the **Comparisons** page, click **New Comparison**. **2. Create Comparison** * **LLM Response (for Evaluation)** – enter the response you want scored. A comparison does not pull responses from datasets or examinations. * **Evaluators** – choose one or more. Only LLM-as-a-Judge evaluators appear. * **Judge Models** – choose the models that will score the response. Click **Create Comparison**. ## Read the comparison grid A comparison's page is titled with the response itself, and shows it in full under **Response Being Evaluated**. The grid below has one row per evaluator and one column per judge model, with each judge's provider beneath its name. **Add Models** brings more judges into an existing comparison. Each cell shows that judge's score as a gauge, labelled with the direction the evaluator scores in, or an error icon if scoring failed. Expand an evaluator's row for its detailed results: one card per judge model, holding the score and the judge's written reasoning, or **Evaluation failed**. The comparison's status appears beside its title. | Status | Meaning | | - | - | | Pending | Scoring has not started. | | Running | Judges are still scoring. | | Complete | Every cell returned a score. | | Partial | Some cells returned and others did not. | | Error | Scoring failed. | ## Manage your comparisons The **Comparisons** list shows one row per comparison, with **Name**, **Models**, **Status**, **Visibility**, **Created**, and **Actions**. The name is the response that was scored, and **Models** is the number of judge models. Above the table, filter by **Visibility**. Each row's **Actions** column opens the comparison, and offers a delete action for comparisons you created. # Add and manage datasets Source: https://docs.seekr.com/guard/app/datasets Upload and configure the test data used in evaluations. Your dataset library holds the data you test models on. Add data from a file, from a dataset that already exists in Seekr such as one generated by [AI-Ready Data](/guard/app/ai-ready-data), or from HuggingFace, then confirm how its columns map onto the message templates so [evaluators](/guard/app/evaluators) and [examinations](/guard/app/examinations) know what to send a model and how to score the response. Each row supplies a user question, and optionally a system prompt, retrieved context, prior conversation, and an expected answer. You can build your dataset library before adding any models or evaluators. ## Prepare your dataset Each row in your dataset is one test case. Its columns supply the messages SeekrGuard sends to a model and the reference material evaluators score the response against. ### Map columns to message templates When you add a dataset, you map its columns onto SeekrGuard's message templates. Include a column for each field you need: | Field | Contents | | - | - | | [System Message](/guard/glossary#system-message) | The system or instruction prompt (optional) | | [User Message](/guard/glossary#user-message) | The user's question or query | | [Context](/guard/glossary#context) | Background or retrieved material for RAG scenarios (optional) | | [Chat History](/guard/glossary#chat-history) | Prior turns of a multi-turn conversation (optional) | | [Assistant Message](/guard/glossary#assistant-message) | The expected or reference answer (optional) | Which fields a dataset contains determines which evaluators it can run. For example, an evaluator that requires an expected answer can only run on a dataset that maps **Assistant Message**. See [Run examinations](/guard/app/examinations). ### Add columns for tool evaluation The tool evaluators, such as **Tool Name Match** and **Tool Selection**, score the tool calls a model makes. To run them, add two columns to your dataset file. One lists the tools the model should call, and the other defines the tools it can choose from. | Column | Accepted headers | | - | - | | Expected tool calls | `expected_tool_calls` or `Expected Tool Calls` | | Tool definitions | `tool_definitions` or `Tool Definitions` | Headers must match exactly, including case. SeekrGuard treats any other spelling, such as `expectedToolCalls`, as an ordinary column. #### Format expected tool calls List the tools the model should call, separated by commas: ```text theme={null} search_knowledge_base,get_order_status ``` * Write plain tool names, without brackets or quotes. * Use names that appear in the same row's tool definitions. * On a row that isn't testing tool use, leave the cell empty. Evaluators that need expected tool calls skip that row. #### Format tool definitions Write a JSON array of tool definitions, one per tool, and repeat the full array on every row. Each definition has a `type` of `function` and a `function` object with the tool's `name`, `description`, and `parameters`: ```json theme={null} [ { "type": "function", "function": { "name": "get_order_status", "description": "Look up the shipping status of a customer order by its order number.", "parameters": { "type": "object", "properties": { "order_number": { "type": "string", "description": "The order number, such as A-10492" } }, "required": ["order_number"] } } } ] ``` * Use a valid JSON array, even for a single tool. * In `parameters`, declare the `required` fields and a `type` for each property. **Tool Arg Schema Validation** checks the model's arguments against them. * Give each tool a specific `description`. The model reads it to decide which tool to call. #### Format the context column Tools don't run during an examination. SeekrGuard reads each tool's result from the row's context column instead. Format the context as a JSON object keyed by tool name: ```json theme={null} { "search_knowledge_base": { "content": "Orders ship within two business days of payment." }, "get_order_status": { "content": "Order A-10492 shipped on May 3 and is in transit." } } ``` ## Add a dataset **1. Add Dataset** On the **Datasets** page, click **Add Dataset**. **2. Upload Dataset** Enter a **Name** and **Description**, then choose a tab under **Data Source**. > [tab] Upload File > > Drag and drop a CSV or Parquet file onto the upload area, or click the area to choose a file from your computer. > [tab] Seekr Dataset > > Choose a dataset from the **Dataset** list. Files generated by [AI-Ready Data](/guard/app/ai-ready-data) appear in this list under the **Filename** shown on the job row. > [tab] HuggingFace > > 1. Enter a dataset name in the format `organization/dataset-name`, such as `truthfulqa/truthful_qa`. > 2. Click **Check Dataset**. > 3. Choose a **Configuration**. Each one shows its row count. Click **Next**. **3. Configure Templates** Your source columns appear as chips under **Available Columns**. Drag them onto the message templates. > [!NOTE] > > A dataset generated by [AI-Ready Data](/guard/app/ai-ready-data) arrives with **System Message**, **User Message**, and **Assistant Message** already mapped. Review the **Live Preview** and continue. * To add placeholders by typing instead of dragging, click **Edit** on a message template. * A message template is a pattern applied to every row. A placeholder, written `{{{column_name}}}`, marks where that column's value goes when the row is sent to a model. * The **Live Preview** panel shows the messages a row will send to the model. Switch rows with the **Example** list. If your file has tool columns, a message confirms that SeekrGuard detected them. If the message doesn't appear, check the column headers. Click **Next**. **4. Preview & Save Dataset** Review the **Dataset Preview**, **Template Configuration**, and **Sample Data Preview**, then click **Save Dataset**. Any template you left unmapped reads **not set** in **Template Configuration**. ## Manage your datasets The **Datasets** list shows one row per dataset, with **Name**, **Description**, **Num. Input Samples**, **Num. Output Samples**, **Last Updated**, **Visibility**, and **Actions**. Each dataset's **Visibility** appears as a chip: private, public, or collaborative. See [Visibility](/guard/glossary#visibility). Above the table, filter by **Name**, reorder the list with **Sort By**, and limit it to your own datasets with **Only mine**. Each row's **Actions** column offers: * **View Dataset** – open the dataset's detail page to inspect its inputs and outputs. * **Delete Dataset** – available only if you own the dataset or you are an admin. The dataset is archived rather than permanently destroyed. # Create evaluators Source: https://docs.seekr.com/guard/app/evaluators Use the evaluator library and build your own custom evaluator. Evaluators turn a model's free-text responses into numbers you can compare and aggregate. The library includes rule-based and statistical evaluators, marked **Default**, and you can create your own LLM-as-a-Judge evaluators to score against criteria you write. You can author an evaluator with nothing else set up, but testing it or running it in an examination needs at least one registered [model](/guard/app/models). ## Browse the evaluator library The library is a table, with **Name**, **Description**, **Type**, **Created By**, **Last Updated**, **Visibility**, and **Actions**. Evaluators SeekrGuard provides show a **Default** badge under **Created By**. Above the table, filter by **Name**, **Type**, or **Model**, reorder the list with **Sort By**, and limit it to your own evaluators with **Only mine**. Each row's **Actions** column offers: * **View Evaluator** – open the evaluator's detail page. * **Delete Evaluator** – available only for evaluators you created. ## Create an evaluator The creation flow builds LLM-as-a-Judge evaluators. The rule-based and statistical evaluators come with SeekrGuard and cannot be created. > [!WARNING] > > An evaluator cannot be changed after you create it. **1. Add Evaluator** On the **Evaluators** page, click **Add Evaluator**. **2. Configuration** * **Name** – a short label for the evaluator. * **Description** – the judge model relies on this to decide how to evaluate and score outputs. Write it as instructions rather than a label. * **Evaluator Model** – the model that acts as the judge. Optional here, since you pick judge models when you add the evaluator to an examination. * **Scoring Scale** – **Minimum**, **Maximum**, **Step**, and **Polarity**. The defaults are 0 to 5 in steps of 1, with positive polarity. * **Constraints (Optional)** – natural-language rules for the judge to apply. > [!WARNING] > > Set polarity to match your metric. A metric where high values are bad, such as toxicity, must be negative. Risk scoring inverts non-positive polarity so that higher always means more risk, and a wrong setting makes a model's risk scores read backwards. See [Polarity](/guard/glossary#polarity). **3. Examples (Optional)** Add few-shot examples to calibrate the judge. Each has **Text**, a **Score**, and optional **Reasoning**. **4. Preview & Submit** Review the **Name**, **Model**, and the **Judge Prompt** SeekrGuard generates from your description and constraints, then click **Create Evaluator**. ## Read an evaluator's detail page **View Evaluator** opens a page showing the evaluator's **Description**, its **Inputs**, and **Facts** such as type, dates, score range, and polarity. **Inputs** lists what the evaluator needs in order to run, such as the model's output, the expected answer, or retrieved context. Those requirements determine the datasets it can be used with. See [Run examinations](/guard/app/examinations). The **Test Evaluator** panel scores text you supply, without creating an examination. Choose a judge model with **Select Model**, which lists the judge models this evaluator has been used with. Expand **Judge Prompt** to read the full prompt the judge model receives. Fill in each input the evaluator requires, such as **LLM Output**, then click **Run Test**. **Load Example** fills the fields with sample text and **Clear** empties them. # Run examinations Source: https://docs.seekr.com/guard/app/examinations Run a batch evaluation and read the results. Run a dataset through one or more models, score the outputs with one or more evaluators, and review the results. ## Before you start You need: * A [dataset](/guard/app/datasets). * An [evaluator](/guard/app/evaluators) that dataset can support. * A [model](/guard/app/models) to generate the outputs that evaluators score against the dataset. ## Create an examination **1. Create Examination** On the **Examinations** page, click **Create Examination**. **2. Configure Examination** 1. Enter a **Name**. It is required. 2. Add a **Description** with notes on the run's scope and how to interpret it. 3. Choose a **Dataset**. The list shows each dataset's sample count. 4. Set **Sample Selection** as a percentage of the dataset or a number of samples. The control shows how many of the total samples will be used. 5. Choose **Generation Models** to produce the outputs to score. These are the models you want to evaluate for your use case. 6. Check the evaluators you want in the **Evaluators** table, which lists the ones your dataset can support. * The four columns show the inputs each evaluator needs. A dash means it does not need that input, and a red ✕ means the dataset does not supply one it needs, which disables the evaluator. * Choosing a generation model supplies **MO**, which can enable more evaluators. * For each LLM-as-a-Judge evaluator, expand its row and choose one or more **Evaluator Models** to judge with. It cannot run without at least one. | Column | Input | | - | - | | UI | User input, the user's question | | CI | Context input, retrieved material | | MO | Model output, the response being scored | | EO | Expected output, the reference answer | 7. Click **Next**. **3. Review & Submit** Check the **Name**, **Description**, **Dataset**, **Sample Selection**, and the evaluators you picked, then click **Create Examination**. ## Manage your examinations The **Examinations** list shows one row per run, with **Name**, **Description**, **Models**, **Datasets**, **Status**, **Visibility**, **Created**, and **Actions**. Above the table, filter by **Name** or **Status**, reorder the list with **Sort By**, and limit it to your own runs with **Only mine**. Each row's **Actions** column opens the examination, and offers a delete action for runs you created. ## Track an examination's progress An examination is **queued** while it waits to run, **in progress** while it runs, then **completed** or **failed**. If it fails, check that the models you selected are active, that the dataset supplies the fields your evaluators need, and that each LLM-as-a-Judge evaluator has a judge model. Then create the examination again. ## Read the results Open a completed examination. Its header reports the models tested, the evaluators used, and the total number of evaluations, and the results are split across four tabs. ### Model Performance A bar chart of each model's score, one evaluator at a time, chosen with **Filter by Evaluator**. ### Sample Responses One row per input, with a count of the unique inputs scored. Expand a row to see the responses for that input and how many models and judges scored it. ### Interactive Analysis Choose a **Chart Type**: scatter across two evaluators, a heatmap of model against evaluator, a box plot of each model's distribution, parallel coordinates, or a judge agreement matrix. **Filter Models** narrows any of them to specific models. ### Agentic Assessment A cross-evaluator summary for runs that involve tools, with an **Overview** sub-tab and one sub-tab per agent-relevant evaluator. **Overview** opens with **Exam Agentic Facts**: how many inputs carried tool definitions, how many carried expected tool calls, how many outputs invoked a tool, the number of distinct tools, and the tool names with their call counts. Check these counts to confirm that SeekrGuard read your dataset's [tool columns](/guard/app/datasets#add-columns-for-tool-evaluation). Below the panel, a composite score per model and a table of each evaluator's score alongside that composite. Each evaluator's sub-tab shows its rubric, a per-model chart, and a table of scores by judge model. # Register and manage models Source: https://docs.seekr.com/guard/app/models Register the AI models you want to vet and read a model's card. Your model library is the set of models SeekrGuard can work with. Register models from OpenAI or Seekr, then use them in examinations, comparisons, chat, and risk scoring. Each registered model gets a card showing its details and its risk under a profile you choose. ## Register a model **1. Add Model** On the **Models** page, click **Add Model**. **2. Select Provider** Choose **OpenAI** or **Seekr**. The field is required. **3. Available Models** Check the models you want. **Select All** checks every model the provider offers and shows a running count, such as 158 of 158. Expanding a model reveals **Description (Optional)**, where you can add notes for your team. **4. Add Models** Click the add button. Its label counts your selection, such as **Add 1 Model**, and stays disabled until you check at least one. The new models appear in your library. ## Manage your models The **Models** list shows one row per model, with **Name**, **Provider**, **Type**, **Parameters**, **Created**, **Status**, and **Actions**. **Type** is foundational or fine-tuned. **Status** is active when the model is ready to use, queued while it is being prepared, or inactive when it is unavailable. Above the table, filter by **Name**, **Provider**, **Type**, or **Status**, reorder the list with **Sort By**, and limit it to your own models with **Only mine**. Each row's **Actions** column offers: * **View Model Card** – open the model's card. * **Delete Model** – available only for models you added. ## Read a model's card **View Model Card** opens a model's card, which gathers its details, its risk under a profile you choose, and tabs for analyzing the result. * The header shows the model's name with chips for its type and provider, its description, and its version and release date when those are available. * **Chat with Model** opens the [Chat](/guard/app/chat) page with the model selected. **Deploy Model** is not enabled. * The scorecard rates the model against the profile you pick from the **Risk Profile** list. It shows a composite out of 100 and a rating of strong, acceptable, marginal, or critical, weighted across the profile's categories. * **Risk Performance** breaks the category scores down by dataset and evaluator, **Compare** sets the model against peer models, and **Explore** pivots the results by category, dataset, evaluator, or model. > [!NOTE] > > This card's composite measures quality, where higher is better and 80 or above reads strong. The risk score on the risk pages measures the same evaluations in reverse, where higher means more risk. See [how a risk score is calculated](/guard/app/risk-profiles#understand-how-a-risk-score-is-calculated). # Navigate the app Source: https://docs.seekr.com/guard/app/navigate Get oriented on the Home page and the navigation sidebar. ## Start on the Home page When you open SeekrGuard, the **Home** page shows a **Welcome** panel of quick-start cards that link to **Examinations**, **Datasets**, **Evaluators**, and **Models**. Dismiss the panel with the **×** in its top-right corner. It stays hidden in later sessions. Below the panel, the **Model Risk Assessment** section ranks your registered models by risk under a single profile. * **Sort By** – order the models by risk score or by any of the profile's category scores, and use the button beside it to switch between ascending and descending. * **Risk Level** – show only models at one risk level, or all. * **Profile** – choose the risk profile that scores the models. The selector shows whether the profile is active and how many categories it contains. Each model appears as a numbered card with its risk level badge, risk score, and some of the profile's category scores. **View all metrics** opens the profile page with the full set. When a category score falls below its threshold, the card shows a count of threshold violations. Point to the count to see each category with its score and threshold. **View Model Card** opens the model's card, **Test Model** starts a new examination, and **Chat with Model** opens the Chat page. Clicking the card itself selects the model and scopes the **AI Assistant** panel to it. > [!NOTE] > > The risk score is a measure of risk, where higher is worse. The category percentages beneath it are performance scores, where higher is better. A model with high category percentages therefore carries a low risk score. See [how a risk score is calculated](/guard/app/risk-profiles#understand-how-a-risk-score-is-calculated). The buttons at the top right of the section switch between three views: * **Cards** – one card per model, ranked by the sort you choose. * **Radar** – all models on a single chart, each drawn as a polygon across the profile's categories on a 0 to 100 scale. * **Bars** – one bar per model for the metric you pick from the **Metric** list, either the overall risk score or one of the profile's categories. Bar color reflects the model's risk level. To hide a model from the dashboard, use **Hide from dashboard** on its card or click its name below the radar chart. It stays hidden in later sessions. A count of hidden models and **Show all** then appear beside the view buttons. ## Ask the AI assistant The floating button opens the **AI Assistant** panel. It is available on the Home page and on an examination's results. Clicking a model's card, or its bar in a chart, scopes the assistant to that model. The panel header then shows what it is scoped to, with a chip per model and **Clear** to reset the selection. The `{}` button clears the conversation. ## Use the navigation sidebar The sidebar sections, in order, are: | Section | Purpose | | - | - | | **Home** | Review model risk under a profile and open quick-start tasks. | | **Chat** | Talk to a model and evaluate its responses inline. | | **Risk Profiles** | Create and manage weighted sets of risk categories. | | **Risk Categories** | Define the individual risk dimensions used by profiles. | | **Examinations** | Create and review batch evaluations. | | **Comparisons** | Score one response with several evaluators and judge models. | | **Evaluators** | Browse the evaluator library and create custom evaluators. | | **Datasets** | Upload and manage test datasets. | | **AI-Ready Data** | Generate evaluation datasets from source documents. | | **Models** | Register and manage models. | # Create risk categories Source: https://docs.seekr.com/guard/app/risk-categories Define the risk dimensions that risk profiles weigh. A risk category is a named risk dimension, such as factual accuracy, built by pairing one or more [evaluators](/guard/app/evaluators) with the datasets they run against. Its aggregation method combines those scores into one category score, which a [risk profile](/guard/app/risk-profiles) then weights. ## Create a risk category **1. Create New Category** On the **Risk Categories** page, click **Create New Category**. **2. Create New Risk Category** * **Name** – required. * **Description** – required. What the category measures. * **Aggregation Method** – how the category combines its evaluators' scores: weighted average, minimum, maximum, median, or harmonic mean. The default is weighted average. * **Critical Threshold (optional)** – a score below which the category triggers high risk. * **Tags (comma-separated)** – optional labels for organizing categories. Click **Create Category**. ## Manage your risk categories The **Risk Categories** table shows one row per category, with **Category Name**, **Description**, **Evaluators**, **Aggregation**, **Datasets**, **Used In Profiles**, **Visibility**, and **Actions**. Categories SeekrGuard provides carry a **System** badge, and each category's tags appear under its name. Above the table, search by name, narrow the list with **Filter**, and filter by **Visibility**. Each row's **Actions** menu offers **Edit**. ## Pair evaluators with datasets Editing a category opens its **Evaluation Canvas**, where you decide what the category actually measures. Drag a dataset from **Datasets** onto the canvas, then drag evaluators from **Evaluators** onto that dataset. Each pairing scores those evaluators against that dataset, and the category's aggregation method combines the results into one score. **Table View** shows the same pairings as a grid. You can also change the category's **Description**, **Aggregation Method**, and **Visibility** from this page. Click **Save Changes** to keep them. # Build risk profiles Source: https://docs.seekr.com/guard/app/risk-profiles Turn evaluation scores into a weighted risk assessment. Risk profiles turn raw evaluation scores into one risk assessment per model. A risk category is a named risk dimension backed by evaluators scoped to datasets, and a profile is a weighted set of categories tuned for a use case. Scoring a profile against a model produces an overall risk score and risk level. ## Before you start You need: * At least one [risk category](/guard/app/risk-categories) to weigh. * Evaluation results for that category's evaluators, produced by running them against datasets, usually through an [examination](/guard/app/examinations). A category's score comes from stored evaluation results, so a profile built on categories that have never been evaluated produces nothing to score. ## Create a risk profile **1. Create New Profile** On the **Risk Profiles** page, click **Create New Profile**. To change an existing profile, click its card. **2. Describe the profile** In the **Profile** panel, set the **Name**, **Description**, **Use Case**, **Domain**, and **Method**. **Domain** offers government, healthcare, finance, and education. The **Active** toggle controls whether the profile is available for scoring. **3. Add categories and weights** Drag categories from **Categories** onto the **Profile Canvas**. Each card shows that category's aggregation method and evaluator count, and takes a **Weight** as a percentage. **Auto-Balance** distributes the weights evenly, and **Table View** shows the same categories as a grid. **4. Save Changes** Click **Save Changes**. On the **Risk Profiles** page, profiles appear as cards showing the use case, domain, category count, a weight-distribution bar, tags, and the date modified. Profiles SeekrGuard provides carry a **System** badge. Each card's menu offers **Edit** and **Duplicate**. **Delete** appears only on profiles you created. Above the cards, search by name, narrow the list with **Filter**, and filter by **Visibility**. ## Understand how a risk score is calculated When a profile is scored against a model, SeekrGuard works bottom-up: 1. **Normalize each evaluator.** Each evaluation's score is scaled to a 0 to 1 range, `(score - min) / (max - min)`. For evaluators whose [polarity](/guard/glossary#polarity) is not positive, the value is inverted, so that higher means better at this stage. 2. **Score each category.** A category combines its evaluator and dataset pairings using its aggregation method. 3. **Aggregate to an overall score.** The profile's method combines the category scores by weight, then the result is inverted so that a higher score means more risk. A category with no evaluation results is left out of the calculation rather than counted as zero. A model assessed on two of a profile's five categories is scored on those two, so scores are comparable only between models with the same coverage. The overall score appears on a 0 to 100 scale and maps to a risk level. | Risk score | Risk level | | - | - | | ≤ 40 | low | | ≤ 60 | medium | | ≤ 80 | high | | > 80 | critical | > [!NOTE] > > On the risk pages a higher score means more risk. The composite on a [model card](/guard/app/models) measures the same evaluations in reverse, where higher is better and 80 or above reads strong. ## Read model risk scores Per-model risk scores appear in the **Model Risk Assessment** section of the [Home page](/guard/app/navigate), where you select the profile to score against, and on each [model card](/guard/app/models), where you pick a profile in its scorecard. The model card breaks the score down by category, dataset, and evaluator under its **Risk Performance**, **Compare**, and **Explore** tabs. > [!NOTE] > > Risk scores come from stored evaluation results. If a profile's categories have no evaluations behind them, there is nothing to score. Run the evaluators against their datasets first, usually through an [examination](/guard/app/examinations). # Release notes – 2026 Source: https://docs.seekr.com/guard/changelog/2026 **September 2, 2026** ## AI-Ready Data is available in beta Generate evaluation datasets from your own source documents. Upload up to 10 PDF, Word, Markdown, or JSON files, describe what they contain and what should be generated from them, and track the generation as a job. A generated file appears in Seekr, ready to add as a dataset. This feature is in beta. Review a generated dataset before you use it in an examination. See [Generate AI-ready data](/guard/app/ai-ready-data). **August 31, 2026** ## SeekrGuard is available Evaluate the safety, quality, and risk of models against data you provide, scored with criteria you define. Register models from OpenAI or Seekr, upload datasets from a file, HuggingFace, or Seekr, and score outputs with the evaluator library or your own LLM-as-a-Judge evaluators. Run examinations across all or part of a dataset, compare a single response across judge models, or chat with a model and score its answers inline. Weight risk categories into a risk profile to turn those scores into a risk rating per model. See [What is SeekrGuard](/guard/what-is-seekrguard). # Core concepts Source: https://docs.seekr.com/guard/concepts How SeekrGuard's models, datasets, evaluators, examinations, and risk profiles fit together. SeekrGuard measures how a model behaves on your data, using criteria you define. A model, a dataset, and an evaluator combine into an examination, and its scores roll up through risk categories into a profile that rates the model's risk. For the precise definition of any term, see the [glossary](/guard/glossary). ```mermaid theme={null} flowchart LR Model --> Examination Dataset --> Examination Evaluator --> Examination Examination --> Scores["Stored scores"] Scores --> Category["Risk category"] Category --> Profile["Risk profile"] Profile --> Result["Risk score and level"] Model --> Spot["Comparison or chat"] Evaluator --> Spot Spot --> Immediate["Scores you read directly"] ``` ## Provide inputs An evaluation draws on three inputs: * **[Model](/guard/glossary#model)** – the model under test, such as GPT-4 or Llama, registered from a provider. See [Register and manage models](/guard/app/models). * **[Dataset](/guard/glossary#dataset)** – the inputs you run the model on, optionally with expected answers. See [Add and manage datasets](/guard/app/datasets). * **[Evaluator](/guard/glossary#evaluator)** – a scorer that grades each output on one dimension, such as accuracy, toxicity, or relevance. See [Create evaluators](/guard/app/evaluators). These inputs depend on one another. Each evaluator declares the dataset fields it needs, such as a user question, a context passage, or an expected answer, so it can run only on a dataset that supplies those fields and against outputs a model has produced. ## Run evaluations You put the inputs to work in two ways: * **[Examination](/guard/glossary#examination)** – a batch run that scores one or more models across all or part of a dataset and reports aggregated results. See [Run examinations](/guard/app/examinations). * **[Comparison](/guard/glossary#comparison)** – a focused check that scores a single response with several evaluators and judge models at once. See [Run comparisons](/guard/app/comparisons). * **[Chat](/guard/app/chat)** – talk to a model directly and score any response on the spot. Use an examination for systematic vetting, a comparison for a quick side-by-side look, and chat for probing a model as you go. Only examination results are stored for risk scoring. Comparison and chat scores are read where they appear and go no further. ## Assess risks Individual evaluator scores become useful once they combine into a single, weighted measure of risk: * **[Risk category](/guard/glossary#risk-category)** – a named dimension, such as factual accuracy, backed by one or more evaluators paired with the datasets they run against. See [Create risk categories](/guard/app/risk-categories). * **[Risk profile](/guard/glossary#risk-profile)** – a weighted combination of risk categories for a specific use case. See [Build risk profiles](/guard/app/risk-profiles). * **[Risk score](/guard/glossary#risk-score)** and **[risk level](/guard/glossary#risk-level)** – scoring a profile against a model yields a score from 0 to 100, where higher means more risk, rated from low to critical. For exactly how scores are normalized, weighted, and combined, see [how a risk score is calculated](/guard/app/risk-profiles#understand-how-a-risk-score-is-calculated). # Glossary Source: https://docs.seekr.com/guard/glossary Definitions of the terms used across SeekrGuard. Each entry defines a SeekrGuard term and links to the guide where it is used in depth. **Jump to:** [A](#a) · [B](#b) · [C](#c) · [D](#d) · [E](#e) · [J](#j) · [L](#l) · [M](#m) · [P](#p) · [R](#r) · [S](#s) · [T](#t) · [U](#u) · [V](#v) ## A **aggregation method** – how a risk category combines its evaluators' scores into a single category score, such as a weighted average. Distinct from the method a risk profile uses to combine its categories. See [Build risk profiles](/guard/app/risk-profiles). **AI-Ready Data** – the generation of an evaluation dataset from source documents you upload, described by a data generation plan. Each generation runs as a job with its own state and phase. See [Generate AI-ready data](/guard/app/ai-ready-data). **Assistant Message** – the message template that holds an [expected output](/guard/glossary#expected-output). [↑ Back to top](/guard/glossary) ## B **BLEU** – a metric that scores how much of a model's output matches the expected output, counting runs of consecutive words. Higher scores mean the output stays closer to the reference wording. See [Create evaluators](/guard/app/evaluators). [↑ Back to top](/guard/glossary) ## C **Chat History** – the message template that holds [conversation history](/guard/glossary#conversation-history). **comparison** – a scoring of a single response by several evaluators and judge models, shown as a grid. By contrast, an examination runs over a dataset. See [Run comparisons](/guard/app/comparisons). **Context** – the message template that holds a [context input](/guard/glossary#context-input). **context input** – background or retrieved material supplied alongside the user's question, used in retrieval-augmented generation (RAG). When you upload a dataset, you map it to the **Context** template. See [Add and manage datasets](/guard/app/datasets). **conversation history** – prior turns of a multi-turn conversation included with an input. When you upload a dataset, you map it to the **Chat History** template. See [Add and manage datasets](/guard/app/datasets). [↑ Back to top](/guard/glossary) ## D **dataset** – a collection of test inputs, and optionally expected answers, that you test models on. Each input can include a system prompt, user question, context, conversation history, and expected output. See [Add and manage datasets](/guard/app/datasets). [↑ Back to top](/guard/glossary) ## E **evaluator** – a scorer that grades a model's output on one dimension, such as accuracy, toxicity, or relevance. There are three types: LLM-as-a-Judge, rule-based, and statistical. See [Create evaluators](/guard/app/evaluators). **examination** – a batch run that scores one or more models on a dataset using one or more evaluators, then reports aggregated statistics, per-row scores, and charts. A run is queued, then in progress, then completed or failed. See [Run examinations](/guard/app/examinations). **expected output** – the reference or ground-truth answer for an input, which evaluators compare the model's output against, using methods such as exact match, BLEU, or ROUGE. When you upload a dataset, you map it to the **Assistant Message** template. See [Add and manage datasets](/guard/app/datasets). [↑ Back to top](/guard/glossary) ## J **judge model** – a model that scores a response rather than producing one. An LLM-as-a-Judge evaluator supplies the criteria and a judge model applies them. In an examination you choose judge models for each evaluator; in a comparison you choose them in **Judge Models**. See [Run comparisons](/guard/app/comparisons). [↑ Back to top](/guard/glossary) ## L **LLM-as-a-Judge** – an evaluator you create that uses one or more other LLMs to score a model's output against your criteria. You pick those models when you add it to an examination. See [Create evaluators](/guard/app/evaluators). [↑ Back to top](/guard/glossary) ## M **max tokens** – the maximum length, in tokens, of a model's response. On the Chat page, you can set it between 128 and 4096. See [Chat with a model](/guard/app/chat). **memory** – on the Chat page, the **Use conversation history** toggle. When on, the model sees all previous messages in the conversation. When off, each message is independent. See [Chat with a model](/guard/app/chat). **method (risk profile)** – how a risk profile combines its category scores into an overall risk score: weighted linear, with penalties, or multiplicative. See [Build risk profiles](/guard/app/risk-profiles). **model** – a model you register in SeekrGuard from a provider, such as GPT-4 or Llama. Its type is foundational or fine-tuned, and its status is active, queued, or inactive. See [Register and manage models](/guard/app/models). **model card** – a model's profile page showing its details, a risk scorecard for a risk profile you select, and analysis tabs. See [Register and manage models](/guard/app/models). [↑ Back to top](/guard/glossary) ## P **polarity** – a property of an evaluator's scoring scale that indicates which direction is better. Positive means higher scores are better outcomes; negative means higher scores are worse. When scores are combined into risk, negative-polarity ones are flipped so that higher always means more risk. See [Create evaluators](/guard/app/evaluators). **provider** – the source of a model. When you register models you choose **OpenAI** or **Seekr**, which determines the models available to add. In the model list, the **Provider** column shows the organization each model came from, such as Google or Seekr. See [Register and manage models](/guard/app/models). [↑ Back to top](/guard/glossary) ## R **risk category** – a named risk dimension, such as factual accuracy, built by pairing one or more evaluators with the datasets they run against. Its aggregation method combines those scores into one category score, which a risk profile then weights. See [Build risk profiles](/guard/app/risk-profiles). **risk level** – how a model's risk score is rated, from least to most risk: low, medium, high, or critical. In the **Model Risk Assessment** section of the Home page, it appears as a badge on each model's card and as a filter above them. See [Build risk profiles](/guard/app/risk-profiles). **risk profile** – a weighted set of risk categories for a particular use case, which produces an overall risk score and risk level for each model. A profile can be marked active, and the **Model Risk Assessment** section on the Home page scores models against an active profile you select. See [Build risk profiles](/guard/app/risk-profiles). **risk score** – a model's overall risk under a risk profile, on a 0–100 scale where higher means more risk. It maps to a risk level and appears on each model's card in the **Model Risk Assessment** section of the Home page. See [Build risk profiles](/guard/app/risk-profiles). **ROUGE** – a metric that scores how much of the expected output a model's response covers. Higher scores mean more of the reference wording appears in the output. See [Create evaluators](/guard/app/evaluators). **rule-based evaluator** – an evaluator that applies fixed rules, such as pattern or constraint checks. Provided by SeekrGuard, with a **Default** badge under **Created By** in the evaluator library. See [Create evaluators](/guard/app/evaluators). [↑ Back to top](/guard/glossary) ## S **sample selection** – the portion of a dataset an examination processes. When you create an examination, set it in the **Sample Selection** control as a percentage of the dataset or a number of samples; the control shows how many of the total samples will be used. See [Run examinations](/guard/app/examinations). **scoring scale** – the range of scores an evaluator can produce, set by its **Minimum**, **Maximum**, and **Step**, along with its polarity. When you create an LLM-as-a-Judge evaluator, you define it in the configuration step. See [Create evaluators](/guard/app/evaluators). **statistical evaluator** – an evaluator that computes a metric, such as ROUGE, BLEU, or exact match, usually against an expected output. Provided by SeekrGuard, with a **Default** badge under **Created By** in the evaluator library. See [Create evaluators](/guard/app/evaluators). **System Message** – the message template that holds a [system prompt](/guard/glossary#system-prompt). **system prompt** – an instruction that guides a model's behavior, such as *You are a helpful assistant.* When you upload a dataset, you map it to the **System Message** template. On the Chat page, **System Prompt** is one of the generation settings. See [Add and manage datasets](/guard/app/datasets) and [Chat with a model](/guard/app/chat). [↑ Back to top](/guard/glossary) ## T **temperature** – a generation setting that controls randomness in a model's responses: lower is more deterministic, higher is more varied. On the Chat page, you can set it between 0 and 1. See [Chat with a model](/guard/app/chat). [↑ Back to top](/guard/glossary) ## U **user input** – the user's question or query in a dataset input. When you upload a dataset, you map it to the **User Message** template. An evaluator that requires a user input can only run against datasets that supply one. See [Add and manage datasets](/guard/app/datasets). **User Message** – the message template that holds a [user input](/guard/glossary#user-input). [↑ Back to top](/guard/glossary) ## V **visibility** – who can see and edit a resource: * **Private** – only you. * **Public (view only)** – everyone can see it, but no one else can edit it. * **Public (collaborative)** – everyone can see it, and others can edit it. See [Build risk profiles](/guard/app/risk-profiles). [↑ Back to top](/guard/glossary) # What is SeekrGuard Source: https://docs.seekr.com/guard/what-is-seekrguard An overview of SeekrGuard and the workflow for evaluating AI model safety, quality, and risk. SeekrGuard is a platform for evaluating the safety, quality, and risk of models. It gives reviewers and engineers a shared, evidence-based measure of how a model behaves on data you provide, scored with methods you define and combined into an overall risk assessment. Use SeekrGuard to determine whether a model meets your requirements for a specific use case and to compare models against one another on the same criteria. ## The evaluation workflow Most evaluations follow the sequence below, though not every step is required for every review. A quick check might end after an examination, while a formal assessment uses the full sequence. **1. Register a model** Add the models you want to evaluate from a provider. See [Register and manage models](/guard/app/models). **2. Add a dataset** Upload the test inputs to evaluate against, from a file, HuggingFace, or Seekr, and map the dataset's columns. See [Add and manage datasets](/guard/app/datasets). **3. Choose or build evaluators** Select evaluators from the library, or create a custom LLM-as-a-Judge evaluator. See [Create evaluators](/guard/app/evaluators). **4. Run an examination** Combine the dataset, models, and evaluators into a single batch run. SeekrGuard manages the run and reports the scores. See [Run examinations](/guard/app/examinations). **5. Review the results** Review the results across four tabs: model performance, sample responses, interactive analysis, and agentic assessment. **6. Build risk categories and a profile** Optionally, define [risk categories](/guard/app/risk-categories) and weight them into a [risk profile](/guard/app/risk-profiles) to convert raw scores into an overall risk score and risk level for each model. SeekrGuard also provides two supporting tools. Use the [Chat](/guard/app/chat) page to interact with a model and evaluate a response inline. Use the [Comparisons](/guard/app/comparisons) page to score a single response across several models at once. ## Next steps > [card] [Navigate the app](/guard/app/navigate) > > The sidebar layout and the Home page. > [card] [Core concepts](/guard/concepts) > > The building blocks you work with in SeekrGuard. > [card] [Glossary](/guard/glossary) > > Definitions of the domain terms used throughout. # SeekrFlow Self-Managed architecture Source: https://docs.seekr.com/self-managed/flow/architecture What runs in your cluster, what you provision around it, and how the pieces connect. A self-managed deployment runs the SeekrFlow platform in your Kubernetes cluster and keeps its data in services you provision alongside it. Users and API clients reach it through a single hostname. ```mermaid theme={null} flowchart LR users([Users and API clients]) --> ingress[Ingress controller
and load balancer] subgraph env [Your environment] subgraph cluster [Kubernetes cluster] platform[SeekrFlow platform
services] gpu[GPU nodes
model servers and
training jobs] platform --> gpu end subgraph data [Services you provision] pg[(PostgreSQL)] obj[(Object storage)] fs[(Shared file storage)] end ingress --> platform platform --> pg gpu --> obj gpu --> fs end registry[Seekr artifact
registry] -.->|container images| cluster platform -.->|optional| external[Amazon Bedrock] ``` ## How it works * **Installation** – Helm installs the SeekrFlow operator. The operator reads your values file, creates the platform services, model servers, agents, and tools, and keeps them matched to your configuration. The operator, not Helm, owns most SeekrFlow pods. * **Access** – Users and API clients reach SeekrFlow through the ingress hostname. The authentication service validates every request. * **Capabilities** – The platform services provide the web interface and API, agents and custom functions, fine-tuning and dataset preparation, inference, and explainability. * **Inference** – The inference router sends each request to a model server on your GPU nodes, or to Amazon Bedrock for externally hosted models. Model servers cache their weights on shared file storage. * **Training and data preparation** – Fine-tuning, alignment, and file ingestion run as jobs through Argo Workflows, on GPU and CPU nodes. * **Data** – PostgreSQL stores service data. Your object storage holds datasets, model artifacts, and fine-tuning checkpoints. Retrieval-augmented generation uses OpenSearch. * **Licensing** – Services don't report ready until the License service confirms a valid license key. The license also sets a ceiling on the number of GPUs SeekrFlow workloads can request across the cluster. ## Services in a deployment ### Services you provide Which services fill each role depends on where you deploy SeekrFlow. Select your environment. > [tab] Amazon Web Services (AWS) > > | Role | Service | Purpose | > | - | - | - | > | Kubernetes | Amazon Elastic Kubernetes Service (Amazon EKS) | Runs the SeekrFlow platform. | > | PostgreSQL | Amazon Relational Database Service (Amazon RDS) or Amazon Aurora | Stores service data. | > | Object storage | Amazon Simple Storage Service (Amazon S3) | Stores datasets, model artifacts, and checkpoints. | > | Shared file storage | Amazon Elastic File System (Amazon EFS) | Caches model weights for GPU nodes. | > | OpenSearch | Amazon OpenSearch Service | Stores the search indexes for file search and retrieval-augmented generation. | > | Ingress | Application Load Balancer | Routes traffic to the platform. | > | Cloud identity | Amazon EKS Pod Identity or AWS Identity and Access Management (IAM) roles for service accounts | Authenticates pods to cloud services. | > | Secret store (optional) | AWS Secrets Manager or AWS Systems Manager Parameter Store | Holds credentials outside the cluster. | > | External models (optional) | Amazon Bedrock | Serves inference alongside your GPU nodes. | > [tab] On-premises > > | Role | Service | Purpose | > | - | - | - | > | Kubernetes | Your own Kubernetes cluster | Runs the SeekrFlow platform. | > | PostgreSQL | PostgreSQL you provide | Stores service data. | > | Object storage | An S3-compatible store, such as MinIO | Stores datasets, model artifacts, and checkpoints. | > | Shared file storage | Network File System (NFS) or Longhorn | Caches model weights for GPU nodes. | > | OpenSearch | Deployed in the cluster by the chart | Stores the search indexes for file search and retrieval-augmented generation. | > | Ingress | NGINX or Traefik | Routes traffic to the platform. | > | Object storage credentials | Static keys in a Kubernetes secret | Authenticates pods to your object store. | ### Components the chart deploys | Component | Purpose | | - | - | | Argo Workflows | Runs fine-tuning, alignment, and ingestion jobs. | | MLflow | Tracks experiments and provides a model registry. | | Keycloak (optional) | Brokers single sign-on with your identity provider. Off by default. | | Valkey (optional) | Caches sign-in and inference data. Sign-in rate limiting depends on it. Off by default. | | JobSet (optional) | Runs multi-node fine-tuning. Off by default. | # Release notes – 2025 Source: https://docs.seekr.com/self-managed/flow/changelog/2025 **December 19, 2025** Version 4.2026.0 ## Self-hosted reaches feature parity with Seekr-managed Improvement Supported on UI API SDK This release brings self-hosted SeekrFlow to feature parity with Seekr-managed deployments, adding explainability, agent, fine-tuning, and ingestion capabilities to self-hosted environments. **Explainability** * Context attribution traces model responses to the retrieved context that informed them. * Data attribution links inference outputs to contributing training data. > [!NOTE] > > Logfire-based tracing is not available in self-hosted deployments. **Agents** * Tool Library v2 with expanded tool management. * Multi-agent orchestration is now generally available for coordinating agents across tools and tasks. **Fine-tuning** * Vision-language fine-tuning for supported vision models. * Reinforcement-tuning reward functions for controlling which behaviors are reinforced during training. **Ingestion** * Ingestion insights surface job status and failure diagnostics for ingestion pipelines. **Platform** * vLLM upgrade (0.19.0) on ROCm for improved inference on AMD GPUs. * Chainguard-based container images for a hardened, minimal-CVE deployment footprint. **September 30, 2025** Version 4.x.x ## Initial self-hosted release of SeekrFlow Feature Supported on UI API SDK First self-hosted release of SeekrFlow, bringing the platform to customer-managed environments with fine-tuning, inference, agent, and ingestion capabilities. **Agents** * Docstring validation for improved agent runtime performance. **Fine-tuning** * Reinforcement tuning (GRPO). **Ingestion** * Faster ingestion with pipeline performance improvements. **AI-ready data** * Quality improvements to principle alignment. **Inference** * vLLM upgrade (0.11.1). * Expanded selection of supported models. **Authentication** * Authentication support for custom solutions. # Release notes – 2026 Source: https://docs.seekr.com/self-managed/flow/changelog/2026 **October 16, 2026** Version 2026.9.0 ## Teams, single sign-on, GPU selection, and database backup ### Role-based access control Users can now work together in teams. Agents, fine-tuning jobs, deployments, files, and vector databases belong to a team, and every member of the team can use them based on their role. * **Organization** – The top-level container for every user, team, and resource in your deployment. * **Teams** – Groups of users who share resources. Users can belong to more than one team and switch between them. * **Roles** – Organizations have Owner and Member roles. Teams have Admin and Creator roles. Each user also gets a personal workspace that only they can see. The upgrade moves each existing user's resources into their personal workspace. For details, see [Role-based access control](/flow/role-based-access-control). ### Organization setup and single sign-on for `sfe` `sfe org setup` creates the first administrator and your organization in one step. If your deployment uses Keycloak, it also creates the Keycloak realm and binds it to the organization. New users who sign in through single sign-on then join that organization. `sfe org setup` can also create a break-glass administrator for signing in when single sign-on is unavailable. Administrators can sign in to `sfe` with their single sign-on account using `sfe org login`. For steps, see [Create the first SeekrFlow administrator](/self-managed/flow/deploy/admin). ### GPU selection for fine-tuning You can now choose which GPU types fine-tuning jobs run on. Set the types in your values file, then label your GPU nodes to match. For steps, see [Create the SeekrFlow values file](/self-managed/flow/prepare/values-file). ### Database backup and restore You can now back up every SeekrFlow database with `sfe db backup` and restore it with `sfe db restore`. Reverting an upgrade doesn't undo its database changes. Restoring a backup does. For steps, see [Revert a SeekrFlow upgrade](/self-managed/flow/operate/revert-upgrade). ### Upgrade considerations * **Back up your databases first** – The upgrade changes the database schema and moves stored files to team locations, which can take hours for a large file store. * **Use `sfe` 3.7.0 or later** – Backup, restore, `sfe org setup`, and `sfe org login` need it. * **Expect agents to be briefly unavailable** – Agents are unavailable while their database migrates. * **Label your GPU nodes** – Fine-tuning jobs stay pending until their nodes carry `seekr.io/gpu_type`, or until `global.gpu.nodeSelectorKey` names your nodes' existing label. * **Tools and AI-Ready Data now deploy by default** – Set `enabled: false` for any you don't want. File search needs OpenSearch, and web search needs a Brave Search API key. * **Enable `sfe` sign-in on existing realms** – Run `sfe org sso setup --reconcile`. * **Remove `Explainability.images.runner`** – If your values file sets it, remove it. The image no longer exists. **July 17, 2026** Version 6.2026.0 ## Serve inference through AWS Bedrock and Azure AI Foundry Supported on UI API SDK Cloud service provider inference adds support for Azure AI Foundry, alongside AWS Bedrock. **April 22, 2026** Version 5.2.5 ## AWS Bedrock support extended to ingestion pipelines Supported on UI API SDK SeekrFlow ingestion pipelines now support AWS Bedrock for embedding generation and PDF-to-Markdown conversion. * Embedding generation for vector databases and RAG workflows can now run on AWS Bedrock. * PDF-to-Markdown conversion uses Bedrock-compatible vision models, supporting AI-ready data jobs for synthetic dataset generation and downstream fine-tuning. * Using a `bedrock:`-prefixed model automatically routes embedding requests to AWS Bedrock. * Vector databases created with Bedrock models use Titan embeddings for indexing and retrieval. **March 12, 2026** Version 5.2.5 ## Self-hosted platform update Supported on UI API SDK This update expands platform availability and adds new capabilities across agents, orchestration, and deployment environments. **New platform support** SeekrFlow now supports Oracle Cloud Infrastructure (OCI). Organizations can deploy SeekrFlow on OCI environments running NVIDIA GPUs, expanding deployment options for customers with Oracle cloud infrastructure requirements. OCI support currently includes: * SeekrFlow UI * SeekrFlow API **Agents** * Tool Library support for agents * Multi-Agentic Orchestration (Beta) — agents can coordinate across multiple tools and tasks **Platform** * OCI deployment support via Helm * vLLM upgrade improving inference performance on NVIDIA GPUs **February 2026** Version 5.0.X ## Self-hosted platform update Improvement Updates for self-hosted SeekrFlow deployments on AWS, AWS GovCloud, and Appliance environments. **Agents and inference:** * AWS Bedrock inference support for agents with cloud service provider-hosted inference * Full agent execution including tools, streaming, and promotion/demotion workflows * Multi-LoRA inference with hot loading * `vLLM` upgrade for improved performance and stability * CSP inference routing to Bedrock endpoints based on region and model availability **Fine-tuning:** * LoRA support for reinforcement (GRPO) and instruction fine-tuning (NVIDIA-based) **Explainability:** * Inference-time data attribution **UI and documentation:** * Dark mode support * Documentation updates covering new inference, agent, and fine-tuning capabilities ## AWS Bedrock inference for agents Feature Supported on UI API SDK AWS Bedrock inference support for SeekrFlow Agents, providing an alternative to Seekr-hosted GPU inference. Agents can now use `Claude 4.5` via AWS Bedrock for all intra-agent inference (planner, executor, evaluator, summarizer). **Capabilities:** * Full end-to-end agent execution including Agent Chat in the UI, streaming and non-streaming runs, and multi-tool execution * Bedrock models appear in existing agent model-selection UI * Configure at deploy time via Helm (EKS-only) * Deployments select either Bedrock inference or Seekr-hosted GPU inference **Current limitations:** * Agents only (Model Chat is disabled when Bedrock is enabled) * File search and vector-backed retrieval not yet supported for Bedrock agents * Reasoning and speed optimization parameters are ignored to ensure consistent execution # Create the first SeekrFlow administrator Source: https://docs.seekr.com/self-managed/flow/deploy/admin Create the administrator and organization for a new SeekrFlow deployment, before anyone signs in. A new deployment has no accounts. Create the first administrator, who owns your organization. > [!WARNING] > > Don't sign in to SeekrFlow until you finish this page. The first account to exist closes the step that creates an administrator. If someone signs in first, `sfe org setup` can recover with `--recover-admin`, but it's simpler to avoid. > [tab] With the sfe CLI > > `sfe` creates the administrator, the organization, and a break-glass administrator: a password account for signing in when single sign-on is unavailable. It names the organization from `Auth.organization.name` in your values file. > > **1. Preview the setup** > > Replace `` with the administrator's address, and `` with a different address in your organization's domain. Without single sign-on, include `--skip-realm`: > > ```bash theme={null} > sfe org setup --admin --break-glass --skip-realm -p -r --dry-run > ``` > > The command reports what it would create, and changes nothing. If you leave out `--break-glass`, it uses `breakglass@seekr.com`. > > **2. Create the administrator** > > Run the same command with `--yes` instead of `--dry-run`: > > ```bash theme={null} > sfe org setup --admin --break-glass --skip-realm -p -r --yes > ``` > > `sfe` asks for the administrator's password, which must be at least 8 characters. It runs the setup as a job inside the cluster. You don't need the Domain Name System (DNS) record yet. > > **3. Store the two credentials** > > `sfe` prints two values once: > > * **Admin token** – Lets `sfe` act as the administrator. It expires after 7 days. Before then, replace it with `sfe org token rotate`. > * **Break-glass password** – The password for the break-glass administrator. Never sign in to the UI through single sign-on with the break-glass address, which ends its password. > > Store both in your password manager or secret store before you continue. You can't display them again. > [tab] Without the sfe CLI > > Create the administrator with the Auth service's bootstrap endpoint. It's reachable only from inside the cluster, and it closes after the first account exists. Replace `` and `` with the administrator's address and password: > > ```bash theme={null} > kubectl run bootstrap --rm -it --restart=Never --namespace seekrflow \ > --image=curlimages/curl -- \ > curl http://seekrflow-auth.seekrflow.svc.cluster.local:8003/v1/internal/auth/bootstrap \ > -H 'Content-Type: application/json' \ > -d '{"email": "", "password": ""}' > ``` > > A `200` response means the endpoint created the administrator. A `409` response means an account already exists. The endpoint creates the administrator only. It doesn't create a break-glass administrator or set the organization's name. # Install SeekrFlow Source: https://docs.seekr.com/self-managed/flow/deploy/install Run preflight checks and install SeekrFlow with the sfe CLI or Helm. Install SeekrFlow from its chart, using the values file you prepared. Before you start, finish the steps in [Prepare to install](/self-managed/flow/prepare/sfe-cli). Your values file must be complete, and its secrets and databases must exist. > [!WARNING] > > Kustomize isn't supported. Install and upgrade SeekrFlow with Helm or `sfe` directly. Applying the chart through Kustomize can cause SeekrFlow to delete its own resources. > [tab] With the sfe CLI > > **1. Run preflight** > > ```bash theme={null} > sfe preflight -p -r > ``` > > Preflight checks that your cluster and cloud resources are ready, such as cloud identity, storage, secrets, PostgreSQL, OpenSearch, and GPUs. `sfe install` doesn't run it for you. > > If SeekrFlow creates its own ingress on Amazon Web Services (AWS), the `dns` check fails on a first install. You create that Domain Name System (DNS) record after install, once the load balancer exists. Checks that can't run before install, such as `storage` and `models`, show as skipped. Fix any other failure before you continue. > > **2. Install** > > ```bash theme={null} > sfe install -p -r > ``` > > `sfe` downloads the chart for the release and installs it. To see what it would install without changing anything, add `--dry-run`. > > **3. Let the catalog sync pull its image** > > SeekrFlow loads its model catalog with a job that runs as the `seekrflow-operator` service account. That service account doesn't get your image pull secret. Add it: > > ```bash theme={null} > kubectl patch serviceaccount seekrflow-operator -n seekrflow \ > -p '{"imagePullSecrets":[{"name":"seekrflow-artifacts-pull-access"}]}' > ``` > > If the `seekrflow-model-sync` pod already shows `ImagePullBackOff`, delete the job and restart the operator, which runs the job again: > > ```bash theme={null} > kubectl delete job seekrflow-model-sync -n seekrflow > kubectl rollout restart deployment/seekrflow-operator -n seekrflow > ``` > [tab] Without the sfe CLI > > Use this path if you're experienced with Helm and Kubernetes, and you're building your own automation. > > **1. Download the chart** > > If you pulled the chart when you created the values file, skip this step. > > Sign in to Seekr's registry: > > ```bash theme={null} > echo "$REGISTRY_PASSWORD" | helm registry login seekr.repo.sonatype.app \ > --username "$REGISTRY_USERNAME" \ > --password-stdin > ``` > > Pull the chart and unpack it: > > ```bash theme={null} > helm pull oci://seekr.repo.sonatype.app/seekr-docker-release/seekr/flow-helm-chart --version > tar -xzf flow-helm-chart-.tgz > ``` > > **2. Install** > > From the folder that contains the unpacked chart, run: > > ```bash theme={null} > helm install seekrflow flow-helm-chart --namespace seekrflow -f my-values.yaml > ``` > > Helm reports the release as deployed. If the install fails, fix the values file and run `helm upgrade --install` with the same options. > > **3. Let the catalog sync pull its image** > > SeekrFlow loads its model catalog with a job that runs as the `seekrflow-operator` service account. That service account doesn't get your image pull secret. Add it: > > ```bash theme={null} > kubectl patch serviceaccount seekrflow-operator -n seekrflow \ > -p '{"imagePullSecrets":[{"name":"seekrflow-artifacts-pull-access"}]}' > ``` > > If the `seekrflow-model-sync` pod already shows `ImagePullBackOff`, delete the job and restart the operator, which runs the job again: > > ```bash theme={null} > kubectl delete job seekrflow-model-sync -n seekrflow > kubectl rollout restart deployment/seekrflow-operator -n seekrflow > ``` # Verify the SeekrFlow deployment Source: https://docs.seekr.com/self-managed/flow/deploy/verify Confirm SeekrFlow's resources came up healthy, and create the DNS record for its web address. Check that SeekrFlow came up healthy before you finish setup. Services can take several minutes to start, and model servers longer, while they download model weights. ## Check the deployment > [tab] With the sfe CLI > > **1. Check the resources** > > ```bash theme={null} > sfe resources status -p > ``` > > The command lists every SeekrFlow resource and its phase. > > **2. Compare the deployment with your values file** > > ```bash theme={null} > sfe verify -p -r > ``` > > The command reports any difference between what you configured and what's running. > [tab] Without the sfe CLI > > **1. Check the pods** > > ```bash theme={null} > kubectl get pods -n seekrflow > ``` > > Every pod should reach `Running`, with all its containers ready. > > **2. Check the services** > > ```bash theme={null} > kubectl get flowservices -n seekrflow > ``` > > The list shows the services the operator created and manages. ## Create the DNS record If SeekrFlow creates its own ingress on Amazon Web Services (AWS), create the Domain Name System (DNS) record for your hostname now. The load balancer exists only after install. Create the record before you sign in or set up single sign-on, because both use the hostname. See [Create the DNS record](/self-managed/flow/provision/networking#create-the-dns-record). ## If pods aren't running > [!NOTE] > > Check the License service first. Other services wait for it. A missing or invalid license key shows up as many stuck pods rather than one clear failure. > [tab] With the sfe CLI > > ```bash theme={null} > sfe resources describe / > sfe resources logs / > ``` > > SeekrFlow's images have no shell. To investigate inside a pod, attach a debug container: > > ```bash theme={null} > sfe resources debug / > ``` > [tab] Without the sfe CLI > > ```bash theme={null} > kubectl describe pod -n seekrflow > kubectl logs -n seekrflow > ``` > > The `Events` section at the end of the `describe` output usually names the problem. | Symptom | Cause | | - | - | | `ImagePullBackOff` | The image pull secret is missing. Check that it exists in both the `seekrflow` and `argo-workflows` namespaces. | | `CreateContainerConfigError` | A secret is missing. The pod's events name it. | | Most pods stuck, none obviously failing | The license key. Check the `seekrflow-license` secret first. | | The ingress has no address, and its events say `no certificate found for host` | The load balancer has no certificate for your hostname. In AWS Certificate Manager, check that the certificate is issued and covers the `global.ingress.host` value. | For more symptoms, see [Troubleshoot a deployment](/self-managed/flow/operate/troubleshoot). # What is SeekrFlow Self-Managed Source: https://docs.seekr.com/self-managed/flow/index Deploy and operate SeekrFlow in your own cloud or data center. SeekrFlow Self-Managed is the [SeekrFlow platform](/flow/what-is-seekrflow) deployed and managed in your own cloud account or data center. Your data, models, and credentials stay in your environment. You install, upgrade, and operate the deployment, and Seekr supplies the software, the license, and support. This guide covers installing and operating SeekrFlow in your own environment. The steps assume working knowledge of Kubernetes, Helm, and your cloud provider's identity and storage services. ## Deployment steps **1. Plan** Review security, confirm your environment meets the requirements, and size the compute your deployment needs. **2. Provision** Create the cluster, prepare GPU nodes and networking, create the database, search, and storage SeekrFlow depends on, then set up cloud identity and secret management, and collect your credentials and values. **3. Prepare to install** Set up the `sfe` CLI, generate the values file, add your models, and choose the model each service uses. Then connect cloud identity, create secrets, and connect PostgreSQL. **4. Deploy** Run preflight checks, install SeekrFlow, verify the deployment, and create the first administrator. ## Installation overview Before you install, Seekr gives you credentials for its artifact registry, which holds the Helm chart and container images, and the `sfe` command-line interface (CLI). SeekrFlow installs from the Helm chart, using a values file that describes your environment. If your environment has no outbound internet access, you first mirror the container images into your own registry. You can install with `sfe` or with Helm directly: | Method | Choose it when | What it handles for you | | - | - | - | | `sfe` CLI | You want the supported, automated path. This is the recommended method. | Generates the values file, sets up cloud identity, creates the databases, populates secrets, runs preflight checks, installs, and checks that the result matches your values file. | | Helm | You're experienced with Helm and Kubernetes, and you're building your own automation. Not recommended otherwise. | Installs and upgrades the chart. You create the databases, secrets, and cloud identity yourself. | Use `sfe` unless you need to control each step yourself. The Helm path has more manual steps and none of `sfe`'s checks. For how SeekrFlow runs once it's installed, see [Architecture](/self-managed/flow/architecture). For what the deployment connects to and what you are responsible for securing, see [Security considerations](/self-managed/flow/security). ## Supported deployment environments | Environment | Kubernetes service | Setup automated by `sfe` | Feature availability | | - | - | - | - | | Amazon Web Services (AWS) | Amazon Elastic Kubernetes Service (Amazon EKS) in commercial Regions and AWS GovCloud (US). | Cloud identity, secrets, and preflight checks. | All self-managed features, including external models through Amazon Bedrock. | | On-premises | A Kubernetes cluster in your own data center. | Secrets and preflight checks. Preflight cannot check storage or identity, which you verify yourself. | All self-managed features except external models. | Every environment follows the same deployment steps. What changes is which services fill each role, such as Amazon Simple Storage Service (Amazon S3) or an S3-compatible store for object storage. See [Architecture](/self-managed/flow/architecture). # Revert a SeekrFlow upgrade Source: https://docs.seekr.com/self-managed/flow/operate/revert-upgrade Roll SeekrFlow back to an earlier release revision and restore its databases. Reverting an upgrade rolls SeekrFlow back to an earlier revision of its release. A rollback restores that revision's chart and values, but changes the upgrade made to the databases stay. To undo those, restore the backup you took before you upgraded. See [Upgrade a SeekrFlow deployment](/self-managed/flow/operate/upgrade). Roll back the release first, then restore the databases. If you restore first, the newer release is still running, and it upgrades the restored databases again. > [!WARNING] > > Restoring the databases replaces them with the backup. Anything users created after the backup, such as accounts, agents, or files they uploaded, doesn't survive the restore. > [tab] With the sfe CLI > > **1. Find the revision** > > ```bash theme={null} > sfe releases -p > ``` > > The command lists each revision with its release version. Note the last revision that ran the version you're returning to. > > **2. Roll back the release** > > ```bash theme={null} > sfe rollback -p --to-revision > ``` > > `sfe` asks you to confirm. > > **3. Restore the databases** > > Check the backup and the plan first: > > ```bash theme={null} > sfe db restore ./backup- -p -r --in-cluster --dry-run > ``` > > Then restore: > > ```bash theme={null} > sfe db restore ./backup- -p -r --in-cluster > ``` > > `sfe` asks you to type the namespace to confirm. To skip the prompt, such as in a script, add `--yes`. It stops every SeekrFlow service, replaces each database from the backup, and starts the services again. If the restore stops partway, the services stay stopped. That keeps anything from writing to a partly restored database. Run the same command again, or start the services on the databases as they are with `sfe db restore --unquiesce -n seekrflow`. > > **4. Delete the migration jobs** > > ```bash theme={null} > kubectl delete jobs -l component=data-migration -n seekrflow > ``` > > A finished migration job left from the upgrade makes the next upgrade skip its migration. > [tab] Without the sfe CLI > > **1. Find the revision** > > ```bash theme={null} > helm history seekrflow --namespace seekrflow > ``` > > The command lists each revision with its chart version. Note the last revision that ran the version you're returning to. > > **2. Roll back the release** > > ```bash theme={null} > helm rollback seekrflow --namespace seekrflow > ``` > > **3. Restore the databases** > > Stop SeekrFlow's services, then restore each SeekrFlow database from the backup or snapshot you took before you upgraded, with your database's restore tools. Start the services again after you restore every database. > > **4. Delete the migration jobs** > > ```bash theme={null} > kubectl delete jobs -l component=data-migration -n seekrflow > ``` > > A finished migration job left from the upgrade makes the next upgrade skip its migration. ## Check the deployment Run the checks in [Verify the deployment](/self-managed/flow/deploy/verify). # Troubleshoot a SeekrFlow deployment Source: https://docs.seekr.com/self-managed/flow/operate/troubleshoot Symptoms during install, after install, and during upgrades, with their causes and fixes. Find your symptom in the table for when it happened. For anything not listed, see [Investigate a resource](#investigate-a-resource). ## During install | Symptom | Cause and fix | | - | - | | A pod shows `ImagePullBackOff` | The image pull secret is missing. Check that it exists in both the `seekrflow` and `argo-workflows` namespaces. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). | | `seekrflow-model-sync` shows `ImagePullBackOff` | The catalog sync job doesn't get your image pull secret. Add it to the `seekrflow-operator` service account. See [Install SeekrFlow](/self-managed/flow/deploy/install). | | A pod shows `CreateContainerConfigError` | A secret is missing. The pod's events name it. Store the secret, then apply it with `sfe upgrade -p `. | | Auth, Training, Ingestion, and other services never start, and `seekrflow-data-migration` shows `secret "hf-token" not found` | The data migration needs the `hf-token` secret, even if you don't download gated models. The services that own databases wait for the migration. Store the token, then run `sfe upgrade -p `. | | Most pods stuck, none obviously failing | Check the `seekrflow-license` secret first. Other services wait for the License service. A corrected key can take up to five minutes to take effect. | | A migration job stays `Pending` | The migration jobs have no tolerations. If every node has a taint, Kubernetes can't schedule them. Make at least one untainted node available. | | A volume stays `Pending` | The storage class in `global.SharedModelCache.storageClassName` doesn't exist. Create it, or set `global.SharedModelCache.createStorageClass` to `true`. | | An admission policy rejects pods, with a Kyverno or Gatekeeper error | Your policy engine is blocking SeekrFlow's security context. Allow user IDs `65532` and `1001`, and exempt the Argo server and the model catalog sync job. See [Set up networking and cluster policies](/self-managed/flow/provision/networking). | ## After install | Symptom | Cause and fix | | - | - | | The ingress has no address, and its events say `no certificate found for host` | The load balancer has no certificate for your hostname. In Amazon Web Services (AWS) Certificate Manager, check that the certificate's status is Issued and that it covers the `global.ingress.host` value. | | `ModelCatalogSynced` is `False`, with reason `SyncFailed` | The catalog sync started before the database was ready. Check the `seekrflow-model-sync` pod's logs, then load the catalog with `sfe models sync -p -r --yes`. | | Users can't choose models you expect | Check that `ModelCatalogSynced` is `True` with `sfe resources describe SeekrFlowEverywhere/seekrflow`. To compare the catalog with the database, run `sfe models verify -p -r `. | | The `brave-search-api-key` or `opensearch-credentials` external secret shows `SecretSyncedError`, with `AccessDeniedException` in its events | You didn't store this optional secret, and SeekrFlow can't search your secret store for it. If you don't use it, you can ignore the error. To use it, store it with `sfe secrets create -f my-values.yaml --secrets `, then run `sfe upgrade -p `. | | `sfe org setup` stops because the deployment has accounts but no administrator | Someone signed in before you created the administrator. Sign in to `sfe` as one of those accounts with `sfe org login`, then run `sfe org setup` again with `--recover-admin`. | ## During an upgrade If the upgrade's data migration stops, `sfe resources describe SeekrFlowEverywhere/seekrflow` shows a reason on the `DataMigrationComplete` or `RouterMigrationComplete` condition. Services that depend on the migration keep running on the previous version. | Reason | What to do | | - | - | | `SchemaFailed` | A database schema upgrade failed. Read the log of the init container the message names, fix the cause, then re-run the migration. | | `NotDispatchable` | SeekrFlow couldn't create the migration job. Fix the values the message names, then run `sfe upgrade` again. | | `AgentRollFailed` | Moving existing agents to the new version failed. SeekrFlow retries on its own. If it continues, contact Seekr support. | | `DuplicateAccounts` | Two accounts have email addresses that differ only in capitalization, linked to different single sign-on identities. The job's `dedupe-emails` log names them. Delete or change one of each pair, then re-run the migration. | | `NeedsReview` | The migration finished, but found data that needs review. Read the job's log and contact Seekr support. Don't delete the job until support has reviewed it. | | `SelfTeamConflict`, `SchemaNotReady`, or `Failed` | Read the job's log, and contact Seekr support. | SeekrFlow never re-runs a failed migration job on its own. To re-run one after you fix the cause, save its log, then delete the job. SeekrFlow starts a new one, which continues from where the previous one stopped: ```bash theme={null} kubectl logs job/ -n seekrflow --all-containers > -failed.log kubectl delete job -n seekrflow ``` ## Errors from sfe commands | Error | Cause and fix | | - | - | | `Missing Region` | Your machine has no default AWS Region. Set one with `aws configure set region `. | | `sfe db setup` asks for a Keycloak password, but you didn't enable Keycloak | Add `-r `. Without it, `sfe` can't tell whether you enabled Keycloak. | | `sfe images mirror` fails with `unauthorized` | Mirroring reads registry sign-ins from Docker's credentials file. Sign in with `docker login` to both registries. | | `sfe secrets create` fails after you enter every value | The `seekrflow` namespace doesn't exist. Create it, then run the command again. See [Create the namespaces](/self-managed/flow/provision/cluster#create-the-namespaces). | | `basic credential not found` | The chart isn't on disk, and `sfe` has no saved registry credentials. Sign in with `sfe chart login`. | ## Investigate a resource > [tab] With the sfe CLI > > ```bash theme={null} > sfe resources describe / > sfe resources logs / > ``` > > SeekrFlow's images have no shell. To investigate inside a pod, attach a debug container: > > ```bash theme={null} > sfe resources debug / > ``` > [tab] Without the sfe CLI > > ```bash theme={null} > kubectl describe pod -n seekrflow > kubectl logs -n seekrflow > ``` > > The `Events` section at the end of the `describe` output usually names the problem. # Uninstall SeekrFlow Source: https://docs.seekr.com/self-managed/flow/operate/uninstall Remove a SeekrFlow Self-Managed deployment and the resources it leaves behind. Uninstalling removes SeekrFlow from the cluster. To protect your data, it keeps some resources in place. See [Remove retained resources](#remove-retained-resources). ## Uninstall > [tab] With the sfe CLI > > **1. Preview the uninstall** > > ```bash theme={null} > sfe uninstall -p --dry-run > ``` > > **2. Uninstall** > > ```bash theme={null} > sfe uninstall -p > ``` > > `sfe` asks you to confirm. It removes the resources SeekrFlow created while it ran, then uninstalls the release. If it stalls, add `--force` to finish. A forced uninstall can leave resources behind. > [tab] Without the sfe CLI > > **1. Delete the resources SeekrFlow created** > > While the operator is still running, delete the agents, tools, models, and LoRA syncs it created: > > ```bash theme={null} > kubectl delete agents.seekr.ai,tools.seekr.ai,flowmodels.seekr.ai,lorasyncs.seekr.ai --all -n seekrflow > ``` > > Without this step, these resources hold the namespace in `Terminating` after the uninstall removes the operator. > > **2. Uninstall** > > ```bash theme={null} > helm uninstall seekrflow --namespace seekrflow > ``` ## Remove retained resources The uninstall keeps these resources, so that uninstalling by mistake doesn't destroy data. To reinstall after a failed first install, remove the namespaces and databases, then start again from [Create the namespaces](/self-managed/flow/provision/cluster#create-the-namespaces). Reuse your values file rather than running `sfe bootstrap` again. > [!CAUTION] > > Removing these resources is permanent, and destroys your deployment's data. Remove them only if you want the deployment gone entirely. To keep a copy of the databases, back them up first. See [Back up the databases](/self-managed/flow/operate/upgrade#before-you-upgrade). | Resource | How to remove it | | - | - | | The `seekrflow` and `argo-workflows` namespaces, including their secrets and persistent volume claims | `kubectl delete namespace seekrflow argo-workflows` | | Persistent volumes with a `Retain` reclaim policy, which outlive the namespace | Find them with `kubectl get pv`, then delete the ones SeekrFlow used. | | SeekrFlow's custom resource definitions | Delete them by name. See [Delete the custom resource definitions](#delete-the-custom-resource-definitions). | | SeekrFlow's databases and login roles in PostgreSQL | Delete the instance, or drop only SeekrFlow's databases and roles. See [Drop the databases and roles](#drop-the-databases-and-roles). | | Files in your object storage bucket | Your cloud provider's or object store's tools. | | Secrets in your secret store, under `seekrflow/` | Your secret store's tools. | | Cloud resources you created in Provision, such as roles and Pod Identity associations | Your cloud provider's tools. | ### Delete the custom resource definitions ```bash theme={null} kubectl delete crd seekrfloweverywheres.seekr.ai flowservices.seekr.ai flowmodels.seekr.ai \ agents.seekr.ai tools.seekr.ai lorasyncs.seekr.ai loraadapters.production-stack.vllm.ai ``` > [!CAUTION] > > Deleting a custom resource definition deletes every resource of that kind across the whole cluster, not only in the `seekrflow` namespace. Skip any definition that other software on the cluster uses. ### Drop the databases and roles If you created the PostgreSQL instance only for SeekrFlow, delete the instance instead. If other applications use it, drop only SeekrFlow's databases and roles. Connect to the `postgres` database as your admin account, then run these statements. If you didn't enable Keycloak, the `keycloak` statements do nothing: ```sql theme={null} DROP DATABASE IF EXISTS seekrflow; DROP DATABASE IF EXISTS agents; DROP DATABASE IF EXISTS user_auth; DROP DATABASE IF EXISTS metaflow; DROP DATABASE IF EXISTS mlflow; DROP DATABASE IF EXISTS keycloak; DROP ROLE IF EXISTS seekrflow_app; DROP ROLE IF EXISTS seekrflow_keycloak; DROP ROLE IF EXISTS seekrflow_read_write, seekrflow_read_only; DROP ROLE IF EXISTS agents_read_write, agents_read_only; DROP ROLE IF EXISTS user_auth_read_write, user_auth_read_only; DROP ROLE IF EXISTS metaflow_read_write, metaflow_read_only; DROP ROLE IF EXISTS mlflow_read_write, mlflow_read_only; DROP ROLE IF EXISTS keycloak_read_write, keycloak_read_only; ``` # Upgrade a SeekrFlow deployment Source: https://docs.seekr.com/self-managed/flow/operate/upgrade Back up the databases and move a self-managed deployment to a newer release. Upgrading moves SeekrFlow to a newer release. Some releases change defaults, or need steps before or after the upgrade. Each release's notes list these under its upgrade considerations. Before you start, read the [release notes](/self-managed/flow/changelog/2026) for every version between yours and the new one. ## Before you upgrade **1. Back up the databases** An upgrade can change the database schema, and rolling back the release doesn't undo that. Restoring this backup does: ```bash theme={null} sfe db backup -p -r --in-cluster -o ./backup- ``` The backup holds password hashes and other secrets. Store it as securely as the database itself. It doesn't include files in object storage. On a managed database service, also take a snapshot. **2. Replace the image pull secret if your registry token changed** Registry tokens expire once a year. If yours changed, delete the image pull secret and create it again in both the `seekrflow` and `argo-workflows` namespaces. If you mirrored the images, use your own registry and its credentials instead of Seekr's: ```bash theme={null} for ns in seekrflow argo-workflows; do kubectl delete secret seekrflow-artifacts-pull-access --namespace "$ns" kubectl create secret docker-registry seekrflow-artifacts-pull-access \ --namespace "$ns" \ --docker-server=seekr.repo.sonatype.app \ --docker-username="$REGISTRY_USERNAME" \ --docker-password="$REGISTRY_PASSWORD" done ``` ## Upgrade > [tab] With the sfe CLI > > **1. Run preflight** > > ```bash theme={null} > sfe preflight -p -r > ``` > > `sfe upgrade` doesn't run preflight for you. > > **2. Upgrade** > > ```bash theme={null} > sfe upgrade -p -r > ``` > > `sfe` downloads the new release's chart and upgrades in place. > > To apply a changed values file without changing versions, run `sfe upgrade -p ` without `-r`. > [tab] Without the sfe CLI > > **1. Download the new chart** > > In a new folder, sign in to Seekr's registry, then pull and unpack the new release's chart: > > ```bash theme={null} > echo "$REGISTRY_PASSWORD" | helm registry login seekr.repo.sonatype.app \ > --username "$REGISTRY_USERNAME" \ > --password-stdin > helm pull oci://seekr.repo.sonatype.app/seekr-docker-release/seekr/flow-helm-chart --version > tar -xzf flow-helm-chart-.tgz > ``` > > **2. Preview the changes** > > Install the `helm-diff` plugin, then compare the new release with what's running: > > ```bash theme={null} > helm plugin install https://github.com/databus23/helm-diff > helm diff upgrade seekrflow flow-helm-chart --namespace seekrflow -f my-values.yaml > ``` > > The diff shows what the new release changes, including settings it needs that your values file doesn't have yet. > > **3. Upgrade** > > ```bash theme={null} > helm upgrade seekrflow flow-helm-chart --namespace seekrflow -f my-values.yaml > ``` ## Check the upgrade Run the checks in [Verify the deployment](/self-managed/flow/deploy/verify). SeekrFlow reloads its model catalog during the upgrade. # Review SeekrFlow requirements Source: https://docs.seekr.com/self-managed/flow/plan/requirements Everything a SeekrFlow Self-Managed deployment needs before you begin. SeekrFlow runs on a Kubernetes cluster in your own environment, on Amazon Web Services (AWS) or in your own data center. Before you begin, confirm you have everything on this page. Have your security team review [Security considerations](/self-managed/flow/security) before you provision anything. ## Kubernetes cluster SeekrFlow supports [conformant](https://github.com/cncf/k8s-conformance) Kubernetes clusters running one of the three most recent minor versions, listed on the Kubernetes [Releases](https://kubernetes.io/releases/) page. Versions a cloud provider maintains beyond that, such as Amazon Elastic Kubernetes Service (Amazon EKS) extended support, aren't supported. The cluster must run [Metrics Server](https://github.com/kubernetes-sigs/metrics-server). Under heavy load, SeekrFlow adds copies of its services, and Kubernetes uses Metrics Server to measure that load. Without it, SeekrFlow can't add copies. SeekrFlow works with policy engines such as Kyverno and Open Policy Agent (OPA) Gatekeeper. See [Set up networking and cluster policies](/self-managed/flow/provision/networking) for the settings your policies need to permit. ## Network connectivity SeekrFlow doesn't require a particular network design. It requires these connections: * The cluster to the container registry, object storage, PostgreSQL, OpenSearch, and any cloud model services you use. * Your users to the SeekrFlow load balancer. * The machine you install from to the Kubernetes API. If the API has no public endpoint, install from a machine inside your network, such as a bastion host. For every outbound connection SeekrFlow makes, see [Security considerations](/self-managed/flow/security#outbound-connections). ## Worker nodes Worker nodes run the platform services. For how many virtual CPUs (vCPUs) and how much memory they need, see [Size your deployment](/self-managed/flow/plan/size-deployment). | Requirement | Detail | | - | - | | Nodes | At least 3 if you enable the Valkey caches. Each cache runs three pods on separate nodes. | | Node type | Nodes you manage. Serverless compute, such as AWS Fargate, isn't supported. | | Root volume | At least 100 GiB. | | CPU architecture | amd64 (x86-64). arm64, including AWS Graviton, isn't supported. | ## GPU nodes GPU nodes run SeekrFlow's model servers, fine-tuning, and explainability workloads. Every deployment needs them. Amazon Bedrock can serve inference alongside them, but not fine-tuning or explainability. | Requirement | Detail | | - | - | | GPU vendor | NVIDIA. AMD and Intel GPUs are not supported. | | CPU architecture | amd64 (x86-64). arm64 isn't supported. | | GPU architecture | NVIDIA Ampere or newer, meaning CUDA compute capability 8.0 or higher, such as A10, L4, L40S, A100, or H100. To check another GPU, see NVIDIA's [CUDA GPU compute capability](https://developer.nvidia.com/cuda-gpus) list. | | NVIDIA driver | Version 580 or newer. SeekrFlow's container images include CUDA. You install only the driver on the nodes, not CUDA. | | GPU memory per node | Enough for the largest model you run on that node. A model can't span nodes. | | Root volume | At least 200 GiB, mainly for the model server images. Fine-tuning jobs require additional space. See [Size your deployment](/self-managed/flow/plan/size-deployment). | For how many GPUs your models need, see [Size your deployment](/self-managed/flow/plan/size-deployment). ## Services you provision | Service | What SeekrFlow uses it for | Set it up in | | - | - | - | | PostgreSQL 16 or later | Stores service data. | [Provision PostgreSQL](/self-managed/flow/provision/postgresql) | | OpenSearch | Stores the search indexes for file search and retrieval-augmented generation. AWS deployments provision it. On-premises deployments run it in the cluster. | [Provision OpenSearch](/self-managed/flow/provision/opensearch) | | Object storage | Stores datasets, model artifacts, and checkpoints. | [Provision storage](/self-managed/flow/provision/storage) | | Shared file storage | Caches model weights for GPU nodes. | [Provision storage](/self-managed/flow/provision/storage) | | Ingress | Routes your users to SeekrFlow, through an ingress controller, a DNS record, and a Transport Layer Security (TLS) certificate. | [Set up networking and cluster policies](/self-managed/flow/provision/networking) | | Secret store (optional) | Holds credentials outside the cluster. | [Set up secret management](/self-managed/flow/provision/secret-management) | ## Credentials and access | Item | From | Purpose | | - | - | - | | License key | Your Seekr account team | Validated at startup. Services don't run without it. | | Registry credentials | Your Seekr account team | Pulls the Helm chart and container images. | | Model configuration | Your Seekr account team | Defines which models to run on your GPU nodes and how to size them. | | Hugging Face access token | Your Hugging Face account | Downloads gated model weights. | | Brave Search API key | The Brave Search API | Lets agents run web searches. | | Access to Amazon Bedrock models (optional) | Your cloud account | Serves inference through externally hosted models. | | Kubernetes cluster-admin access | Your cluster administrator | Installs the chart's cluster-wide resources, such as custom resource definitions and roles. SeekrFlow has no reduced-permission install. | For how to get each one, see [Request credentials](/self-managed/flow/provision/checklist#request-credentials). ## Tools The install runs from a laptop or bastion host that can reach the cluster. | Tool | Used for | | - | - | | `sfe` command-line interface (CLI) | The recommended install path. Download it from Seekr's registry for Linux on amd64 or macOS on Apple silicon. See [Set up the sfe CLI](/self-managed/flow/prepare/sfe-cli). | | [`kubectl`](https://kubernetes.io/docs/tasks/tools/) | Inspecting the cluster, and the steps you run without `sfe`. | | [`helm`](https://helm.sh/docs/intro/install/) | Installing prerequisites such as the AWS Load Balancer Controller and External Secrets Operator. For the Helm install path, use Helm 3.2.0 or later. | | [AWS Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) | Signing in to your AWS account, which `sfe` uses through the AWS SDK, and setting up resources without `sfe`. | | [Docker](https://docs.docker.com/get-started/get-docker/) | Signing in to registries before you mirror container images. Needed only if you mirror. | # Size your SeekrFlow deployment Source: https://docs.seekr.com/self-managed/flow/plan/size-deployment Estimate the worker nodes, GPUs, and memory a SeekrFlow deployment needs. Size worker nodes from the resources SeekrFlow's pods request, and GPU nodes from the models you plan to run. These figures are a starting point for a typical deployment, not a minimum. Your Seekr account team can help you estimate the resources for your use case. ## Worker nodes Worker nodes run the platform services. | Component | Virtual CPUs (vCPUs) | Memory | | - | - | - | | Core services, steady state | 17 | 12 GiB | | Core services, peak | 44 | 26 GiB | | Valkey caches (optional) | 5 | 14 GiB | | In-cluster OpenSearch (on-premises) | 3 | 4.5 GiB | | Each agent | 1 | 4 GiB | Under heavy load, SeekrFlow runs additional copies of its services, up to the peak figures. Size worker nodes for the peak figures. Each agent runs as a single pod. If you taint GPU nodes to keep platform services off them, the worker nodes must hold every platform service at peak. Core services include MLflow. They don't include Argo Workflows, which runs training and ingestion jobs. The Argo server and controller don't reserve CPU or memory. Size worker nodes with spare capacity beyond the totals in this table. Ingestion jobs run on worker nodes and use 1 vCPU and about 3.8 GiB of memory while they run. The Valkey caches are off by default. Turn them on for any deployment reachable by untrusted users. Enabling them requires at least three worker nodes. See [Review SeekrFlow requirements](/self-managed/flow/plan/requirements). ## GPU nodes SeekrFlow assigns each model at least one dedicated GPU. Each model reserves most of its GPUs' memory, regardless of model size. Memory not used by the model weights stores active requests, and SeekrFlow sets the maximum context length to fit the remaining memory. Additional GPU memory supports a longer maximum context and more concurrent requests. Model servers reserve 2 vCPUs and 24 GiB of system memory for each GPU they use, unless you change these defaults when you [configure models](/self-managed/flow/prepare/models). To leave room for the operating system and Kubernetes, give each GPU node more CPU and memory than its model servers reserve. ### Decide where the platform models run SeekrFlow uses four platform models: document ingestion, embeddings, agent planning, and context attribution for explainability. You choose and configure each one. On AWS, the ingestion, embedding, and agent planning models can run on your GPU nodes or on Amazon Bedrock, which requires no GPU nodes. The context attribution model always requires a dedicated GPU in your cluster. | Platform model | Example model | Minimum GPU memory | | - | - | - | | Document ingestion | SmolDocling-256M | 8 GiB | | Embeddings | e5-mistral-7b-instruct | 20 GiB | | Agent planning | Llama-3.1-8B-Instruct | 20 GiB | | Context attribution | Nemotron-Nano-9B-v2 | 40 GiB | Self-hosting all four platform models requires at least four GPUs, one per model. If Amazon Bedrock serves the other three, only the context attribution model requires a GPU. ### Add the models you plan to run Each additional model you self-host also requires at least one dedicated GPU. The minimum GPU memory depends on the model. | Example model | Minimum GPU memory | | - | - | | Llama-3.2-1B-Instruct | 8 GiB | | gemma-4-31B-it | 70 GiB | All figures are for one replica. A model with two replicas requires twice the resources. ### Plan for fine-tuning jobs Fine-tuning jobs run on GPU nodes and need far more CPU and memory than model servers, plus temporary disk space. Seekr measured these figures on typical jobs: | Job size | GPUs | vCPUs | Memory | Temporary disk | | - | - | - | - | - | | Small | 1 | 15 | 95 GiB | 44 GiB | | Medium | 2 | 30 | 152 GiB | 977 GiB | | Large | 8 | 80 | 610 GiB | 3,815 GiB | Size each GPU node's root volume, or its local non-volatile memory express (NVMe) storage, for the largest fine-tuning job you plan to run. ## Add it up * **Worker nodes** – Core services at peak, the Valkey caches if you enable them, and each agent. * **GPU nodes** – The platform models you self-host and your other models, multiplied by their replicas. * **Each GPU node** – Enough GPUs, CPU, and memory for the largest model or fine-tuning job it runs, and enough disk space for the largest fine-tuning job. A model can't span nodes. Before you provision, check your cloud provider's quotas for GPU instance types in your Region. # Connect SeekrFlow cloud identity Source: https://docs.seekr.com/self-managed/flow/prepare/identity Connect the cloud identity you created to SeekrFlow's service accounts. You created the role or managed identity in [Set up cloud identity](/self-managed/flow/provision/cloud-identity), and recorded its settings in your values file. This page connects it to SeekrFlow's service accounts. > [!NOTE] > > Skip this page if either applies: > > * **On-premises deployment** – Storage credentials come from a Kubernetes secret you create in [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). You don't need a cloud identity. > * **Amazon Web Services (AWS) Identity and Access Management (IAM) roles for service accounts** – The role annotation in your values file connects the identity. > [tab] With the sfe CLI > > Your AWS identity needs these permissions: > > * `iam:UpdateAssumeRolePolicy` and `iam:PassRole` on the SeekrFlow role > * `eks:CreatePodIdentityAssociation` and `eks:ListPodIdentityAssociations` on the cluster > > **1. Preview the changes** > > Replace `` with the Amazon Resource Name (ARN) of the role you created for SeekrFlow: > > ```bash theme={null} > sfe cloud-identity aws -f my-values.yaml --role-arn --dry-run > ``` > > **2. Connect the identity** > > ```bash theme={null} > sfe cloud-identity aws -f my-values.yaml --role-arn > ``` > > The command updates the role's trust policy and creates an Amazon Elastic Kubernetes Service (Amazon EKS) Pod Identity association for each SeekrFlow service account. > > **3. Restart External Secrets Operator** > > External Secrets Operator gets its AWS credentials only when it starts. If you use it, restart it now: > > ```bash theme={null} > kubectl rollout restart deployment external-secrets -n external-secrets > ``` > [tab] Without the sfe CLI > > Your AWS identity needs `iam:PassRole` on the SeekrFlow role and `eks:CreatePodIdentityAssociation` on the cluster. > > Your role's trust policy must already allow Amazon EKS Pod Identity. See [Set up cloud identity](/self-managed/flow/provision/cloud-identity). Create a Pod Identity association for each of these service accounts: > > | Namespace | Service accounts | > | - | - | > | `seekrflow` | `seekrflow-agent` `seekrflow-auth` `seekrflow-data-ready` `seekrflow-frontend` `seekrflow-flowmodel` `seekrflow-explainability` `seekrflow-ingestion` `seekrflow-keycloak` `seekrflow-license` `seekrflow-operator` `seekrflow-router` `seekrflow-serving` `seekrflow-training` `seekrflow-tool` `seekrflow-mlflow-run` `seekrflow-mlflow-tracking` `seekrflow-lora-controller` `seekrflow-argo-workflows-workflow-controller` | > | `argo-workflows` | `seekrflow-argo-workflows-workflow-controller` | > | `external-secrets` | `external-secrets`, if you use External Secrets Operator | > > For example: > > ```bash theme={null} > aws eks create-pod-identity-association \ > --cluster-name \ > --namespace seekrflow \ > --service-account seekrflow-agent \ > --role-arn > ``` > > External Secrets Operator gets its AWS credentials only when it starts. If you use it, restart it now: > > ```bash theme={null} > kubectl rollout restart deployment external-secrets -n external-secrets > ``` # Configure models Source: https://docs.seekr.com/self-managed/flow/prepare/models Choose where models run, pick the model each SeekrFlow service uses, and define the self-hosted models to run. SeekrFlow can serve models from GPU inference servers inside your cluster, from an external provider, or from both at once. ## Choose where models run Two settings decide which models users can choose from: models on your GPU nodes, models on Amazon Bedrock, or both. `sfe bootstrap` sets them from your answers to **Sync self-hosted (unprefixed) models** and **Sync the managed cloud set**. | Setting | Set to `true` to offer | | - | - | | `global.modelPolicy.enableSelfHostedModels` | Models that run on your GPU nodes | | `global.modelPolicy.enableExternalModels` | Models on Amazon Bedrock | ```yaml theme={null} global: modelPolicy: enableSelfHostedModels: true enableExternalModels: true ``` To keep models from certain countries of origin out of the list, add those countries to `global.modelPolicy.deniedCountriesOfOrigin`. The models users can choose from come from a catalog that ships with the chart. SeekrFlow loads the catalog into its database automatically when you install or upgrade. It includes only the models these settings allow. A catalog model that runs on your GPU nodes also needs an entry in [Define self-hosted models](#define-self-hosted-models). To replace the chart's catalog with your own, list your models under `ModelCatalog.models`, using the same fields as the chart's `MODEL_CATALOG.yaml`. Your deployment then stops receiving catalog changes from new releases, including newly added models. ## Choose the model for each job SeekrFlow's services call models for their own work: reading documents during ingestion, planning agent steps, and explaining fine-tuned models. Each job has a setting in your values file. > [!NOTE] > > A job you don't set uses a self-hosted default model. If that model isn't running on your GPU nodes, the job fails the first time a service calls it. For example, an agent fails on its first run. A model ID starts with a prefix that says where the model runs. | Prefix | Where the model runs | Example | | - | - | - | | `aws-bedrock:` | Amazon Bedrock | `aws-bedrock:openai.gpt-oss-120b-1:0` | | None | Your GPU nodes | `meta-llama/Llama-3.1-8B-Instruct` | Before you use a model on Amazon Bedrock, make sure your account can access it. See [Amazon Bedrock access](/self-managed/flow/provision/checklist#amazon-bedrock-access). In AWS GovCloud (US), Amazon Bedrock offers fewer models. Most use the same model ID as in commercial Regions. An ID that starts with `us-gov.`, such as `aws-bedrock:us-gov.anthropic.claude-sonnet-4-5-20250929-v1:0`, names a GovCloud inference profile. Set each job's model with these settings: | Job | What it does | Setting | Default | | - | - | - | - | | Document reading | Extracts text and tables from PDFs during ingestion. Needs a vision model. | `SEEKR_VISION_MODEL` under `Ingestion.env` | `meta-llama/Llama-3.2-11B-Vision-Instruct` | | Document cleanup | Fixes headings and detects tables of contents during ingestion. | `SEEKR_LANGUAGE_MODEL` under `Ingestion.env` | `meta-llama/Llama-3.1-8B-Instruct` | | Agent responses | Writes an agent's replies. | `Agents.models.llm_model` | `meta-llama/Llama-3.1-8B-Instruct` | | Tool selection | Chooses which tools an agent calls. | `Agents.models.tool_model` | `openai/gpt-oss-120b` | | Agent planning | Plans an agent's steps. The performance and speed planners serve agents set to higher or lower effort. | `Agents.models.planner_model`, `performance_planner_model`, and `speed_planner_model` | `meta-llama/Llama-3.1-8B-Instruct` | | Fine-tuning explanations | Explains which training data shaped a fine-tuned model. | `EXPLAIN_JUDGE_MODEL_NAME` under `Explainability.env` | `meta-llama/Llama-3.1-8B-Instruct` | | Training data preparation | Prepares and refines training data for alignment. | `ALIGNMENT_MODEL_NAME` under `Training.env` | `meta-llama/Llama-3.1-8B-Instruct` | | Training data index | Builds the searchable index behind fine-tuning explanations. Needs an embedding model. | `EXPLAINABILITY_DB_EMBEDDING_MODEL` under `Training.env` | None | These lists show the models each job supports. Every job except document reading and the training data index uses a language model. > [accordion] Language models > > | Where it runs | Model IDs | > | - | - | > | Your GPU nodes | `openai/gpt-oss-120b` `meta-llama/Llama-3.1-8B-Instruct` `meta-llama/Llama-3.1-70B-Instruct` `meta-llama/Llama-3.2-1B-Instruct` | > | Amazon Bedrock | `aws-bedrock:global.anthropic.claude-sonnet-4-5-20250929-v1:0` `aws-bedrock:openai.gpt-oss-120b-1:0` `aws-bedrock:nvidia.nemotron-super-3-120b` `aws-bedrock:nvidia.nemotron-nano-12b-v2` `aws-bedrock:nvidia.nemotron-nano-9b-v2` `aws-bedrock:nvidia.nemotron-nano-3-30b` `aws-bedrock:meta.llama3-70b-instruct-v1:0` | > | Amazon Bedrock in Amazon Web Services (AWS) GovCloud (US) | `aws-bedrock:us-gov.anthropic.claude-sonnet-4-5-20250929-v1:0` `aws-bedrock:openai.gpt-oss-120b-1:0` `aws-bedrock:nvidia.nemotron-super-3-120b` `aws-bedrock:nvidia.nemotron-nano-3-30b` `aws-bedrock:nvidia.nemotron-nano-12b-v2` `aws-bedrock:nvidia.nemotron-nano-9b-v2` `aws-bedrock:meta.llama3-70b-instruct-v1:0` `aws-bedrock:us-gov.openai.gpt-oss-120b-1:0` `aws-bedrock:us-gov.nvidia.nemotron-super-3-120b` `aws-bedrock:us-gov.nvidia.nemotron-nano-3-30b` `aws-bedrock:us-gov.nvidia.nemotron-nano-9b-v2` | > [accordion] Vision models > > | Where it runs | Model IDs | > | - | - | > | Your GPU nodes | `ds4sd/SmolDocling-256M-preview` `meta-llama/Llama-3.2-11B-Vision-Instruct` `Qwen/Qwen2.5-VL-7B-Instruct` | > | Amazon Bedrock | `aws-bedrock:global.anthropic.claude-sonnet-4-5-20250929-v1:0` `aws-bedrock:us.amazon.nova-pro-v1:0` | > | Amazon Bedrock in AWS GovCloud (US) | `aws-bedrock:us-gov.anthropic.claude-sonnet-4-5-20250929-v1:0` `aws-bedrock:amazon.nova-pro-v1:0` | > [accordion] Embedding models > > | Where it runs | Model IDs | > | - | - | > | Your GPU nodes | `intfloat/e5-mistral-7b-instruct` | > | Amazon Bedrock | `aws-bedrock:amazon.titan-embed-text-v2:0` `aws-bedrock:amazon.titan-embed-g1-text-02` | > | Amazon Bedrock in AWS GovCloud (US) | `aws-bedrock:amazon.titan-embed-text-v2:0` | Context attribution also uses a dedicated model. `sfe bootstrap` sets it up. See [Create the values file](/self-managed/flow/prepare/values-file). A model on Amazon Bedrock needs `global.modelPolicy.enableExternalModels` set to `true`. See [Choose where models run](#choose-where-models-run). This example uses Amazon Bedrock for every job: ```yaml theme={null} global: modelPolicy: enableExternalModels: true Agents: models: llm_model: "aws-bedrock:openai.gpt-oss-120b-1:0" tool_model: "aws-bedrock:openai.gpt-oss-120b-1:0" planner_model: "aws-bedrock:openai.gpt-oss-120b-1:0" performance_planner_model: "aws-bedrock:openai.gpt-oss-120b-1:0" speed_planner_model: "aws-bedrock:openai.gpt-oss-120b-1:0" Ingestion: env: - name: SEEKR_VISION_MODEL value: "aws-bedrock:global.anthropic.claude-sonnet-4-5-20250929-v1:0" - name: SEEKR_LANGUAGE_MODEL value: "aws-bedrock:openai.gpt-oss-120b-1:0" Explainability: env: - name: EXPLAIN_JUDGE_MODEL_NAME value: "aws-bedrock:openai.gpt-oss-120b-1:0" Training: env: - name: EXPLAINABILITY_DB_EMBEDDING_MODEL value: "aws-bedrock:amazon.titan-embed-text-v2:0" - name: ALIGNMENT_MODEL_NAME value: "aws-bedrock:openai.gpt-oss-120b-1:0" ``` To change these settings after install, update your values file, and then upgrade. See [Upgrade a SeekrFlow deployment](/self-managed/flow/operate/upgrade). ## Define self-hosted models Each model that runs on your GPU nodes needs an entry under `FlowModel.models`. That includes any model from [Choose the model for each job](#choose-the-model-for-each-job) without the `aws-bedrock:` prefix, and any self-hosted model you want to offer users. Your Seekr account team provides a `flowmodel.yaml` file with entries for your account. Merge its `FlowModel.models` block into your values file. ```yaml theme={null} FlowModel: models: meta-llama/Llama-3.1-8B-Instruct: toolCalling: enabled: true parser: "llama3_json" gpu: request: 1 memory: 24 cpu: "2000m" ``` | Setting | What it sets | Default | | - | - | - | | `gpu.request` | The number of GPUs the model uses | `1` | | `gpu.memory` | GPU memory per GPU, in GB | `24` | | `gpu.cpu` | CPU per GPU, in Kubernetes CPU units, such as `2000m` for two cores | `2000m` | > [!NOTE] > > A model can't span nodes. The node that runs a model needs enough GPUs, with enough memory on each, for the whole model. Different models can run on different nodes. ### Run models on reserved GPU nodes If you reserved your GPU nodes for models by adding the `nvidia.com/gpu=true:NoSchedule` [taint](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), each model needs a matching toleration to run there. On Amazon Elastic Kubernetes Service (Amazon EKS), models get the toleration automatically, and you don't need to add it. ```yaml theme={null} FlowModel: models: meta-llama/Llama-3.1-8B-Instruct: tolerations: - key: nvidia.com/gpu operator: Exists effect: NoSchedule ``` ### Load model weights By default, each self-hosted model downloads its weights from Hugging Face the first time it starts, and SeekrFlow caches them on your shared file storage. Large models can take several minutes to start. Gated models, such as most Llama models, need the Hugging Face token from [Request credentials](/self-managed/flow/provision/checklist#request-credentials). To load a model from your own object storage instead, set `fileStorePath` in its FlowModel entry to the bucket and folder that hold its weights. ### Stage weights for an offline install If your cluster can't reach Hugging Face, stage the weights in your SeekrFlow bucket and turn on offline mode. Offline mode also turns off tools that need the internet, such as web search. **1. Download the weights** On a machine that can reach Hugging Face, run: ```bash theme={null} hf download meta-llama/Llama-3.1-8B-Instruct --cache-dir ./hf-cache ``` **2. Copy them to your bucket** Keep the folder name Hugging Face created: ```bash theme={null} aws s3 cp --recursive ./hf-cache/models--meta-llama--Llama-3.1-8B-Instruct s3:///models--meta-llama--Llama-3.1-8B-Instruct/ ``` The copy in your bucket takes about twice the model's size. Hugging Face links files within its download folder, and Amazon S3 stores a full copy of each linked file. **3. Turn on offline mode** Set `global.offlineMode` to `true` in your values file. # Connect SeekrFlow to PostgreSQL Source: https://docs.seekr.com/self-managed/flow/prepare/postgresql Create SeekrFlow's databases and login roles in your PostgreSQL instance. SeekrFlow stores its data in PostgreSQL. You created the instance in [Provision PostgreSQL](/self-managed/flow/provision/postgresql). This page creates SeekrFlow's databases and login roles inside it: * **Databases:** `seekrflow`, `agents`, `user_auth`, `metaflow`, and `mlflow`, plus `keycloak` if you enable Keycloak. Each has its own read-write and read-only roles. * **Login roles:** `seekrflow_app`, which SeekrFlow runs as, and `seekrflow_keycloak` if you enable Keycloak. Keycloak gets its own role because it stores password hashes and client secrets. SeekrFlow's role can't read Keycloak's tables, and Keycloak's role can't reach the other databases. Run these steps as your instance's admin account, the one you set when you created the instance. SeekrFlow also uses this account for database migrations. ## Create the databases and roles > [tab] With the sfe CLI > > `sfe` reads the admin and `seekrflow_app` credentials from the `pg-creds` secret you created in [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). It reads the Keycloak credentials from `keycloak-credentials`. > > ```bash theme={null} > sfe db setup -p -r > ``` > > Include `-r`. Without it, `sfe` can't tell whether you enabled Keycloak, and asks for a Keycloak password. > > If your database is reachable only from inside your network, add `--in-cluster`. `sfe` then runs the setup as a job inside the cluster. > [tab] Without the sfe CLI > > Run this script with `psql`, connected to the `postgres` database as your admin account. It prompts for the `seekrflow_app` and `seekrflow_keycloak` passwords, which must match your `pg-creds` and `keycloak-credentials` secrets. If you don't enable Keycloak, delete the two Keycloak sections first. > > > [accordion] SeekrFlow database script > > > > ```sql theme={null} > > -- SeekrFlow databases and roles. Run with psql, connected to the postgres database as your admin account. > > -- If you don't enable Keycloak, delete the 06_keycloak and 08_keycloak_user sections. > > > > \prompt 'Password for seekrflow_app: ' app_password > > \prompt 'Password for seekrflow_keycloak: ' keycloak_password > > > > > > -- 01_seekrflow > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE DATABASE seekrflow; > > > > DO $$ > > BEGIN > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'seekrflow_read_write') THEN > > CREATE ROLE seekrflow_read_write NOLOGIN; > > END IF; > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'seekrflow_read_only') THEN > > CREATE ROLE seekrflow_read_only NOLOGIN; > > END IF; > > END $$; > > > > -- 01_seekrflow > > \connect seekrflow > > REVOKE CONNECT ON DATABASE seekrflow FROM PUBLIC; > > REVOKE ALL ON SCHEMA public FROM PUBLIC; > > > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE seekrflow TO current_user; > > GRANT ALL ON SCHEMA public TO current_user; > > > > -- Everything below acts on tables this admin may not hold. On a managed > > -- instance the admin is not a superuser, and its membership in the role that > > -- owns the tables can be granted WITH INHERIT FALSE -- pg_has_role then reports > > -- MEMBER true and USAGE false, and every GRANT and ALTER on those tables is > > -- refused with "permission denied for table". Re-granting is allowed because > > -- the admin holds ADMIN OPTION; the plain form takes its INHERIT from rolinherit > > -- and so needs no version-gated syntax. > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN > > SELECT DISTINCT pg_get_userbyid(c.relowner) AS owner > > FROM pg_class c > > JOIN pg_namespace n ON n.oid = c.relnamespace > > WHERE n.nspname = 'public' > > AND c.relkind IN ('r', 'p', 'S', 'v') > > AND NOT pg_has_role(current_user, c.relowner, 'USAGE') > > LOOP > > EXECUTE format('GRANT %I TO current_user', r.owner); > > END LOOP; > > END $$; > > > > GRANT CONNECT ON DATABASE seekrflow TO seekrflow_read_only; > > GRANT USAGE ON SCHEMA public TO seekrflow_read_only; > > GRANT SELECT ON ALL TABLES IN SCHEMA public TO seekrflow_read_only; > > GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO seekrflow_read_only; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT SELECT ON TABLES TO seekrflow_read_only; > > > > GRANT seekrflow_read_only TO seekrflow_read_write; > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE seekrflow TO seekrflow_read_write; > > GRANT ALL ON SCHEMA public TO seekrflow_read_write; > > GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO seekrflow_read_write; > > GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO seekrflow_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON TABLES TO seekrflow_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON SEQUENCES TO seekrflow_read_write; > > > > -- Ownership, not just privileges. ALTER TABLE requires ownership and GRANT ALL does > > -- not confer it, so an app that runs DDL at startup (mlflow's alembic) fails with > > -- "must be owner" on tables an earlier release created under a different role. > > -- Owning them as the group role lets any member migrate them and survives an > > -- app-role rename. current_user is granted the role first so the admin that runs > > -- this script does not lose the ability to manage what it just gave away. > > -- Re-running repairs ownership on an existing install; on a fresh one the loops > > -- find nothing and this is a no-op. > > GRANT seekrflow_read_write TO current_user; > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER TABLE public.%I OWNER TO seekrflow_read_write', r.tablename); > > END LOOP; > > FOR r IN SELECT sequencename FROM pg_sequences WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER SEQUENCE public.%I OWNER TO seekrflow_read_write', r.sequencename); > > END LOOP; > > FOR r IN SELECT viewname FROM pg_views WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER VIEW public.%I OWNER TO seekrflow_read_write', r.viewname); > > END LOOP; > > END $$; > > > > -- 02_agents > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE DATABASE agents; > > > > DO $$ > > BEGIN > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'agents_read_write') THEN > > CREATE ROLE agents_read_write NOLOGIN; > > END IF; > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'agents_read_only') THEN > > CREATE ROLE agents_read_only NOLOGIN; > > END IF; > > END $$; > > > > -- 02_agents > > \connect agents > > REVOKE CONNECT ON DATABASE agents FROM PUBLIC; > > REVOKE ALL ON SCHEMA public FROM PUBLIC; > > > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE agents TO current_user; > > GRANT ALL ON SCHEMA public TO current_user; > > > > -- Everything below acts on tables this admin may not hold. On a managed > > -- instance the admin is not a superuser, and its membership in the role that > > -- owns the tables can be granted WITH INHERIT FALSE -- pg_has_role then reports > > -- MEMBER true and USAGE false, and every GRANT and ALTER on those tables is > > -- refused with "permission denied for table". Re-granting is allowed because > > -- the admin holds ADMIN OPTION; the plain form takes its INHERIT from rolinherit > > -- and so needs no version-gated syntax. > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN > > SELECT DISTINCT pg_get_userbyid(c.relowner) AS owner > > FROM pg_class c > > JOIN pg_namespace n ON n.oid = c.relnamespace > > WHERE n.nspname = 'public' > > AND c.relkind IN ('r', 'p', 'S', 'v') > > AND NOT pg_has_role(current_user, c.relowner, 'USAGE') > > LOOP > > EXECUTE format('GRANT %I TO current_user', r.owner); > > END LOOP; > > END $$; > > > > GRANT CONNECT ON DATABASE agents TO agents_read_only; > > GRANT USAGE ON SCHEMA public TO agents_read_only; > > GRANT SELECT ON ALL TABLES IN SCHEMA public TO agents_read_only; > > GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO agents_read_only; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT SELECT ON TABLES TO agents_read_only; > > > > GRANT agents_read_only TO agents_read_write; > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE agents TO agents_read_write; > > GRANT ALL ON SCHEMA public TO agents_read_write; > > GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO agents_read_write; > > GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO agents_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON TABLES TO agents_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON SEQUENCES TO agents_read_write; > > > > -- Ownership, not just privileges. ALTER TABLE requires ownership and GRANT ALL does > > -- not confer it, so an app that runs DDL at startup (mlflow's alembic) fails with > > -- "must be owner" on tables an earlier release created under a different role. > > -- Owning them as the group role lets any member migrate them and survives an > > -- app-role rename. current_user is granted the role first so the admin that runs > > -- this script does not lose the ability to manage what it just gave away. > > -- Re-running repairs ownership on an existing install; on a fresh one the loops > > -- find nothing and this is a no-op. > > GRANT agents_read_write TO current_user; > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER TABLE public.%I OWNER TO agents_read_write', r.tablename); > > END LOOP; > > FOR r IN SELECT sequencename FROM pg_sequences WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER SEQUENCE public.%I OWNER TO agents_read_write', r.sequencename); > > END LOOP; > > FOR r IN SELECT viewname FROM pg_views WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER VIEW public.%I OWNER TO agents_read_write', r.viewname); > > END LOOP; > > END $$; > > > > -- 03_userauth > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE DATABASE user_auth; > > > > DO $$ > > BEGIN > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'user_auth_read_write') THEN > > CREATE ROLE user_auth_read_write NOLOGIN; > > END IF; > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'user_auth_read_only') THEN > > CREATE ROLE user_auth_read_only NOLOGIN; > > END IF; > > END $$; > > > > -- 03_userauth > > \connect user_auth > > REVOKE CONNECT ON DATABASE user_auth FROM PUBLIC; > > REVOKE ALL ON SCHEMA public FROM PUBLIC; > > > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE user_auth TO current_user; > > GRANT ALL ON SCHEMA public TO current_user; > > > > -- Everything below acts on tables this admin may not hold. On a managed > > -- instance the admin is not a superuser, and its membership in the role that > > -- owns the tables can be granted WITH INHERIT FALSE -- pg_has_role then reports > > -- MEMBER true and USAGE false, and every GRANT and ALTER on those tables is > > -- refused with "permission denied for table". Re-granting is allowed because > > -- the admin holds ADMIN OPTION; the plain form takes its INHERIT from rolinherit > > -- and so needs no version-gated syntax. > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN > > SELECT DISTINCT pg_get_userbyid(c.relowner) AS owner > > FROM pg_class c > > JOIN pg_namespace n ON n.oid = c.relnamespace > > WHERE n.nspname = 'public' > > AND c.relkind IN ('r', 'p', 'S', 'v') > > AND NOT pg_has_role(current_user, c.relowner, 'USAGE') > > LOOP > > EXECUTE format('GRANT %I TO current_user', r.owner); > > END LOOP; > > END $$; > > > > GRANT CONNECT ON DATABASE user_auth TO user_auth_read_only; > > GRANT USAGE ON SCHEMA public TO user_auth_read_only; > > GRANT SELECT ON ALL TABLES IN SCHEMA public TO user_auth_read_only; > > GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO user_auth_read_only; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT SELECT ON TABLES TO user_auth_read_only; > > > > GRANT user_auth_read_only TO user_auth_read_write; > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE user_auth TO user_auth_read_write; > > GRANT ALL ON SCHEMA public TO user_auth_read_write; > > GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO user_auth_read_write; > > GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO user_auth_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON TABLES TO user_auth_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON SEQUENCES TO user_auth_read_write; > > > > -- Ownership, not just privileges. ALTER TABLE requires ownership and GRANT ALL does > > -- not confer it, so an app that runs DDL at startup (mlflow's alembic) fails with > > -- "must be owner" on tables an earlier release created under a different role. > > -- Owning them as the group role lets any member migrate them and survives an > > -- app-role rename. current_user is granted the role first so the admin that runs > > -- this script does not lose the ability to manage what it just gave away. > > -- Re-running repairs ownership on an existing install; on a fresh one the loops > > -- find nothing and this is a no-op. > > GRANT user_auth_read_write TO current_user; > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER TABLE public.%I OWNER TO user_auth_read_write', r.tablename); > > END LOOP; > > FOR r IN SELECT sequencename FROM pg_sequences WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER SEQUENCE public.%I OWNER TO user_auth_read_write', r.sequencename); > > END LOOP; > > FOR r IN SELECT viewname FROM pg_views WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER VIEW public.%I OWNER TO user_auth_read_write', r.viewname); > > END LOOP; > > END $$; > > > > -- 04_metaflow > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE DATABASE metaflow; > > > > DO $$ > > BEGIN > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'metaflow_read_write') THEN > > CREATE ROLE metaflow_read_write NOLOGIN; > > END IF; > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'metaflow_read_only') THEN > > CREATE ROLE metaflow_read_only NOLOGIN; > > END IF; > > END $$; > > > > -- 04_metaflow > > \connect metaflow > > REVOKE CONNECT ON DATABASE metaflow FROM PUBLIC; > > REVOKE ALL ON SCHEMA public FROM PUBLIC; > > > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE metaflow TO current_user; > > GRANT ALL ON SCHEMA public TO current_user; > > > > -- Everything below acts on tables this admin may not hold. On a managed > > -- instance the admin is not a superuser, and its membership in the role that > > -- owns the tables can be granted WITH INHERIT FALSE -- pg_has_role then reports > > -- MEMBER true and USAGE false, and every GRANT and ALTER on those tables is > > -- refused with "permission denied for table". Re-granting is allowed because > > -- the admin holds ADMIN OPTION; the plain form takes its INHERIT from rolinherit > > -- and so needs no version-gated syntax. > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN > > SELECT DISTINCT pg_get_userbyid(c.relowner) AS owner > > FROM pg_class c > > JOIN pg_namespace n ON n.oid = c.relnamespace > > WHERE n.nspname = 'public' > > AND c.relkind IN ('r', 'p', 'S', 'v') > > AND NOT pg_has_role(current_user, c.relowner, 'USAGE') > > LOOP > > EXECUTE format('GRANT %I TO current_user', r.owner); > > END LOOP; > > END $$; > > > > GRANT CONNECT ON DATABASE metaflow TO metaflow_read_only; > > GRANT USAGE ON SCHEMA public TO metaflow_read_only; > > GRANT SELECT ON ALL TABLES IN SCHEMA public TO metaflow_read_only; > > GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO metaflow_read_only; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT SELECT ON TABLES TO metaflow_read_only; > > > > GRANT metaflow_read_only TO metaflow_read_write; > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE metaflow TO metaflow_read_write; > > GRANT ALL ON SCHEMA public TO metaflow_read_write; > > GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO metaflow_read_write; > > GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO metaflow_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON TABLES TO metaflow_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON SEQUENCES TO metaflow_read_write; > > > > -- Ownership, not just privileges. ALTER TABLE requires ownership and GRANT ALL does > > -- not confer it, so an app that runs DDL at startup (mlflow's alembic) fails with > > -- "must be owner" on tables an earlier release created under a different role. > > -- Owning them as the group role lets any member migrate them and survives an > > -- app-role rename. current_user is granted the role first so the admin that runs > > -- this script does not lose the ability to manage what it just gave away. > > -- Re-running repairs ownership on an existing install; on a fresh one the loops > > -- find nothing and this is a no-op. > > GRANT metaflow_read_write TO current_user; > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER TABLE public.%I OWNER TO metaflow_read_write', r.tablename); > > END LOOP; > > FOR r IN SELECT sequencename FROM pg_sequences WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER SEQUENCE public.%I OWNER TO metaflow_read_write', r.sequencename); > > END LOOP; > > FOR r IN SELECT viewname FROM pg_views WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER VIEW public.%I OWNER TO metaflow_read_write', r.viewname); > > END LOOP; > > END $$; > > > > -- 05_mlflow > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE DATABASE mlflow; > > > > DO $$ > > BEGIN > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'mlflow_read_write') THEN > > CREATE ROLE mlflow_read_write NOLOGIN; > > END IF; > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'mlflow_read_only') THEN > > CREATE ROLE mlflow_read_only NOLOGIN; > > END IF; > > END $$; > > > > -- 05_mlflow > > \connect mlflow > > REVOKE CONNECT ON DATABASE mlflow FROM PUBLIC; > > REVOKE ALL ON SCHEMA public FROM PUBLIC; > > > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE mlflow TO current_user; > > GRANT ALL ON SCHEMA public TO current_user; > > > > -- Everything below acts on tables this admin may not hold. On a managed > > -- instance the admin is not a superuser, and its membership in the role that > > -- owns the tables can be granted WITH INHERIT FALSE -- pg_has_role then reports > > -- MEMBER true and USAGE false, and every GRANT and ALTER on those tables is > > -- refused with "permission denied for table". Re-granting is allowed because > > -- the admin holds ADMIN OPTION; the plain form takes its INHERIT from rolinherit > > -- and so needs no version-gated syntax. > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN > > SELECT DISTINCT pg_get_userbyid(c.relowner) AS owner > > FROM pg_class c > > JOIN pg_namespace n ON n.oid = c.relnamespace > > WHERE n.nspname = 'public' > > AND c.relkind IN ('r', 'p', 'S', 'v') > > AND NOT pg_has_role(current_user, c.relowner, 'USAGE') > > LOOP > > EXECUTE format('GRANT %I TO current_user', r.owner); > > END LOOP; > > END $$; > > > > GRANT CONNECT ON DATABASE mlflow TO mlflow_read_only; > > GRANT USAGE ON SCHEMA public TO mlflow_read_only; > > GRANT SELECT ON ALL TABLES IN SCHEMA public TO mlflow_read_only; > > GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO mlflow_read_only; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT SELECT ON TABLES TO mlflow_read_only; > > > > GRANT mlflow_read_only TO mlflow_read_write; > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE mlflow TO mlflow_read_write; > > GRANT ALL ON SCHEMA public TO mlflow_read_write; > > GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO mlflow_read_write; > > GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO mlflow_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON TABLES TO mlflow_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON SEQUENCES TO mlflow_read_write; > > > > -- Ownership, not just privileges. ALTER TABLE requires ownership and GRANT ALL does > > -- not confer it, so an app that runs DDL at startup (mlflow's alembic) fails with > > -- "must be owner" on tables an earlier release created under a different role. > > -- Owning them as the group role lets any member migrate them and survives an > > -- app-role rename. current_user is granted the role first so the admin that runs > > -- this script does not lose the ability to manage what it just gave away. > > -- Re-running repairs ownership on an existing install; on a fresh one the loops > > -- find nothing and this is a no-op. > > GRANT mlflow_read_write TO current_user; > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER TABLE public.%I OWNER TO mlflow_read_write', r.tablename); > > END LOOP; > > FOR r IN SELECT sequencename FROM pg_sequences WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER SEQUENCE public.%I OWNER TO mlflow_read_write', r.sequencename); > > END LOOP; > > FOR r IN SELECT viewname FROM pg_views WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER VIEW public.%I OWNER TO mlflow_read_write', r.viewname); > > END LOOP; > > END $$; > > > > -- 06_keycloak > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE DATABASE keycloak; > > > > DO $$ > > BEGIN > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'keycloak_read_write') THEN > > CREATE ROLE keycloak_read_write NOLOGIN; > > END IF; > > IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'keycloak_read_only') THEN > > CREATE ROLE keycloak_read_only NOLOGIN; > > END IF; > > END $$; > > > > -- 06_keycloak > > \connect keycloak > > REVOKE CONNECT ON DATABASE keycloak FROM PUBLIC; > > REVOKE ALL ON SCHEMA public FROM PUBLIC; > > > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE keycloak TO current_user; > > GRANT ALL ON SCHEMA public TO current_user; > > > > -- Everything below acts on tables this admin may not hold. On a managed > > -- instance the admin is not a superuser, and its membership in the role that > > -- owns the tables can be granted WITH INHERIT FALSE -- pg_has_role then reports > > -- MEMBER true and USAGE false, and every GRANT and ALTER on those tables is > > -- refused with "permission denied for table". Re-granting is allowed because > > -- the admin holds ADMIN OPTION; the plain form takes its INHERIT from rolinherit > > -- and so needs no version-gated syntax. > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN > > SELECT DISTINCT pg_get_userbyid(c.relowner) AS owner > > FROM pg_class c > > JOIN pg_namespace n ON n.oid = c.relnamespace > > WHERE n.nspname = 'public' > > AND c.relkind IN ('r', 'p', 'S', 'v') > > AND NOT pg_has_role(current_user, c.relowner, 'USAGE') > > LOOP > > EXECUTE format('GRANT %I TO current_user', r.owner); > > END LOOP; > > END $$; > > > > GRANT CONNECT ON DATABASE keycloak TO keycloak_read_only; > > GRANT USAGE ON SCHEMA public TO keycloak_read_only; > > GRANT SELECT ON ALL TABLES IN SCHEMA public TO keycloak_read_only; > > GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO keycloak_read_only; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT SELECT ON TABLES TO keycloak_read_only; > > > > GRANT keycloak_read_only TO keycloak_read_write; > > GRANT CONNECT, TEMPORARY, CREATE ON DATABASE keycloak TO keycloak_read_write; > > GRANT ALL ON SCHEMA public TO keycloak_read_write; > > GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO keycloak_read_write; > > GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO keycloak_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON TABLES TO keycloak_read_write; > > ALTER DEFAULT PRIVILEGES IN SCHEMA public > > GRANT ALL ON SEQUENCES TO keycloak_read_write; > > > > -- Ownership, not just privileges. ALTER TABLE requires ownership and GRANT ALL does > > -- not confer it, so an app that runs DDL at startup (mlflow's alembic) fails with > > -- "must be owner" on tables an earlier release created under a different role. > > -- Owning them as the group role lets any member migrate them and survives an > > -- app-role rename. current_user is granted the role first so the admin that runs > > -- this script does not lose the ability to manage what it just gave away. > > -- Re-running repairs ownership on an existing install; on a fresh one the loops > > -- find nothing and this is a no-op. > > GRANT keycloak_read_write TO current_user; > > DO $$ > > DECLARE r record; > > BEGIN > > FOR r IN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER TABLE public.%I OWNER TO keycloak_read_write', r.tablename); > > END LOOP; > > FOR r IN SELECT sequencename FROM pg_sequences WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER SEQUENCE public.%I OWNER TO keycloak_read_write', r.sequencename); > > END LOOP; > > FOR r IN SELECT viewname FROM pg_views WHERE schemaname = 'public' LOOP > > EXECUTE format('ALTER VIEW public.%I OWNER TO keycloak_read_write', r.viewname); > > END LOOP; > > END $$; > > > > -- 07_users > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > CREATE ROLE "seekrflow_app" WITH LOGIN PASSWORD :'app_password'; > > > > -- Must sort LAST: every role granted here is created by an earlier script. > > GRANT seekrflow_read_write TO "seekrflow_app"; > > GRANT agents_read_write TO "seekrflow_app"; > > GRANT user_auth_read_write TO "seekrflow_app"; > > GRANT metaflow_read_write TO "seekrflow_app"; > > GRANT mlflow_read_write TO "seekrflow_app"; > > > > ALTER ROLE "seekrflow_app" SET search_path TO public; > > > > -- 08_keycloak_user > > \connect postgres > > -- [GLOBAL] runs against the 'postgres' admin database > > -- > > -- Keycloak gets its own login role rather than sharing the app role. It stores > > -- password hashes and client secrets, so the app role must not reach its tables, > > -- and its own credential must not reach the rest of the data plane. > > -- > > CREATE ROLE "seekrflow_keycloak" WITH LOGIN PASSWORD :'keycloak_password'; > > > > GRANT keycloak_read_write TO "seekrflow_keycloak"; > > > > ALTER ROLE "seekrflow_keycloak" SET search_path TO public; > > ``` > > Save it as `seekrflow-databases.sql`, then run it from a machine that can reach the database: > > ```bash theme={null} > psql -h -U -d postgres -f seekrflow-databases.sql > ``` > > Run the whole script rather than parts of it. It switches between databases partway through, and later sections depend on roles that earlier sections create. # Create SeekrFlow secrets Source: https://docs.seekr.com/self-managed/flow/prepare/secrets-and-tokens Create every secret SeekrFlow reads, with the sfe CLI or by hand. SeekrFlow reads its credentials from Kubernetes secrets in the `seekrflow` namespace. You either create the secrets directly, or store them in your secret store for External Secrets Operator to sync. Most of the values come from [Collect credentials and values](/self-managed/flow/provision/checklist). ## Secrets SeekrFlow uses | Secret | Keys | When you need it | Where the value comes from | | - | - | - | - | | `seekrflow-license` | `license_key` | Always | Your Seekr account team | | `pg-creds` | `PG_HOST`, `PG_USER`, `PG_PASS`, `PG_APP_USER`, `PG_APP_PASS` | Always | Your PostgreSQL hostname and admin account, `seekrflow_app`, and the `seekrflow_app` password you generated. See [Provision PostgreSQL](/self-managed/flow/provision/postgresql). | | `auth-jwt` | `jwt_private.pem`, `jwt_public.pem`. In your secret store, `JWT_PRIVATE_KEY` and `JWT_PUBLIC_KEY`. | Always | You generate it | | `auth-otp` | `OTP_PEPPER_SECRET` | Always | You generate it | | `seekrflow-artifacts-pull-access` | Registry credentials | Always, in both the `seekrflow` and `argo-workflows` namespaces | Your Seekr registry username and token | | `hf-token` | `HF_TOKEN` | Always | Your Hugging Face account. SeekrFlow needs the secret even if you don't download gated models. | | `brave-search-api-key` | `BRAVE_SEARCH_API_KEY` | For agent web search | Your Brave Search API account | | `auth-crypto` | `CRYPTO_ROOT_KEY` | With Federal Information Processing Standard (FIPS) mode or single sign-on | You generate it | | `keycloak-credentials` | `db-user`, `db-password`, `admin-password` | With the bundled Keycloak | `seekrflow_keycloak`, and passwords you generate | | `opensearch-credentials` | `OPENSEARCH_USER`, `OPENSEARCH_PASS` | With OpenSearch in the cluster, on-premises | You generate it | | `appliance-storage-creds` | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` | On-premises | Your object store's access keys | ## Generate your own values With `sfe`, the `--auto-generate` option in [Create the secrets](#create-the-secrets) generates `auth-jwt`, `auth-otp`, `auth-crypto`, `keycloak-credentials`, and `opensearch-credentials`. It reuses existing values on later runs rather than replacing them. Without `sfe`, generate them yourself: ```bash theme={null} # auth-jwt: an RSA key pair openssl genrsa -out jwt_private.pem 2048 openssl rsa -in jwt_private.pem -pubout -out jwt_public.pem # auth-otp openssl rand -hex 32 # auth-crypto openssl rand -base64 32 ``` Generate each value once. Replacing the token signing key pair signs out every user. Replacing the root key forces every user with multi-factor authentication to enroll again. ## Create the secrets > [tab] With the sfe CLI > > **1. Create the secrets** > > `sfe secrets create` prompts for each value and generates the ones it can. > > * **External Secrets Operator** – Writes each secret to your secret store, then adds the secret mappings to your values file: > > ```bash theme={null} > sfe secrets create -f my-values.yaml --auto-generate > ``` > > * **Kubernetes secrets** – Creates the secrets in the cluster: > > ```bash theme={null} > sfe secrets create -f my-values.yaml --auto-generate --provider kubernetes -n seekrflow > ``` > > To skip a secret you don't need, press Enter at its first prompt. > > **2. Create the image pull secret** > > `sfe` doesn't create this secret. Create it with `kubectl` in both the `seekrflow` and `argo-workflows` namespaces, whichever approach you use. Argo Workflows runs SeekrFlow's training and ingestion jobs in its own namespace, and a Kubernetes secret works only in the namespace it's in. If you mirrored the images, use your own registry and its credentials instead of Seekr's: > > ```bash theme={null} > for ns in seekrflow argo-workflows; do > kubectl create secret docker-registry seekrflow-artifacts-pull-access \ > --namespace "$ns" \ > --docker-server=seekr.repo.sonatype.app \ > --docker-username="$REGISTRY_USERNAME" \ > --docker-password="$REGISTRY_PASSWORD" > done > ``` > > On-premises, also create `appliance-storage-creds` with `kubectl create secret generic`. > > > [!NOTE] > > > > With Kubernetes secrets, `sfe secrets create` checks for the `seekrflow` namespace only after you enter every value. If the namespace doesn't exist, the command fails and discards what you entered. Create it first. See [Create the namespaces](/self-managed/flow/provision/cluster#create-the-namespaces). > [tab] Without the sfe CLI > > Set these values to match the approach you chose in [Set up secret management](/self-managed/flow/provision/secret-management): > > | Setting | External Secrets Operator | Kubernetes secrets | > | - | - | - | > | `global.Secrets.enabled` | `true` | `false` | > | `global.Secrets.store.create` | `true` | `false` | > | `global.Secrets.store.provider` | Your store's configuration block. See the chart's `values.yaml` for Amazon Web Services (AWS) and Vault examples. | Not used. | > | `global.Secrets.secrets..remoteRefs` | The path to each secret in your store. | Not used. | > > With External Secrets Operator, store each secret in your secret store under `seekrflow/`. With Kubernetes secrets, create each one with `kubectl create secret generic` in the `seekrflow` namespace. For example: > > ```bash theme={null} > kubectl create secret generic auth-jwt \ > --namespace seekrflow \ > --from-file=jwt_private.pem=./jwt_private.pem \ > --from-file=jwt_public.pem=./jwt_public.pem > ``` > > Create the image pull secret in both the `seekrflow` and `argo-workflows` namespaces, whichever approach you use. Argo Workflows runs SeekrFlow's training and ingestion jobs in its own namespace, and a Kubernetes secret works only in the namespace it's in. If you mirrored the images, use your own registry and its credentials instead of Seekr's: > > ```bash theme={null} > for ns in seekrflow argo-workflows; do > kubectl create secret docker-registry seekrflow-artifacts-pull-access \ > --namespace "$ns" \ > --docker-server=seekr.repo.sonatype.app \ > --docker-username="$REGISTRY_USERNAME" \ > --docker-password="$REGISTRY_PASSWORD" > done > ``` ## Keep copies outside the cluster Back up the token signing key pair and the root key outside the cluster, such as in your organization's password manager. With Kubernetes secrets, the cluster holds the only copy. With External Secrets Operator, your secret store also holds a copy. > [!CAUTION] > > If you lose the root key, users with multi-factor authentication have to enroll again. Users who signed in through single sign-on have to sign in again. ## Trust a private certificate authority Some services SeekrFlow calls might use certificates from a private certificate authority, such as an internal object store or a corporate proxy. To trust them, store a certificate bundle in a secret and reference it: ```yaml theme={null} global: defaults: trustedCA: existingSecret: key: ca-certificates.crt ``` > [!WARNING] > > The bundle replaces each service's trust store rather than adding to it. Include the public root certificates and your own, or every other outbound Transport Layer Security (TLS) connection fails. `sfe preflight` warns if the bundle looks incomplete. ## Turn on FIPS mode FIPS mode switches the Auth service to FIPS 140-3 approved cryptography. It needs the root key and one setting: ```yaml theme={null} Auth: crypto: policy: fips ``` > [!WARNING] > > FIPS mode is an install-time choice. You can't turn it on or off later. Enable it only on a fresh, empty database. The Auth service refuses to start if stored password hashes don't match the policy. If you also enable the bundled Keycloak with FIPS mode, its database password must be at least 14 characters. # Set up the sfe CLI Source: https://docs.seekr.com/self-managed/flow/prepare/sfe-cli Choose where to run commands, install the sfe CLI, save a profile, sign in to the registry, and mirror images if needed. `sfe` is SeekrFlow's command-line tool. It generates your values file, creates SeekrFlow's secrets and databases, and installs and upgrades SeekrFlow. Set it up on the machine you run the rest of this guide from. ## Choose where to run commands Run the rest of this guide from a machine that can reach the Kubernetes API and Seekr's registry. If your laptop can't reach the cluster's API, use a machine inside your network, such as a bastion host. The identity you run commands as needs Kubernetes cluster-admin permissions. On Amazon Elastic Kubernetes Service (Amazon EKS), only the identity that created the cluster has them by default. Give any other identity an [access entry](https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html). On Amazon Web Services (AWS), `sfe` signs in with your AWS Command Line Interface (AWS CLI) credentials and needs a default Region. If `aws configure get region` prints nothing, set one: ```bash theme={null} aws configure set region ``` > [!NOTE] > > Installing with Helm is for experienced Helm and Kubernetes users who are building their own automation. If that's you, you need `sfe` only to mirror container images. Otherwise, follow this page to install `sfe`. ## Install the sfe CLI Download `sfe` from Seekr's registry with the registry username and token from your Seekr account team. Set `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` to those values, then follow the steps for your machine's operating system. > [tab] Linux > > **1. Download the binary** > > Replace `` with the `sfe` version to install, such as `3.11.2`: > > ```bash theme={null} > curl --fail -sSL -u "$REGISTRY_USERNAME:$REGISTRY_PASSWORD" -O "https://seekr.repo.sonatype.app/repository/seekr-raw-release/sfe-cli//sfe-linux-amd64" > curl --fail -sSL -u "$REGISTRY_USERNAME:$REGISTRY_PASSWORD" -O "https://seekr.repo.sonatype.app/repository/seekr-raw-release/sfe-cli//SHA256SUMS" > ``` > > **2. Check the download** > > ```bash theme={null} > sha256sum --ignore-missing -c SHA256SUMS > ``` > > The command prints `sfe-linux-amd64: OK`. If it reports `FAILED`, download the binary again. > > **3. Install the binary** > > ```bash theme={null} > chmod +x sfe-linux-amd64 > sudo mv sfe-linux-amd64 /usr/local/bin/sfe > ``` > > **4. Confirm the version** > > ```bash theme={null} > sfe --version > ``` > [tab] macOS > > **1. Download the binary** > > Replace `` with the `sfe` version to install, such as `3.11.2`: > > ```bash theme={null} > curl --fail -sSL -u "$REGISTRY_USERNAME:$REGISTRY_PASSWORD" -O "https://seekr.repo.sonatype.app/repository/seekr-raw-release/sfe-cli//sfe-darwin-arm64" > curl --fail -sSL -u "$REGISTRY_USERNAME:$REGISTRY_PASSWORD" -O "https://seekr.repo.sonatype.app/repository/seekr-raw-release/sfe-cli//SHA256SUMS" > ``` > > **2. Check the download** > > ```bash theme={null} > shasum -a 256 --ignore-missing -c SHA256SUMS > ``` > > The command prints `sfe-darwin-arm64: OK`. If it reports `FAILED`, download the binary again. > > **3. Install the binary** > > ```bash theme={null} > chmod +x sfe-darwin-arm64 > sudo mkdir -p /usr/local/bin > sudo mv sfe-darwin-arm64 /usr/local/bin/sfe > ``` > > **4. Confirm the version** > > ```bash theme={null} > sfe --version > ``` > > If macOS blocks `sfe` because Apple hasn't verified it, allow it, then run `sfe --version` again: > > ```bash theme={null} > xattr -d com.apple.quarantine /usr/local/bin/sfe > ``` If you don't have admin rights on the machine, put `sfe` in a folder in your home directory that's on your `PATH` instead. `sfe` doesn't need the `helm` or `aws` commands, but other steps in this guide do. For every tool the guide uses, see [Review SeekrFlow requirements](/self-managed/flow/plan/requirements#tools). ## Save a profile A profile saves the settings you'd otherwise type on every `sfe` command. **1. Find your Kubernetes context** ```bash theme={null} kubectl config current-context ``` Copy the name it prints. **2. Create the profile** Replace `` with a name for this deployment, such as `prod`: ```bash theme={null} sfe profile add ``` `sfe` asks for each setting. Enter these values: | Setting | What to enter | | - | - | | Kube context | The name you copied in the previous step. | | Namespace | `seekrflow`, the default. | | Values file | The name you plan to give your values file, such as `my-values.yaml`. You create the file later. | | AWS profile | The profile `sfe` uses to sign in to Amazon Web Services (AWS). Leave it blank to use your default profile, or for on-premises deployments. | | Helm release name | `seekrflow`, the default. | **3. Check the profile** ```bash theme={null} sfe profile current -p ``` The command prints the settings you entered. Later commands in this guide use `-p ` to apply these settings. Profiles don't save the release version. Add it with `-r` on each command. ## Sign in to the registry Sign in with the same `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` you used to download `sfe`: ```bash theme={null} echo "$REGISTRY_PASSWORD" | sfe chart login \ --username "$REGISTRY_USERNAME" \ --password-stdin ``` `sfe` signs in to Seekr's registry and saves the credentials for downloading the chart, installing, and upgrading. ## Mirror container images If your cluster can't reach Seekr's registry, copy SeekrFlow's container images into a registry inside your network. You can also mirror them if you want your cluster to pull images only from your own registry. The machine you mirror from needs to reach Seekr's registry and `registry.k8s.io`, which hosts the JobSet controller image. **1. Sign in to both registries** `sfe` reads registry sign-ins from Docker's credentials file, not from `sfe chart login`. Sign in to Seekr's registry and to your own: ```bash theme={null} echo "$REGISTRY_PASSWORD" | docker login seekr.repo.sonatype.app --username "$REGISTRY_USERNAME" --password-stdin docker login ``` On Amazon Elastic Container Registry (Amazon ECR), skip the second command. `sfe` signs in to Amazon ECR with your AWS credentials. **2. Preview the copy** To see what `sfe` will copy, run: ```bash theme={null} sfe images mirror -r --target-registry --dry-run ``` **3. Copy the images** ```bash theme={null} sfe images mirror -r --target-registry ``` On Amazon ECR, each image needs its own repository. To create them as you copy, add `--create-missing-repos`. This requires the `ecr:CreateRepository` permission. **4. Confirm the copy** To confirm every image arrived, run: ```bash theme={null} sfe images verify -r --registry ``` To also confirm each copied image is identical to Seekr's original, run: ```bash theme={null} sfe images compare -r --target-registry ``` **5. Point SeekrFlow at your registry** Set `global.repository` in your values file to your registry. Every image in the chart pulls from there, including images for supporting components such as MLflow and Argo Workflows. # Create the SeekrFlow values file Source: https://docs.seekr.com/self-managed/flow/prepare/values-file Generate a starter values file with the sfe CLI or start from the chart's defaults, add the settings sfe leaves out, and validate it. Every setting for your deployment lives in a single file, `my-values.yaml`. Environment differences are settings within that file rather than separate procedures. An Amazon Web Services (AWS) deployment and an on-premises deployment run the same install with different values. Either path uses the values from [Collect credentials and values](/self-managed/flow/provision/checklist). ## Generate the starter file > [tab] With the sfe CLI > > Before you start, complete [Set up the sfe CLI](/self-managed/flow/prepare/sfe-cli). Go to the folder where you want to keep the values file, such as your home folder, then run: > > ```bash theme={null} > sfe bootstrap -r -o my-values.yaml --provider aws > ``` > > Replace `` with the SeekrFlow release you're installing. For an on-premises deployment, replace `aws` with `on-prem`. > > `sfe` asks a series of questions and writes the answers to `my-values.yaml`. Most answers come from [Collect credentials and values](/self-managed/flow/provision/checklist). Type them rather than pasting from a formatted page. A pasted value can carry an invisible character that breaks image pulls without any error. > > These questions need more than a value from the checklist, or have a default that's wrong for most deployments: > > | Question | What to enter | > | - | - | > | Container image registry | Seekr's registry, `seekr.repo.sonatype.app/seekr-docker-release/seekr`, or your own registry if you mirrored the images. | > | File store path | Your bucket name, without `s3://`. | > | IRSA role ARN | Leave it blank if you use Amazon Elastic Kubernetes Service (Amazon EKS) Pod Identity. | > | OpenSearch port and scheme | Accept the defaults, `443` and `https://`. | > | Enable the Valkey cache | `y` for any deployment that untrusted users can reach. See [Size your deployment](/self-managed/flow/plan/size-deployment). | > | Configure ingress | `y` if SeekrFlow creates its own ingress. Enter your hostname and `alb`. | > | Accelerators fine-tunes may use | The GPU types in your GPU nodes: `A10`, `A100`, `H100`, or `MI300X`. For any other NVIDIA GPU, such as the L4 or L40S, enter `A10`. | > | Create storage class | `y`. Enter your Amazon Elastic File System (Amazon EFS) file system ID when asked. | > | Add a Context Attribution model | `y`. Choose a model by number. | > | Enable shared tools | `y`. Leave `pythonexecutor` off unless you trust all your users. It runs every team's Python code in one shared pod, outside the sandbox. | > | Deploy the bundled Keycloak, and Enable Keycloak SSO | `n` to both for local accounts. `y` to both for the bundled Keycloak, or `n` then `y` for your own Keycloak. | > | Organization name | Your organization's name. Users see it in the UI and in invitation emails. | > | Let SeekrFlow create the secret store resource | `y`. The default is `n`. | > | Secret store provider | `aws-sm` for AWS Secrets Manager. The default is `aws-ssm`, Parameter Store. | > > After it saves the file, `sfe` prints a command to label each GPU node with its GPU type, such as: > > ```bash theme={null} > kubectl label node seekr.io/gpu_type=A10 > ``` > > Run it for each GPU node before your first fine-tuning job. Fine-tuning jobs run only on nodes with this label. To check the labels, run `kubectl get nodes -L seekr.io/gpu_type`. > [tab] Without the sfe CLI > > Start from the default values file that ships with the chart. Sign in to Seekr's registry with the credentials from your Seekr account team: > > ```bash theme={null} > echo "$REGISTRY_PASSWORD" | helm registry login seekr.repo.sonatype.app \ > --username "$REGISTRY_USERNAME" \ > --password-stdin > ``` > > Pull the chart, unpack it, and copy its default values file: > > ```bash theme={null} > helm pull oci://seekr.repo.sonatype.app/seekr-docker-release/seekr/flow-helm-chart --version > tar -xzf flow-helm-chart-.tgz > cp flow-helm-chart/values.yaml my-values.yaml > ``` > > Fill in `my-values.yaml` with your provisioning values. Keep the unpacked chart. You install from it. ## Finish the values file `sfe` doesn't write these settings. Add them before you install. 1. **Image pull secret.** Under `global`, add: ```yaml theme={null} imagePullSecrets: - name: seekrflow-artifacts-pull-access ``` 2. **Load balancer annotations.** If SeekrFlow creates its own ingress on AWS, add the annotations from [Load balancer annotations](/self-managed/flow/provision/networking#load-balancer-annotations) under `global.ingress.annotations`. 3. **Kubernetes secrets only.** Set `global.Secrets.enabled` to `false`. > [!NOTE] > > YAML indentation is significant. Match the surrounding indentation exactly and never use tabs. The file doesn't define the models SeekrFlow uses for ingestion, embeddings, and agent planning yet. You add them in [Configure models](/self-managed/flow/prepare/models). ## Validate Check that the file matches the chart schema. > [tab] With the sfe CLI > > ```bash theme={null} > sfe values lint -r -f my-values.yaml > ``` > [tab] Without the sfe CLI > > From the folder that contains the unpacked chart, run: > > ```bash theme={null} > helm lint flow-helm-chart -f my-values.yaml > ``` > [!NOTE] > > Validation confirms that each setting in the file is valid. It doesn't check whether any are missing, such as the ones in [Finish the values file](#finish-the-values-file). # Collect SeekrFlow credentials and values Source: https://docs.seekr.com/self-managed/flow/provision/checklist Request the credentials SeekrFlow needs and confirm you have every value from provisioning before you prepare the install. Gather everything on this page before you prepare the install. Request the credentials from Seekr early, because they can take time to arrive. ## Request credentials Store each credential using the approach you chose in [Set up secret management](/self-managed/flow/provision/secret-management). ### From Seekr Request these from your Seekr account team: * **License key** – Validated at startup by the License service. Pods don't become ready without a valid key. * **Registry credentials** – A username and user token for Seekr's registry, which you use to pull the chart and images. Tokens expire once a year. When yours expires, image pulls and upgrades fail with authentication errors until you get a new one. * **Model configuration** – A `flowmodel.yaml` file that defines which models to run on your GPU nodes and how to size them. ### From third parties * **Hugging Face access token** – Required for every deployment. SeekrFlow also uses it to download gated model weights, which include most Llama variants. A free Hugging Face account includes an access token. For each gated model you run, accept its license on the model's Hugging Face page, using the account that owns the token. * **Brave Search API key** – Lets agents run web searches. Without it, agents can't search the web. Sign up for the [Brave Search API](https://brave.com/search/api/), subscribe to the Data for Search API plan, which has a free tier, and generate a key from the developer dashboard. ### Amazon Bedrock access To use models hosted in Amazon Bedrock, make sure your cloud account can use each model before you configure it: * **Amazon Bedrock** – Most models are available without setup. Before you use an Anthropic model, submit the one-time use-case form in the Amazon Bedrock console. In Amazon Web Services (AWS) GovCloud (US), request access to each model in the console. ## Record your values Confirm you have every value in these tables. Each table also appears on the page where you create the resource. `sfe bootstrap` asks for most of these values when it generates your values file, and you enter the rest when you create secrets. ### Cluster From [Provision the cluster](/self-managed/flow/provision/cluster). | Value | Used for | Example or format | | - | - | - | | Cluster name | `global.cloudProvider.clusterName` | `seekrflow-prod` | | AWS Region, AWS only | `global.cloudProvider.aws.region` | `us-east-1` | | Kubernetes context | Your `sfe` profile | The `kubectl` context for this cluster. | | GPU node label | `global.defaults.gpuNodeLabel` | `nvidia.com/gpu.present: "true"` | | Whether a JobSet controller is running | `jobset.enabled` | `true` only if you need multi-node fine-tuning and the cluster has no JobSet controller. | ### Networking From [Set up networking and cluster policies](/self-managed/flow/provision/networking). > [tab] Amazon Web Services (AWS) > > | Value | Used for | Example or format | > | - | - | - | > | Hostname | `global.ingress.host` | `seekrflow.example.com` | > | Ingress class | `global.ingress.className` | `"alb"` | > | Chart-managed or externally managed ingress | `global.ingress.enabled` | `true` for chart-managed ingress. | > | Load balancer annotations | `global.ingress.annotations` | SeekrFlow requires `target-type: ip` and HTTPS on port 443, and recommends a 300-second idle timeout. See [Load balancer annotations](/self-managed/flow/provision/networking#load-balancer-annotations). | > [tab] On-premises > > | Value | Used for | Example or format | > | - | - | - | > | Hostname | `global.ingress.host` | `seekrflow.example.com` | > | Ingress class | `global.ingress.className` | `"nginx"` or `"traefik"` | > | Chart-managed or externally managed ingress | `global.ingress.enabled` | `true` for chart-managed ingress. | ### PostgreSQL From [Provision PostgreSQL](/self-managed/flow/provision/postgresql). | Value | Used for | Example or format | | - | - | - | | Instance hostname | `global.defaults.postgres.host`, and the `pg-creds` secret: `PG_HOST` | The endpoint of your database instance. | | Port | `global.defaults.postgres.port` | `5432` | | Admin account name and password | `pg-creds` secret: `PG_USER`, `PG_PASS` | The admin credentials you set when you created the instance. SeekrFlow uses them for migrations. | | Application role password | `pg-creds` secret: `PG_APP_PASS` | The password you generated for `seekrflow_app`. | | Keycloak role password, if you enable Keycloak | `keycloak-credentials` secret: `db-password` | The password you generated for `seekrflow_keycloak`. | ### OpenSearch From [Provision OpenSearch](/self-managed/flow/provision/opensearch). > [tab] Amazon Web Services (AWS) > > | Value | Used for | Example or format | > | - | - | - | > | Hostname | `global.defaults.opensearch.host` | Your domain endpoint. | > | Port | `global.defaults.opensearch.port` | `443` for Amazon OpenSearch Service, `9200` for OpenSearch you run yourself. | > | Scheme | `global.defaults.opensearch.scheme` | `"https://"` | > | Whether the chart deploys OpenSearch | `opensearch.enabled` | `false`. `sfe bootstrap` sets it to `true`, which you correct in [Create the values file](/self-managed/flow/prepare/values-file). | > [tab] On-premises > > | Value | Used for | Example or format | > | - | - | - | > | Whether the chart deploys OpenSearch | `opensearch.enabled` | `true` | > | Admin user | `opensearch-credentials` secret: `OPENSEARCH_USER` | `admin`. OpenSearch requires this name. | > | Admin password | `opensearch-credentials` secret: `OPENSEARCH_PASS` | The password you generated, or the one `sfe secrets create --auto-generate` creates. | > | Scheme | `global.defaults.opensearch.scheme` | `"https://"` | ### Storage From [Provision storage](/self-managed/flow/provision/storage). > [tab] Amazon Web Services (AWS) > > | Value | Used for | Example or format | > | - | - | - | > | Bucket name | `global.fileStorePath` | `seekrflow-data`, or `seekrflow-data/prod` with a path. Use the bare bucket name, without `s3://`. | > | Shared file storage type | `global.SharedModelCache.type` | `"efs"` | > | File system ID | `global.SharedModelCache.efs.fileSystemId` | `fs-0123456789abcdef0` | > [tab] On-premises > > | Value | Used for | Example or format | > | - | - | - | > | Bucket name | `global.fileStorePath` | `seekrflow-data`, or `seekrflow-data/prod` with a path. Use the bare bucket name, without a scheme such as `s3://`. | > | Object store endpoint | `global.cloudProvider.on-prem.storageEndpoint` | `http://minio.seekrflow.svc:9000` | > | Object store access keys | `appliance-storage-creds` secret: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` | Your MinIO access key and secret key. | > | Shared file storage type | `global.SharedModelCache.type` | `"nfs"` or `"longhorn"` | > | NFS server and path | `global.SharedModelCache.nfs.server`, `global.SharedModelCache.nfs.path` | Your NFS server hostname or IP address, and the exported path. | > | Existing Longhorn storage class | `global.SharedModelCache.createStorageClass`, `global.SharedModelCache.storageClassName` | `false` and `longhorn` | ### Cloud identity From [Set up cloud identity](/self-managed/flow/provision/cloud-identity). | Value | Used for | Example or format | | - | - | - | | Role ARN, IAM roles for service accounts only | `global.cloudProvider.identity` annotation `eks.amazonaws.com/role-arn` | `arn:aws:iam::123456789012:role/seekrflow`. For Amazon EKS Pod Identity, leave `global.cloudProvider.identity` as `{}`. Setting the role ARN switches SeekrFlow's workflow pods to IAM roles for service accounts, which fails without an OIDC provider. | ### Secret management From [Set up secret management](/self-managed/flow/provision/secret-management). | Value | Used for | Example or format | | - | - | - | | Create the secret store | `global.Secrets.store.create` | `true` | | Secret store provider | `global.Secrets.store.provider` | On AWS, the service and Region, such as `aws: {service: SecretsManager, region: us-east-1}`. For HashiCorp Vault, the server address and authentication. | ### Credentials From the credentials you requested in [Request credentials](#request-credentials). | Value | Used for | Example or format | | - | - | - | | License key | `seekrflow-license` secret: `license_key` | A long token from your Seekr account team. | | Registry username and token | The `seekrflow-artifacts-pull-access` image pull secret | From your Seekr account team. | | Model configuration | Merged into your values file under `FlowModel.models` | The `flowmodel.yaml` file from your Seekr account team. | | Hugging Face access token | `hf-token` secret: `HF_TOKEN` | Starts with `hf_`. | | Brave Search API key | `brave-search-api-key` secret: `BRAVE_SEARCH_API_KEY` | From the Brave Search API developer dashboard. | | External model IDs, optional | The model settings in [Configure models](/self-managed/flow/prepare/models) | An `aws-bedrock:` model ID. | # Set up SeekrFlow cloud identity Source: https://docs.seekr.com/self-managed/flow/provision/cloud-identity Create the role or managed identity SeekrFlow uses to reach your cloud services. Create the identity SeekrFlow's own pods use to reach your cloud services, such as object storage, OpenSearch, and your secret store. It's separate from the roles you created for Amazon Elastic Kubernetes Service (Amazon EKS), the nodes, and the cluster add-ons. Those roles only let each component do its own work. For every role in a deployment, see [Security considerations](/self-managed/flow/security#aws-iam-roles). You connect this identity to SeekrFlow's service accounts during configuration. > [!NOTE] > > Skip this page for on-premises deployments. Storage credentials come from a Kubernetes secret, and on-premises deployments don't use cloud identity. ## Choose a method On Amazon Web Services (AWS), choose one of these methods: | Method | How it works | | - | - | | Amazon EKS Pod Identity (recommended) | Amazon EKS associates the role with SeekrFlow's service accounts. The service accounts don't need annotations. | | AWS Identity and Access Management (IAM) roles for service accounts | Each service account carries an annotation with the role's Amazon Resource Name (ARN). | ## Create the identity > [tab] Amazon Web Services (AWS) > > Create an IAM role for SeekrFlow. Attach a permission policy that grants the permissions in this table, with the scope each row lists. > > | Service | Actions | Scope | When needed | > | - | - | - | - | > | Amazon Simple Storage Service (Amazon S3) | `s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:GetObjectAttributes`, `s3:GetObjectVersion` | Objects in your SeekrFlow bucket, such as `arn:aws:s3:::/*` | Always | > | Amazon S3 | `s3:ListBucket` | Your SeekrFlow bucket, such as `arn:aws:s3:::` | Always | > | AWS License Manager | `license-manager:ListReceivedLicenses`, `license-manager:GetLicense` | `*`. License Manager doesn't support resource-level scoping. | Always | > | AWS Secrets Manager | `secretsmanager:GetSecretValue` | Secrets under `seekrflow/*` | If you store secrets in Secrets Manager | > | AWS Systems Manager Parameter Store | `ssm:GetParameter`, `ssm:GetParameters`, `ssm:GetParametersByPath`, `ssm:GetParameterHistory` | Parameters under `seekrflow/*` | If you store secrets in Parameter Store | > | AWS Key Management Service (AWS KMS) | `kms:Decrypt`, with the condition `kms:ViaService` set to `ssm..amazonaws.com` | The key that encrypts your SecureString parameters | If you store secrets as SecureString parameters | > | Amazon OpenSearch Service | `es:ESHttp*` | Your domain, such as `arn:aws:es:::domain//*` | If you use Amazon OpenSearch Service | > | Amazon Bedrock | `bedrock:InvokeModel`, `bedrock:InvokeModelWithResponseStream` | The inference profile ARNs and foundation model ARNs you use. A cross-Region inference profile also needs the model ARN in each Region the profile routes to. | If Amazon Bedrock serves any of your models | > > In AWS GovCloud (US), ARNs use the `aws-us-gov` partition, such as `arn:aws-us-gov:s3:::`. > > The role's trust policy depends on your method: > > * **Amazon EKS Pod Identity** – Trust the `pods.eks.amazonaws.com` service principal, with the `sts:AssumeRole` and `sts:TagSession` actions. See [Create IAM role with trust policy required by EKS Pod Identity](https://docs.aws.amazon.com/eks/latest/userguide/pod-id-role.html). During configuration, `sfe cloud-identity aws` updates the trust policy and creates a Pod Identity association for each SeekrFlow service account. > * **IAM roles for service accounts** – Trust your cluster's OpenID Connect (OIDC) provider. `sfe cloud-identity aws` doesn't configure this method. See [IAM roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html). ## Record the values Note these values. You will enter them when you create the values file. | Value | Used for | Example or format | | - | - | - | | Role ARN, IAM roles for service accounts only | `global.cloudProvider.identity` annotation `eks.amazonaws.com/role-arn` | `arn:aws:iam::123456789012:role/seekrflow`. For Amazon EKS Pod Identity, leave `global.cloudProvider.identity` as `{}`. Setting the role ARN switches SeekrFlow's workflow pods to IAM roles for service accounts, which fails without an OIDC provider. | # Provision the Kubernetes cluster for SeekrFlow Source: https://docs.seekr.com/self-managed/flow/provision/cluster Create the Kubernetes cluster SeekrFlow runs on, add its nodes, and prepare the GPU nodes. SeekrFlow runs on a Kubernetes cluster you create and manage. Create it with your provider's standard process, and make sure it meets the requirements in [Review SeekrFlow requirements](/self-managed/flow/plan/requirements). ## Create the cluster > [tab] Amazon Web Services (AWS) > > Create an Amazon Elastic Kubernetes Service (Amazon EKS) cluster with the AWS Management Console, `eksctl`, or the AWS Command Line Interface (AWS CLI). See [Create an Amazon EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html). Use the settings in this table, and leave the rest at their defaults. > > | Setting | What SeekrFlow needs | > | - | - | > | Name and AWS Region | Any name. Any commercial Region, or `us-gov-west-1` or `us-gov-east-1` for AWS GovCloud (US). You enter both in the values file later. | > | EKS Auto Mode | Off. SeekrFlow runs on managed node groups. Auto Mode replaces and consolidates nodes on its own schedule, which can interrupt model serving and fine-tuning and release GPU instances that are hard to replace. | > | Kubernetes version | One of the three most recent Kubernetes minor versions. Versions in Amazon EKS extended support aren't supported. | > | Cluster IAM role | An AWS Identity and Access Management (IAM) role that Amazon EKS can assume, with the `AmazonEKSClusterPolicy` managed policy attached. If you already have one, such as `AmazonEKSClusterRole`, use it. Otherwise, create one. See [Amazon EKS cluster IAM role](https://docs.aws.amazon.com/eks/latest/userguide/cluster-iam-role.html). | > | Virtual private cloud (VPC) and subnets | Any layout your organization uses. Amazon EKS requires subnets in at least two Availability Zones. The nodes must reach the container registry, object storage, PostgreSQL, OpenSearch, and any cloud model services you use. | > | Endpoint access | Any. If you select **Private**, run `kubectl` and `sfe` from a machine inside your network, such as a bastion host. | > | Add-ons | The Amazon EKS Pod Identity Agent, which SeekrFlow uses to reach your cloud services. See [Set up the Amazon EKS Pod Identity Agent](https://docs.aws.amazon.com/eks/latest/userguide/pod-id-agent-setup.html). Also keep Amazon VPC CNI, CoreDNS, and kube-proxy, which the cluster needs, and Metrics Server, which SeekrFlow needs to scale its services. SeekrFlow doesn't need the other add-ons the console preselects, such as External DNS. Remove any you don't plan to configure. | > [tab] On-premises > > Use any conformant Kubernetes cluster, meaning one that meets the requirements of the [Kubernetes conformance tests](https://github.com/cncf/k8s-conformance). > > The cluster must also run [Metrics Server](https://github.com/kubernetes-sigs/metrics-server), which SeekrFlow needs to scale its services. ## Add worker and GPU nodes Add two sets of nodes to the cluster: * **Worker nodes** – Run the platform services. Provision the virtual CPUs (vCPUs) and memory from [Size your deployment](/self-managed/flow/plan/size-deployment). Enabling the Valkey caches takes at least three worker nodes. * **GPU nodes** – Run model servers, fine-tuning, and explainability workloads. Use an instance type or server that meets the [GPU requirements](/self-managed/flow/plan/requirements#gpu-nodes), with the GPU count from [Size your deployment](/self-managed/flow/plan/size-deployment). Each GPU node needs enough GPUs and memory for the largest model it hosts, because a model can't span nodes. Both must be nodes you manage. Serverless compute, such as AWS Fargate, isn't supported. > [tab] Amazon Web Services (AWS) > > Create two managed node groups, one for worker nodes and one for GPU nodes. See [Create a managed node group for your cluster](https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html). Use the settings in this table, and leave the rest at their defaults. > > | Setting | Worker node group | GPU node group | > | - | - | - | > | Node IAM role | A role with the `AmazonEKSWorkerNodePolicy`, `AmazonEC2ContainerRegistryReadOnly`, and `AmazonEKS_CNI_Policy` managed policies attached. If you already have one, use it. Otherwise, create one. See [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html). | The same role. | > | Amazon Machine Image (AMI) type | A standard x86_64 AMI type, such as Amazon Linux 2023 (x86_64) Standard. | An NVIDIA AMI type, such as Amazon Linux 2023 NVIDIA or Bottlerocket NVIDIA. On Kubernetes 1.34 and later, these include driver 580 or newer. Earlier Kubernetes versions get an older driver. If your compliance requirements call for FIPS mode on the nodes, use an NVIDIA AMI with FIPS mode enabled, such as Amazon Linux 2023 NVIDIA. See [Use EKS-optimized accelerated AMIs for GPU instances](https://docs.aws.amazon.com/eks/latest/userguide/ml-eks-optimized-ami.html). | > | Instance type | Enough instances for the vCPUs and memory in your sizing, and at least three if you enable the Valkey caches. | An instance family with a supported GPU, such as G5 (A10G), G6 (L4), G6e (L40S), P4d (A100), or P5 (H100). Check that your Region offers it and that your quota covers it. | > | Root volume | At least 100 GiB. | At least 200 GiB, plus temporary space for fine-tuning jobs. See [Size your deployment](/self-managed/flow/plan/size-deployment). | > | Kubernetes taints | None. | Optional. To keep platform services off GPU nodes, add the [taint](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) `nvidia.com/gpu=true:NoSchedule`. Model pods on Amazon EKS accept this taint automatically. | > | Subnets | The subnets you chose for the cluster. | The same subnets. | > [tab] On-premises > > Join the worker and GPU servers to the cluster as nodes, using your Kubernetes distribution's process. > > On each GPU node, install an NVIDIA driver that meets the [driver requirement](/self-managed/flow/plan/requirements#gpu-nodes). > > To keep platform services off GPU nodes, [taint](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) the GPU nodes with `nvidia.com/gpu=true:NoSchedule`. Each model then needs a matching toleration in `FlowModel.models..tolerations`. See [Run models on reserved GPU nodes](/self-managed/flow/prepare/models#run-models-on-reserved-gpu-nodes). ## Check the cluster Run these checks after the nodes are ready. Each one tells you a value to record. > [tab] Amazon Web Services (AWS) > > **1. Connect to the cluster** > > Add the cluster to your `kubectl` configuration: > > ```bash theme={null} > aws eks update-kubeconfig --name --region > ``` > > Then confirm every node shows `Ready`: > > ```bash theme={null} > kubectl get nodes > ``` > > **2. Check Metrics Server** > > To check that Metrics Server is running, run: > > ```bash theme={null} > kubectl top nodes > ``` > > If the command prints CPU and memory for each node, Metrics Server is running. If it returns an error, add the Metrics Server add-on to the cluster. It takes about a minute to start reporting. > > **3. Check the NVIDIA device plugin** > > The NVIDIA device plugin makes each node's GPUs available to Kubernetes. To check whether it's running, run: > > ```bash theme={null} > kubectl get daemonset --all-namespaces | grep nvidia-device-plugin > ``` > > If the command prints nothing, the plugin isn't running. Install it before you install SeekrFlow, which doesn't install it for you: > > ```bash theme={null} > helm repo add nvdp https://nvidia.github.io/k8s-device-plugin > helm install nvidia-device-plugin nvdp/nvidia-device-plugin --namespace kube-system > ``` > > For other installation options, see the [NVIDIA device plugin](https://github.com/NVIDIA/k8s-device-plugin) documentation. > > The Bottlerocket NVIDIA AMIs include the plugin. The Amazon Linux 2023 NVIDIA AMIs don't. > > **4. Find the GPU node label** > > Kubernetes needs a label to identify which nodes are GPU nodes. Any key-value pair works as long as it matches what is on your nodes. To see the labels on your nodes, run: > > ```bash theme={null} > kubectl get nodes --show-labels > ``` > > The Amazon Linux 2023 NVIDIA AMIs add `nvidia.com/gpu.present: "true"`. If all your GPU nodes share one instance type, you can also use `node.kubernetes.io/instance-type`, such as `node.kubernetes.io/instance-type: g5.xlarge`. > > **5. Check for a JobSet controller** > > Multi-node fine-tuning needs the JobSet controller. SeekrFlow can install it during configuration, but a cluster must not run two. To check whether one is installed, run: > > ```bash theme={null} > kubectl get crd jobsets.jobset.x-k8s.io > ``` > > If the command returns `NotFound`, JobSet isn't installed. Record `true` for `jobset.enabled` only if you need multi-node fine-tuning. Otherwise, record `false`. If the command returns the resource, JobSet is already installed. Record `false`. > [tab] On-premises > > **1. Connect to the cluster** > > Set your `kubectl` context to the cluster, using your Kubernetes distribution's process. Then confirm every node shows `Ready`: > > ```bash theme={null} > kubectl get nodes > ``` > > **2. Check Metrics Server** > > To check that Metrics Server is running, run: > > ```bash theme={null} > kubectl top nodes > ``` > > If the command prints CPU and memory for each node, Metrics Server is running. If it returns an error, install [Metrics Server](https://github.com/kubernetes-sigs/metrics-server). It takes about a minute to start reporting. > > **3. Check the NVIDIA driver** > > Run `nvidia-smi` on each GPU node. The **Driver Version** it reports must be 580 or later. > > **4. Check the NVIDIA device plugin** > > The NVIDIA device plugin makes each node's GPUs available to Kubernetes. To check whether it's running, run: > > ```bash theme={null} > kubectl get daemonset --all-namespaces | grep nvidia-device-plugin > ``` > > If the command prints nothing, the plugin isn't running. Install it before you install SeekrFlow, which doesn't install it for you: > > ```bash theme={null} > helm repo add nvdp https://nvidia.github.io/k8s-device-plugin > helm install nvidia-device-plugin nvdp/nvidia-device-plugin --namespace kube-system > ``` > > For other installation options, see the [NVIDIA device plugin](https://github.com/NVIDIA/k8s-device-plugin) documentation. > > **5. Find the GPU node label** > > Kubernetes needs a label to identify which nodes are GPU nodes. Any key-value pair works as long as it matches what is on your nodes. To see the labels on your nodes, run: > > ```bash theme={null} > kubectl get nodes --show-labels > ``` > > Use whatever label your GPU nodes carry. > > **6. Check for a JobSet controller** > > Multi-node fine-tuning needs the JobSet controller. SeekrFlow can install it during configuration, but a cluster must not run two. To check whether one is installed, run: > > ```bash theme={null} > kubectl get crd jobsets.jobset.x-k8s.io > ``` > > If the command returns `NotFound`, JobSet isn't installed. Record `true` for `jobset.enabled` only if you need multi-node fine-tuning. Otherwise, record `false`. If the command returns the resource, JobSet is already installed. Record `false`. ## Create the namespaces SeekrFlow installs into the `seekrflow` namespace and runs training and ingestion jobs in the `argo-workflows` namespace. Create both before you continue. Later steps add network policies, secrets, and cloud identity settings to them. ```bash theme={null} kubectl create namespace seekrflow kubectl create namespace argo-workflows ``` If a namespace already exists, `kubectl` returns an `AlreadyExists` error. You can continue. ## Record the values Note these values. You will enter them when you create the values file. | Value | Used for | Example or format | | - | - | - | | Cluster name | `global.cloudProvider.clusterName` | `seekrflow-prod` | | AWS Region, AWS only | `global.cloudProvider.aws.region` | `us-east-1` | | Kubernetes context | Your `sfe` profile | The `kubectl` context for this cluster. | | GPU node label | `global.defaults.gpuNodeLabel` | `nvidia.com/gpu.present: "true"` | | Whether a JobSet controller is running | `jobset.enabled` | `true` only if you need multi-node fine-tuning and the cluster has no JobSet controller. | # Set up networking and cluster policies for SeekrFlow Source: https://docs.seekr.com/self-managed/flow/provision/networking Set up the ingress, TLS certificate, DNS record, network policies, and admission policies SeekrFlow needs. An ingress resource maps external HTTPS traffic to SeekrFlow's services through path-based rules. An ingress controller runs inside your cluster, watches for ingress resources, and creates and configures the load balancer for them. ## Choose an approach * **Chart-managed ingress** – SeekrFlow creates the ingress resource for you, and your ingress controller creates the load balancer from it. This is the quickest way to get running. * **Externally managed ingress** – You create the ingress resource yourself, with the routes listed in [Create your own ingress resource](#create-your-own-ingress-resource). Recommended for production, because you keep control of Transport Layer Security (TLS), annotations, and lifecycle. ## Install an ingress controller Both approaches need an ingress controller. The chart doesn't install one. > [tab] Amazon Web Services (AWS) > > Install the AWS Load Balancer Controller. See [Install AWS Load Balancer Controller with Helm](https://docs.aws.amazon.com/eks/latest/userguide/lbc-helm.html). Use the settings in this table. > > | Setting | What SeekrFlow needs | > | - | - | > | AWS Identity and Access Management (IAM) role | A role with the controller's IAM policy from AWS's guide. In AWS GovCloud (US), use the GovCloud version of the policy. Connect the role through Amazon Elastic Kubernetes Service (Amazon EKS) Pod Identity, with namespace `kube-system` and service account `aws-load-balancer-controller`. AWS's guide uses `eksctl` and IAM roles for service accounts instead. Either works. | > | Helm values | `clusterName`, `region`, and `vpcId`. Without `region` and `vpcId`, the controller can't discover them from the node and fails to start. | > | Subnet tags | `kubernetes.io/role/elb` on the subnets for an internet-facing load balancer, or `kubernetes.io/role/internal-elb` for an internal one. The controller creates the Application Load Balancer in the tagged subnets. | > > To check that the controller is running, run: > > ```bash theme={null} > kubectl get deployment -n kube-system aws-load-balancer-controller > ``` > > `READY` shows `2/2` when it's running. > [tab] On-premises > > Install an NGINX or Traefik ingress controller. ## Get a TLS certificate TLS terminates at the ingress. Get a TLS certificate for the hostname your users will reach SeekrFlow at. > [tab] Amazon Web Services (AWS) > > Request or import a certificate in AWS Certificate Manager (ACM). The Application Load Balancer uses it. ACM issues a requested certificate only after you validate that you own the domain, usually with a DNS record. If the domain is in Amazon Route 53, the ACM console can create the validation record for you. See [Request a public certificate](https://docs.aws.amazon.com/acm/latest/userguide/acm-public-certificates.html). > [tab] On-premises > > Get a certificate for the NGINX or Traefik ingress controller. ## Create your own ingress resource Skip this section if you use chart-managed ingress. Create your own ingress resource with these routes, in this order. Use `pathType: Prefix` for every path. Include a route only for services you enable. For example, include `/v1/explainability` only if you enable Explainability. On AWS, add the [load balancer annotations](#load-balancer-annotations) to your ingress resource. | Order | Path | Service | Port | | - | - | - | - | | 1 | `/v1/inference` | `seekrflow-serving` | 8001 | | 2 | `/v1/flow` | `seekrflow-training` | 8080 | | 3 | `/v2/flow` | `seekrflow-training` | 8080 | | 4 | `/v1/functions` | `seekrflow-router` | 8000 | | 5 | `/v1/threads` | `seekrflow-router` | 8000 | | 6 | `/v1/explainability` | `seekrflow-explainability` | 8080 | | 7 | `/v1` | `seekrflow-auth` | 8003 | | 8 | `/` | `seekrflow-frontend` | 3000 | > [!WARNING] > > On AWS, the Application Load Balancer evaluates rules from top to bottom. A `/v1` rule placed before `/v1/explainability` captures its traffic. ## Create the DNS record Create a DNS record that points your hostname at the address of your load balancer or ingress controller. The hostname must resolve from your users' machines, from inside the cluster, and from wherever you run `sfe`. > [tab] Amazon Web Services (AWS) > > When you create the record depends on your approach: > > * **Chart-managed ingress** – The load balancer doesn't exist until you install SeekrFlow. Come back to this section after the install. > * **Externally managed ingress** – Create the record once your ingress resource has a load balancer address. > > **1. Get the load balancer address** > > For chart-managed ingress, run: > > ```bash theme={null} > kubectl get ingress -n seekrflow > ``` > > For your own ingress, run the same command in your ingress resource's namespace. The address is in the `ADDRESS` column. > > **2. Create the record** > > Point your hostname, the `global.ingress.host` value in your values file, at that address. On Amazon Route 53, use an alias record. On other DNS providers, use a CNAME record. > [tab] On-premises > > **1. Get the ingress controller's address** > > Find the external IP address or hostname of your NGINX or Traefik controller's service. > > **2. Create the record** > > Point your hostname, the `global.ingress.host` value in your values file, at that address. Use an A record for an IP address, or a CNAME record for a hostname. ## Plan network policies SeekrFlow does not ship network policies, and it runs without any. If you apply a default-deny policy, put these allowances in place before you install, or the install fails: * The ingress controller to each SeekrFlow service port. * SeekrFlow pods to each other within the `seekrflow` namespace. * SeekrFlow pods to PostgreSQL, OpenSearch, and object storage. * These components to the Kubernetes API server: the operator, Training, Serving, Router, Explainability, License, Ingestion, AI-Ready Data, the LoRA controller, the Argo Workflows controller and its workflow pods, the JobSet controller when enabled, and the `sfe` preflight and database setup jobs. * External Secrets Operator to your secret store, from its own namespace. * Pods in `seekrflow` to the Argo server in `argo-workflows`, on port 2746. Argo Workflows runs in `argo-workflows`, and its job pods run in `seekrflow`. * The outbound connections your deployment uses. See [Security considerations](/self-managed/flow/security). ## Plan admission policies If your cluster runs a policy engine, such as Kyverno or Open Policy Agent (OPA) Gatekeeper, make sure its policies admit SeekrFlow's pods before you install: * If your policies restrict user IDs, permit `65532` for the operator and `1001` for the workloads it creates. * The Argo server and the model catalog sync job don't use SeekrFlow's security context. Exempt them from policies that require it. ## Record the values Note these values. You will enter them when you create the values file. > [tab] Amazon Web Services (AWS) > > | Value | Used for | Example or format | > | - | - | - | > | Hostname | `global.ingress.host` | `seekrflow.example.com` | > | Ingress class | `global.ingress.className` | `"alb"` | > | Chart-managed or externally managed ingress | `global.ingress.enabled` | `true` for chart-managed ingress. | > | Load balancer annotations | `global.ingress.annotations` | SeekrFlow requires `target-type: ip` and HTTPS on port 443, and recommends a 300-second idle timeout. See [Load balancer annotations](/self-managed/flow/provision/networking#load-balancer-annotations). | > > ### Load balancer annotations > > ```yaml theme={null} > alb.ingress.kubernetes.io/target-type: ip > alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 443}]' > alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=300 > ``` > > SeekrFlow requires the first two, because its services aren't exposed on node ports and the load balancer must serve HTTPS. The idle timeout supports long-running requests. The controller creates an internal load balancer by default. If your users reach SeekrFlow from the internet, also add `alb.ingress.kubernetes.io/scheme: internet-facing`. > [tab] On-premises > > | Value | Used for | Example or format | > | - | - | - | > | Hostname | `global.ingress.host` | `seekrflow.example.com` | > | Ingress class | `global.ingress.className` | `"nginx"` or `"traefik"` | > | Chart-managed or externally managed ingress | `global.ingress.enabled` | `true` for chart-managed ingress. | # Provision OpenSearch for SeekrFlow Source: https://docs.seekr.com/self-managed/flow/provision/opensearch Create the OpenSearch instance that stores SeekrFlow's search indexes. OpenSearch stores the search indexes SeekrFlow uses for file search and retrieval-augmented generation. On Amazon Web Services (AWS), you provide the instance. On-premises, the chart deploys it in the cluster. > [tab] Amazon Web Services (AWS) > > ## Create the instance > > Create an Amazon OpenSearch Service domain. See [Creating and managing Amazon OpenSearch Service domains](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html). Use the settings in this table. For security and backups, follow your organization's requirements. > > | Setting | What SeekrFlow needs | > | - | - | > | Engine version | OpenSearch 2.17 or later. | > | Storage | Start with 500 GB. | > | Network | Virtual private cloud (VPC) access, in the VPC your cluster runs in. | > | Security group | Inbound traffic on port 443 from the cluster, such as from the cluster security group. | > | Access | SeekrFlow's AWS Identity and Access Management (IAM) role, with `es:ESHttp*` on the domain. You grant it in the role's permission policy in [Set up cloud identity](/self-managed/flow/provision/cloud-identity). The principal that registers the search pipeline also needs `es:ESHttp*`. | > > You can also run OpenSearch yourself, in your cluster with the [official Helm chart](https://opensearch.org/docs/latest/install-and-configure/install-opensearch/helm/) or on your own compute. > > ## Check the instance > > Amazon OpenSearch Service accepts only requests signed by a principal its access policy allows. From a machine that can reach the domain, such as a bastion host in your VPC, use a signing client such as [awscurl](https://github.com/okigan/awscurl): > > ```bash theme={null} > awscurl --service es --region "https:///_cluster/health?pretty" > ``` > > A status of `green` or `yellow` is fine for deployment. > > ## Register the hybrid search pipeline > > Hybrid search needs a search pipeline named `hybrid_pipeline`. Register it once. The request is safe to repeat. > > ```bash theme={null} > awscurl --service es --region -X PUT "https:///_search/pipeline/hybrid_pipeline" \ > -H "Content-Type: application/json" \ > -d '{"phase_results_processors":[{"normalization-processor":{"normalization":{"technique":"min_max"},"combination":{"technique":"arithmetic_mean","parameters":{"weights":[0.25,0.75]}}}}]}' > ``` > > ## Record the values > > Note these values. You will enter them when you create the values file. > > | Value | Used for | Example or format | > | - | - | - | > | Hostname | `global.defaults.opensearch.host` | Your domain endpoint. | > | Port | `global.defaults.opensearch.port` | `443` for Amazon OpenSearch Service, `9200` for OpenSearch you run yourself. | > | Scheme | `global.defaults.opensearch.scheme` | `"https://"` | > | Whether the chart deploys OpenSearch | `opensearch.enabled` | `false`. `sfe bootstrap` sets it to `true`, which you correct in [Create the values file](/self-managed/flow/prepare/values-file). | > [tab] On-premises > > ## Set up the in-cluster instance > > The chart deploys OpenSearch in your cluster and registers the hybrid search pipeline for you. You set it up through the values file and one secret. > > The chart creates three OpenSearch pods, each with an 8 GiB persistent volume. Your cluster needs a default storage class that provisions volumes automatically. Size the volumes for the amount of content you plan to ingest. > > OpenSearch takes its admin password from the `opensearch-credentials` secret the first time it starts. The chart doesn't generate this secret. Generate a password, or let `sfe secrets create --auto-generate` generate it when you create SeekrFlow's secrets. > > > [!WARNING] > > > > Keep this password for the life of the deployment. OpenSearch sets its admin password only once, at first start. If the secret changes later, the password no longer matches and every request to OpenSearch fails. > > ## Record the values > > Note these values. You will enter them when you create the values file and secrets. > > | Value | Used for | Example or format | > | - | - | - | > | Whether the chart deploys OpenSearch | `opensearch.enabled` | `true` | > | Admin user | `opensearch-credentials` secret: `OPENSEARCH_USER` | `admin`. OpenSearch requires this name. | > | Admin password | `opensearch-credentials` secret: `OPENSEARCH_PASS` | The password you generated, or the one `sfe secrets create --auto-generate` creates. | > | Scheme | `global.defaults.opensearch.scheme` | `"https://"` | # Provision PostgreSQL for SeekrFlow Source: https://docs.seekr.com/self-managed/flow/provision/postgresql Create the PostgreSQL instance SeekrFlow stores its data in. SeekrFlow persists data for its services in PostgreSQL 16 or higher. You create the instance. SeekrFlow creates its own databases and roles inside it during configuration. ## Create the instance > [tab] Amazon Web Services (AWS) > > Create an Amazon Aurora PostgreSQL-Compatible Edition or Amazon Relational Database Service (Amazon RDS) for PostgreSQL database. See [Creating an Amazon Aurora DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html) or [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html). > > SeekrFlow connects to the database with a username and password, from inside your virtual private cloud (VPC). To set both, create the database with full configuration. Express configuration allows only AWS Identity and Access Management (IAM) authentication and places the database outside a VPC. > > If you use a serverless option, configure it so it never pauses or scales to zero. SeekrFlow keeps database connections open and expects the database to stay available. > > Use the settings in this table. For security and backups, follow your organization's requirements. > > | Setting | What SeekrFlow needs | > | - | - | > | Engine | Aurora (PostgreSQL Compatible) or PostgreSQL, version 16 or later. | > | Storage | Start with 500 GB. Aurora grows storage automatically. | > | Admin credentials | Any username and password. SeekrFlow uses this admin login to create its databases and run migrations. In the console, this is the **Master username** field. If you choose to manage the password in AWS Secrets Manager, get it from Secrets Manager before you [create the SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). | > | VPC | The VPC your cluster runs in. | > | Security group | Inbound traffic on port 5432 from the cluster, such as from the cluster security group. A new security group created in the console allows only your own IP address. Add the rule for the cluster after you create the database. | > | Public access | Not needed. If the instance is reachable only from inside the VPC, `sfe db setup` can create SeekrFlow's databases from a job in the cluster. | > [tab] On-premises > > Run PostgreSQL on your own compute or as a stateful set in Kubernetes. The chart doesn't install PostgreSQL. Use the settings in this table. For security and backups, follow your organization's requirements. > > | Setting | What SeekrFlow needs | > | - | - | > | Engine | PostgreSQL 16 or later. | > | Storage | Start with 500 GB. | > | Admin credentials | An admin account SeekrFlow can use to create its databases and run migrations, such as `postgres`. | > | Authentication | Password authentication. SeekrFlow connects with a username and password. | > | Network access | Inbound traffic on port 5432 from the cluster. | The chart runs database migrations during installation. The instance must be reachable from the cluster before you install. ## Check the instance To confirm that the cluster can reach the instance, run `pg_isready` from a temporary pod. Replace `` with your instance endpoint. ```bash theme={null} kubectl run pg-check --restart=Never --image=postgres --command -- pg_isready -h -p 5432 kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/pg-check --timeout=120s kubectl logs pg-check ``` The output includes `accepting connections`. Then delete the test pod: ```bash theme={null} kubectl delete pod/pg-check ``` ## Generate role passwords SeekrFlow creates two login roles in the instance when you [connect SeekrFlow to PostgreSQL](/self-managed/flow/prepare/postgresql). Generate a password for each now: ```bash theme={null} echo "seekrflow_app: $(openssl rand -hex 24)" echo "seekrflow_keycloak: $(openssl rand -hex 24)" ``` Store both somewhere safe. You enter them when you create secrets. ## Record the values Note these values. You will enter them when you create the values file and secrets. | Value | Used for | Example or format | | - | - | - | | Instance hostname | `global.defaults.postgres.host`, and the `pg-creds` secret: `PG_HOST` | The endpoint of your database instance. | | Port | `global.defaults.postgres.port` | `5432` | | Admin account name and password | `pg-creds` secret: `PG_USER`, `PG_PASS` | The admin credentials you set when you created the instance. SeekrFlow uses them for migrations. | | Application role password | `pg-creds` secret: `PG_APP_PASS` | The password you generated for `seekrflow_app`. | | Keycloak role password, if you enable Keycloak | `keycloak-credentials` secret: `db-password` | The password you generated for `seekrflow_keycloak`. | # Set up secret management for SeekrFlow Source: https://docs.seekr.com/self-managed/flow/provision/secret-management Choose how SeekrFlow's credentials reach the cluster, and set up External Secrets Operator if you use a secret store. SeekrFlow reads every credential from Kubernetes secrets in the `seekrflow` namespace. You choose how those secrets get there. External Secrets Operator can sync them from a secret store, or you can create them directly in the cluster. ## Choose an approach | | External Secrets Operator | Kubernetes secrets | | - | - | - | | Best for | Production deployments, recommended. Organizations that manage secrets centrally or require rotation. | Simpler deployments with fewer components. The only approach `sfe` automates for on-premises deployments. On-premises, you can also use External Secrets Operator with a compatible store, such as HashiCorp Vault. | | Where values live | Your cloud secret store, synced into the cluster. | The cluster only. | | Rotation | Synced from the store automatically. | Manual. | | What you install | External Secrets Operator and a secret store. SeekrFlow does not install External Secrets Operator for you. | Nothing. | | Supported stores | AWS Secrets Manager, AWS Systems Manager Parameter Store, and HashiCorp Vault. | Not applicable. | | Populated by `sfe secrets create` | AWS Secrets Manager and AWS Systems Manager Parameter Store. For HashiCorp Vault, you write the values yourself. | Yes. | | Setup | Install External Secrets Operator and connect your store, on this page. | Nothing until configuration. | With either approach, you create the secrets after you generate your values file. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). > [!WARNING] > > With Kubernetes secrets, the cluster holds the only copy of every credential, including keys that must stay stable for the life of the deployment. Losing the cluster without a copy of those keys forces users to enroll in multi-factor authentication again and ends every active session. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). If you choose Kubernetes secrets, there's nothing more to set up now. Continue to [Collect credentials and values](/self-managed/flow/provision/checklist). ## Install External Secrets Operator External Secrets Operator syncs secrets from your cloud secret store into Kubernetes secrets in the `seekrflow` namespace. SeekrFlow creates the sync resources for each secret, but it does not install External Secrets Operator. It must be running before you install SeekrFlow. Install it from its upstream Helm chart, into its own namespace: ```bash theme={null} helm repo add external-secrets https://charts.external-secrets.io helm install external-secrets external-secrets/external-secrets \ --namespace external-secrets \ --create-namespace ``` Keep the release name and namespace `external-secrets`. `sfe cloud-identity aws` associates SeekrFlow's role with that service account. For other installation options, see the [External Secrets Operator documentation](https://external-secrets.io). ## Connect your secret store SeekrFlow supports these stores: * AWS Secrets Manager * AWS Systems Manager Parameter Store * HashiCorp Vault External Secrets Operator reads from the store with SeekrFlow's role, which grants read access to `seekrflow/*` secrets. See [Set up cloud identity](/self-managed/flow/provision/cloud-identity). With Amazon Elastic Kubernetes Service (Amazon EKS) Pod Identity, `sfe cloud-identity aws` creates the association for External Secrets Operator's service account during configuration. With AWS Identity and Access Management (IAM) roles for service accounts, annotate that service account through External Secrets Operator's own Helm values. With HashiCorp Vault, you write SeekrFlow's secret values to the store yourself. `sfe preflight` can't verify what's in a Vault store. ## Record the values If you use External Secrets Operator, note these values. You will enter them when you create the values file. | Value | Used for | Example or format | | - | - | - | | Create the secret store | `global.Secrets.store.create` | `true` | | Secret store provider | `global.Secrets.store.provider` | On AWS, the service and Region, such as `aws: {service: SecretsManager, region: us-east-1}`. For HashiCorp Vault, the server address and authentication. | # Provision storage for SeekrFlow Source: https://docs.seekr.com/self-managed/flow/provision/storage Create the object storage and shared file storage SeekrFlow uses. SeekrFlow uses two kinds of storage. Object storage holds training datasets, model artifacts, and workflow outputs. Shared file storage holds model weights, which every GPU node mounts so that each copy of a model server reads the same files. > [tab] Amazon Web Services (AWS) > > ## Create object storage > > Create an Amazon Simple Storage Service (Amazon S3) bucket. Start with 1 TB, and apply the security and backup settings your organization requires. SeekrFlow reaches the bucket through cloud identity, not stored credentials. See [Set up cloud identity](/self-managed/flow/provision/cloud-identity). > > ## Create shared file storage > > Create an Amazon Elastic File System (Amazon EFS) file system. See [Creating EFS file systems](https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html). Use the settings in this table. For security and backups, follow your organization's requirements. > > | Setting | What SeekrFlow needs | > | - | - | > | Performance | General Purpose performance mode, Elastic throughput, and the Standard storage class. | > | Virtual private cloud (VPC) | The VPC your cluster runs in. | > | Mount targets | One in every Availability Zone where GPU nodes run. | > | Security group | Inbound NFS traffic, TCP port 2049, from the nodes, such as from the cluster security group. | > > ## Install the Amazon EFS CSI driver > > Pods mount the file system through the Amazon EFS Container Storage Interface (CSI) driver, an Amazon Elastic Kubernetes Service (Amazon EKS) add-on. The driver must be running before you install SeekrFlow. See [Use elastic file system storage with Amazon EFS](https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html). > > | Setting | What SeekrFlow needs | > | - | - | > | Add-on | `aws-efs-csi-driver`. | > | AWS Identity and Access Management (IAM) role | A role with the `AmazonEFSCSIDriverPolicy` managed policy, associated through Amazon EKS Pod Identity with namespace `kube-system` and service account `efs-csi-controller-sa`. SeekrFlow's storage class has the driver create EFS access points, which requires this role. | > | AWS GovCloud (US) with FIPS-enabled nodes | Add-on configuration `{"useFIPS":true}`. | > > To check that the driver is running, run: > > ```bash theme={null} > kubectl get pods -n kube-system -l app=efs-csi-controller > ``` > > The output lists two running pods. > > ## Test the file system > > The driver check doesn't confirm that pods can mount the file system. To test the role, mount targets, and security group before you install, create a temporary volume and write to it. Replace `` with your file system ID. > > ```bash theme={null} > kubectl apply -f - <<'EOF' > apiVersion: storage.k8s.io/v1 > kind: StorageClass > metadata: {name: efs-test} > provisioner: efs.csi.aws.com > parameters: {provisioningMode: efs-ap, fileSystemId: , directoryPerms: "700"} > --- > apiVersion: v1 > kind: PersistentVolumeClaim > metadata: {name: efs-test} > spec: {accessModes: [ReadWriteMany], storageClassName: efs-test, resources: {requests: {storage: 5Gi}}} > --- > apiVersion: v1 > kind: Pod > metadata: {name: efs-test} > spec: > restartPolicy: Never > containers: [{name: test, image: busybox, command: ["sh", "-c", "echo storage-ok > /data/t && cat /data/t"], volumeMounts: [{name: data, mountPath: /data}]}] > volumes: [{name: data, persistentVolumeClaim: {claimName: efs-test}}] > EOF > kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/efs-test --timeout=180s > kubectl logs efs-test > ``` > > The output is `storage-ok`. Then delete the test resources: > > ```bash theme={null} > kubectl delete pod/efs-test pvc/efs-test storageclass/efs-test > ``` > > ## Record the values > > Note these values. You will enter them when you create the values file. > > | Value | Used for | Example or format | > | - | - | - | > | Bucket name | `global.fileStorePath` | `seekrflow-data`, or `seekrflow-data/prod` with a path. Use the bare bucket name, without `s3://`. | > | Shared file storage type | `global.SharedModelCache.type` | `"efs"` | > | File system ID | `global.SharedModelCache.efs.fileSystemId` | `fs-0123456789abcdef0` | > [tab] On-premises > > ## Create object storage > > Provide an S3-compatible object store, such as MinIO, and create a bucket. Start with 1 TB, and apply the security and backup settings your organization requires. SeekrFlow reaches the store with access keys stored in the `appliance-storage-creds` secret. > > ## Create shared file storage > > Provide shared file storage that every GPU node can mount. Start with 1 TB. SeekrFlow supports two options: > > * **Network File System (NFS)** – An NFS server reachable from the cluster. Install the NFS CSI driver: > > ```bash theme={null} > helm repo add csi-driver-nfs \ > https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts > helm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system > ``` > > To check that it's running, run `kubectl get pods -n kube-system -l app=csi-nfs-controller`. If the cluster has no internet access, mirror the driver's container images into your own registry before you install it. > > * **Longhorn** – A cluster with the [Longhorn](https://longhorn.io) CSI driver already installed. SeekrFlow can use Longhorn's existing storage class. > > The CSI driver must be running before you install SeekrFlow. > > ## Test the file system > > If you use NFS, test that pods can mount it before you install. Create a temporary volume and write to it. Replace `` and `` with your NFS server and exported path. > > ```bash theme={null} > kubectl apply -f - <<'EOF' > apiVersion: storage.k8s.io/v1 > kind: StorageClass > metadata: {name: nfs-test} > provisioner: nfs.csi.k8s.io > parameters: {server: , share: } > --- > apiVersion: v1 > kind: PersistentVolumeClaim > metadata: {name: nfs-test} > spec: {accessModes: [ReadWriteMany], storageClassName: nfs-test, resources: {requests: {storage: 5Gi}}} > --- > apiVersion: v1 > kind: Pod > metadata: {name: nfs-test} > spec: > restartPolicy: Never > containers: [{name: test, image: busybox, command: ["sh", "-c", "echo storage-ok > /data/t && cat /data/t"], volumeMounts: [{name: data, mountPath: /data}]}] > volumes: [{name: data, persistentVolumeClaim: {claimName: nfs-test}}] > EOF > kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/nfs-test --timeout=180s > kubectl logs nfs-test > ``` > > The output is `storage-ok`. Then delete the test resources: > > ```bash theme={null} > kubectl delete pod/nfs-test pvc/nfs-test storageclass/nfs-test > ``` > > ## Record the values > > Note these values. You will enter them when you create the values file and secrets. > > | Value | Used for | Example or format | > | - | - | - | > | Bucket name | `global.fileStorePath` | `seekrflow-data`, or `seekrflow-data/prod` with a path. Use the bare bucket name, without a scheme such as `s3://`. | > | Object store endpoint | `global.cloudProvider.on-prem.storageEndpoint` | `http://minio.seekrflow.svc:9000` | > | Object store access keys | `appliance-storage-creds` secret: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` | Your MinIO access key and secret key. | > | Shared file storage type | `global.SharedModelCache.type` | `"nfs"` or `"longhorn"` | > | NFS server and path | `global.SharedModelCache.nfs.server`, `global.SharedModelCache.nfs.path` | Your NFS server hostname or IP address, and the exported path. | > | Existing Longhorn storage class | `global.SharedModelCache.createStorageClass`, `global.SharedModelCache.storageClassName` | `false` and `longhorn` | # SeekrFlow Self-Managed glossary Source: https://docs.seekr.com/self-managed/flow/reference/glossary Definitions of the terms used across the SeekrFlow Self-Managed guide. Each entry defines a term used in deploying and operating SeekrFlow Self-Managed and links to the page where it is covered in depth. **Jump to:** [A](#a) · [B](#b) · [C](#c) · [D](#d) · [E](#e) · [F](#f) · [G](#g) · [H](#h) · [I](#i) · [K](#k) · [L](#l) · [M](#m) · [O](#o) · [P](#p) · [R](#r) · [S](#s) · [V](#v) · [W](#w) ## A **admin token** – the token `sfe org setup` prints once, which lets `sfe` act as the first administrator. It expires after 7 days. Replace it with `sfe org token rotate`. See [Create the first SeekrFlow administrator](/self-managed/flow/deploy/admin). **AI-Ready Data** – the platform service that prepares datasets for fine-tuning. See [Architecture](/self-managed/flow/architecture). **Argo Workflows** – the workflow engine the chart deploys into the `argo-workflows` namespace. Training and ingestion submit their jobs to it. See [Architecture](/self-managed/flow/architecture). **artifact registry** – the container registry that holds the SeekrFlow chart and images. Seekr grants your account pull access, or you [mirror](#mirror) the images into your own registry. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). [↑ Back to top](/self-managed/flow/reference/glossary) ## B **bootstrap endpoint** – the Auth service endpoint that creates the first administrator. It is reachable only from inside the cluster and disables itself after first use. Distinct from [`sfe bootstrap`](#sfe-bootstrap). See [Create the first SeekrFlow administrator](/self-managed/flow/deploy/admin). **break-glass administrator** – a password account, created by `sfe org setup`, that owns your organization and signs in when single sign-on is unavailable. See [Create the first SeekrFlow administrator](/self-managed/flow/deploy/admin). [↑ Back to top](/self-managed/flow/reference/glossary) ## C **cloud identity** – how SeekrFlow's pods authenticate to your cloud provider's services, using the provider's [workload identity](#workload-identity) mechanism, such as Amazon EKS Pod Identity. On-premises deployments use static keys instead. See [Set up cloud identity](/self-managed/flow/provision/cloud-identity). **custom resource definition (CRD)** – a Kubernetes extension that defines a new resource type. SeekrFlow's CRDs include [FlowService](#flowservice), [FlowModel](#flowmodel), and [SeekrFlowEverywhere](#seekrfloweverywhere). Uninstalling SeekrFlow leaves them in place. See [Uninstall SeekrFlow](/self-managed/flow/operate/uninstall). [↑ Back to top](/self-managed/flow/reference/glossary) ## D **data migration** – the job that creates or upgrades SeekrFlow's database schema on every install and upgrade. Services that own databases wait for it to finish. Rolling back a release doesn't undo it. See [Revert a SeekrFlow upgrade](/self-managed/flow/operate/revert-upgrade). [↑ Back to top](/self-managed/flow/reference/glossary) ## E **etcd** – the database where Kubernetes stores the cluster's resources and configuration, including Kubernetes secrets. Encrypting it protects secrets at rest when you use Kubernetes secrets for secret management. See [Security considerations](/self-managed/flow/security). **external model** – a model served by Amazon Bedrock in your own cloud account rather than by a vLLM server in your cluster. Identified by an `aws-bedrock:` prefix, and turned on with `global.modelPolicy.enableExternalModels`. See [Configure models](/self-managed/flow/prepare/models). **External Secrets Operator** – an open source Kubernetes operator that syncs secrets from a cloud secret store into Kubernetes secrets. Optional, and installed by you rather than by the chart. See [Set up secret management](/self-managed/flow/provision/secret-management). [↑ Back to top](/self-managed/flow/reference/glossary) ## F **FlowModel** – the custom resource that defines one self-hosted model server: which model to run and the GPUs, memory, and CPU to give it. You define FlowModels under `FlowModel.models` in the values file. See [Configure models](/self-managed/flow/prepare/models). **FlowService** – the custom resource the operator creates for each platform service, such as Auth or Serving. List them with `kubectl get flowservices` to confirm the operator is managing the deployment. See [Verify the SeekrFlow deployment](/self-managed/flow/deploy/verify). [↑ Back to top](/self-managed/flow/reference/glossary) ## G **GPU node label** – the Kubernetes label `seekr.io/gpu_type=` that tells fine-tuning jobs which GPU nodes they can use, such as `seekr.io/gpu_type=A10`. See [Create the SeekrFlow values file](/self-managed/flow/prepare/values-file). [↑ Back to top](/self-managed/flow/reference/glossary) ## H **Helm chart** – the versioned package that installs the operator, SeekrFlow's CRDs, and the supporting components. See [Architecture](/self-managed/flow/architecture). **Hugging Face token** – an access token stored in the `hf-token` secret. Every deployment needs it, and model servers use it to download gated model weights, such as most Llama variants. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). **hybrid search pipeline** – an OpenSearch search pipeline named `hybrid_pipeline` that retrieval-augmented generation depends on. Registered automatically when OpenSearch runs in the cluster. For AWS deployments, you register it yourself. See [Provision OpenSearch](/self-managed/flow/provision/opensearch). [↑ Back to top](/self-managed/flow/reference/glossary) ## I **image pull secret** – the Kubernetes secret holding the registry credentials the cluster uses to pull SeekrFlow images. Without it, pods fail with `ImagePullBackOff`. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). **ingress controller** – the component that routes external traffic to SeekrFlow's services by path, such as the Application Load Balancer on AWS or NGINX. See [Set up networking and cluster policies](/self-managed/flow/provision/networking). [↑ Back to top](/self-managed/flow/reference/glossary) ## K **Keycloak** – an optional identity broker the chart can deploy to sign users in through your existing identity provider. Off by default. See [Security considerations](/self-managed/flow/security). [↑ Back to top](/self-managed/flow/reference/glossary) ## L **license key** – the signed token Seekr issues for your deployment. It carries your entitled services, an expiry date, and a GPU ceiling, and is stored in the `seekrflow-license` secret. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). **License service** – the platform service that validates the [license key](#license-key) and enforces its GPU ceiling. Other services do not report ready until it confirms a valid license. See [Architecture](/self-managed/flow/architecture). [↑ Back to top](/self-managed/flow/reference/glossary) ## M **mirror** – to copy SeekrFlow's images from Seekr's registry into your own with `sfe images mirror`, when your cluster can't reach Seekr's registry or must pull only from yours. See [Set up the sfe CLI](/self-managed/flow/prepare/sfe-cli#mirror-container-images). **MLflow** – the experiment-tracking service the chart deploys to record fine-tuning runs. See [Architecture](/self-managed/flow/architecture). **model catalog** – the list of models users can choose in the SeekrFlow interface. It ships with the chart, and SeekrFlow loads it into its database on every install and upgrade. Distinct from the [FlowModels](#flowmodel) you run. See [Configure models](/self-managed/flow/prepare/models#choose-where-models-run). [↑ Back to top](/self-managed/flow/reference/glossary) ## O **offline mode** – the `global.offlineMode` setting, for clusters that can't reach Hugging Face. Model servers load their weights from object storage instead, and tools that need the internet, such as web search, are turned off. See [Configure models](/self-managed/flow/prepare/models#stage-weights-for-an-offline-install). **on-premises deployment** – a deployment on a Kubernetes cluster in your own data center, with an S3-compatible object store such as MinIO. Set as `on-prem` in the values file. See [What is SeekrFlow Self-Managed](/self-managed/flow). **operator** – the Kubernetes controller the chart installs. It reads your configuration and creates the platform's workloads, and it owns most SeekrFlow pods. See [Architecture](/self-managed/flow/architecture). [↑ Back to top](/self-managed/flow/reference/glossary) ## P **preflight** – the `sfe preflight` command, which checks your cluster and cloud prerequisites before you install or upgrade. `sfe install` and `sfe upgrade` do not run it for you. See [Install SeekrFlow](/self-managed/flow/deploy/install). **profile** – a saved set of `sfe` defaults, such as kube-context, namespace, and values file, selected with `-p`. Profiles never store credentials. See [Set up the sfe CLI](/self-managed/flow/prepare/sfe-cli#save-a-profile). [↑ Back to top](/self-managed/flow/reference/glossary) ## R **release** – a published version of SeekrFlow, supplied to `sfe` commands with `-r`. Also the Helm release, the installed instance of the chart in your cluster. See [Upgrade a SeekrFlow deployment](/self-managed/flow/operate/upgrade). **revision** – a numbered snapshot of a Helm release, created by every install and upgrade. Rolling back returns the release to an earlier revision. See [Revert a SeekrFlow upgrade](/self-managed/flow/operate/revert-upgrade). **root key** – a key the Auth service uses to encrypt multi-factor authentication secrets and stored single sign-on tokens. Required for FIPS or single sign-on, and must stay stable for the life of the deployment. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). [↑ Back to top](/self-managed/flow/reference/glossary) ## S **SeekrFlowEverywhere** – the single custom resource the chart creates to carry your configuration. The operator reads it and creates every other SeekrFlow resource. See [Architecture](/self-managed/flow/architecture). **`sfe`** – the SeekrFlow command-line interface (CLI) that generates your values file, sets up cloud identity and secrets, installs and upgrades the deployment, creates the first administrator, and helps you troubleshoot. See [Set up the sfe CLI](/self-managed/flow/prepare/sfe-cli). **`sfe bootstrap`** – the `sfe` command that writes a starter values file by asking questions. You add a few settings it leaves out. Distinct from the [bootstrap endpoint](#bootstrap-endpoint). See [Create the SeekrFlow values file](/self-managed/flow/prepare/values-file). **shared file storage** – a network file system mounted across GPU pods to cache model weights, such as Amazon EFS. See [Provision storage](/self-managed/flow/provision/storage). [↑ Back to top](/self-managed/flow/reference/glossary) ## V **Valkey** – an optional cache the chart can deploy. Sign-in rate limiting and account lockout depend on it. Off by default. See [Security considerations](/self-managed/flow/security). **values file** – the YAML file, `my-values.yaml`, that holds every setting for your deployment. See [Create the SeekrFlow values file](/self-managed/flow/prepare/values-file). **vLLM** – the open source inference engine that runs self-hosted models on your GPU nodes. Each [FlowModel](#flowmodel) runs as its own vLLM server. See [Architecture](/self-managed/flow/architecture). [↑ Back to top](/self-managed/flow/reference/glossary) ## W **workload identity** – a cloud mechanism that grants a Kubernetes service account cloud permissions without stored keys, such as Amazon EKS Pod Identity. See [Connect SeekrFlow cloud identity](/self-managed/flow/prepare/identity). [↑ Back to top](/self-managed/flow/reference/glossary) # Security considerations for SeekrFlow Self-Managed Source: https://docs.seekr.com/self-managed/flow/security What SeekrFlow secures by default, what it connects to, and what you are responsible for. Security for a self-managed deployment is a shared responsibility. Seekr ships hardened SeekrFlow container images with secure default settings. You secure your environment end to end and keep SeekrFlow up to date. ## Shared responsibility | Area | Seekr | You | | - | - | - | | Container images | Distroless images with a hardened security context. Seekr scans SeekrFlow container images for vulnerabilities before release. Each release pins its images by digest, which lets you confirm that a mirror matches the release. | Scan third-party images, such as MLflow, Argo Workflows, and OpenSearch, which their own projects maintain. Keep SeekrFlow up to date. See [Upgrade a SeekrFlow deployment](/self-managed/flow/operate/upgrade). | | Cloud identity | Support for your cloud provider's workload identity, which keeps long-lived credentials out of the cluster. A service account and role for each workload. | Create the cloud roles and grant their permissions. See [Set up cloud identity](/self-managed/flow/provision/cloud-identity). | | User access | Local accounts with multi-factor authentication, and optional single sign-on through Keycloak. An endpoint for creating the first administrator, reachable only from inside the cluster. | Create the administrator and manage users. Sign-in rate limiting and account lockout are off by default. Enable both for any deployment reachable by untrusted users. See [Create the first SeekrFlow administrator](/self-managed/flow/deploy/admin). | | Secrets | Secrets consumed by reference, never written into your values file. | Choose where to store secrets, and keep a copy of the token signing key pair and root key outside the cluster. See [Set up secret management](/self-managed/flow/provision/secret-management). | | Network | An ingress route for each service, compatibility with an Istio service mesh with mutual Transport Layer Security (TLS), and support for a private certificate authority bundle. | Provide TLS certificates for the ingress, and write network policies. Traffic inside the cluster is unencrypted by default. If you require encryption, run a service mesh. See [Set up networking and cluster policies](/self-managed/flow/provision/networking). | | Storage | Data stored only in the database and object storage you provision. | Encrypt the database and object storage at rest, enable TLS on database connections, and run backups and disaster recovery. | | Cluster | An operator with documented cluster permissions. | Harden the cluster itself, including the control plane, audit logging, and encryption of etcd, the database where Kubernetes stores cluster data and secrets. | | Compliance | Federal Information Processing Standard (FIPS) enabled images for Amazon Web Services (AWS) GovCloud (US), and a FIPS mode for the Auth service that works in any environment. | Enable FIPS mode at install time, and meet your own compliance requirements. SeekrFlow doesn't require FIPS mode on the nodes. If your requirements call for it, SeekrFlow runs on FIPS-enabled nodes, including GPU nodes with NVIDIA drivers. See [Create SeekrFlow secrets](/self-managed/flow/prepare/secrets-and-tokens). | ## Outbound connections A self-managed deployment makes these outbound connections: | Connection | When | Control | | - | - | - | | Seekr's artifact registry | Pulling container images and the chart during install and upgrade. | Mirror the images into your own registry. See [Set up the sfe CLI](/self-managed/flow/prepare/sfe-cli#mirror-container-images). | | Hugging Face | Downloading model weights. | Stage weights in your object storage and turn on offline mode. See [Stage weights for an offline install](/self-managed/flow/prepare/models#stage-weights-for-an-offline-install). | | Amazon Bedrock | Inference on externally hosted models. | Off by default. See [Configure models](/self-managed/flow/prepare/models). | | Brave Search API | Agents running web searches. | Used only when you provide a Brave Search API key. See [Request credentials](/self-managed/flow/provision/checklist#request-credentials). | | Model Context Protocol (MCP) servers and tool endpoints you configure | Agents calling tools that reach external services. | Reaches only the endpoints you configure. See [MCP connector](/flow/sdk/agents/mcp-connector). | | AWS License Manager | License validation on AWS. | Runs in your own AWS account. Your Seekr account team can issue a license that skips this check. | Every self-managed deployment turns off usage metering, error reporting, and product analytics. ## Operator permissions The operator creates and manages workloads across the cluster, which requires a broad cluster role. It can: * Read secrets in every namespace, because workloads reference secrets by name. * Create cluster roles and bindings, including the `escalate` and `bind` permissions Kubernetes requires for that. * Manage SeekrFlow's own custom resource definitions. Installing SeekrFlow requires Kubernetes cluster-admin permissions. Kubernetes allows only an installer with the same permissions to grant the operator's cluster role. ## AWS IAM roles An AWS deployment uses five AWS Identity and Access Management (IAM) roles. AWS maintains the managed policies, and SeekrFlow's own role grants only the permissions in its permissions table. | Role | Used by | Permissions | Created in | | - | - | - | - | | Cluster IAM role | Amazon Elastic Kubernetes Service (Amazon EKS) | `AmazonEKSClusterPolicy` managed policy | [Provision the cluster](/self-managed/flow/provision/cluster) | | Node IAM role | The worker and GPU nodes | `AmazonEKSWorkerNodePolicy`, `AmazonEC2ContainerRegistryReadOnly`, and `AmazonEKS_CNI_Policy` managed policies | [Provision the cluster](/self-managed/flow/provision/cluster) | | AWS Load Balancer Controller role | The ingress controller | The controller's IAM policy, published by AWS | [Set up networking and cluster policies](/self-managed/flow/provision/networking) | | File storage driver role | The Amazon Elastic File System (Amazon EFS) Container Storage Interface (CSI) driver | `AmazonEFSCSIDriverPolicy` managed policy | [Provision storage](/self-managed/flow/provision/storage) | | SeekrFlow role | SeekrFlow's pods | The permissions table, scoped to your resources | [Set up cloud identity](/self-managed/flow/provision/cloud-identity) | For the actions each AWS service supports, see the [Service Authorization Reference](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html). ## Workload hardening SeekrFlow container images are distroless, with no shell or package manager. The operator and the workloads it creates run with this security context: * A non-root user. * A read-only root filesystem, with writable scratch space mounted where services need it. * All Linux capabilities dropped, and privilege escalation disallowed. * The default secure computing mode (seccomp) profile from your container runtime. A few supporting workloads, such as the Argo server, are exceptions. Supporting components use their upstream images. MLflow uses a Chainguard image, and Argo Workflows and OpenSearch use the images their projects publish.