Project Configuration

Configure your MindedJS agent using the minded.json file to define how your agent operates, which flows to use, and deployment settings.

minded.json Overview

The minded.json file is the central configuration file for your MindedJS agent. It defines:

  • Flows: Paths to your flow definition files

  • Tools: Paths to your tool implementations (optional)

  • LLM Configuration: Which language model to use and its settings

  • Agent Path: Where your agent is exported (for deployment only)

This file should be placed in your project root directory.

Configuration Structure

{
  "flows": ["./flows"],
  "tools": ["./tools"],
  "agent": "./agent.ts",
  "llm": {
    "name": "ChatOpenAI",
    "properties": {
      "model": "gpt-4o",
      "temperature": 0.7
    }
  }
}

Configuration Fields

flows (required)

An array of paths to directories containing your flow YAML files.

{
  "flows": ["./flows", "./custom-flows"]
}

The agent will load all .yaml and .yml files from these directories.

tools (optional)

An array of paths to directories containing your tool implementations.

{
  "tools": ["./tools"]
}

If not specified, tools should be passed directly to the Agent constructor.

agent (deployment only)

The path to your main agent file where the agent is exported as default. This field is used by the Minded platform during deployment and is not required for local development.

{
  "agent": "./agent.ts"
}

The agent field is only used during deployment to the Minded platform. It tells the platform where to find your agent's default export. This field is not used by the Agent class at runtime.

llm (required)

Configures the language model for your agent.

{
  "llm": {
    "name": "ChatOpenAI",
    "properties": {
      "model": "gpt-4o",
      "temperature": 0.7,
      "maxTokens": 2000
    }
  }
}

Supported LLM Providers

ChatOpenAI

{
  "llm": {
    "name": "ChatOpenAI",
    "properties": {
      "model": "gpt-4o",
      "temperature": 0.7
    }
  }
}

AzureChatOpenAI

{
  "llm": {
    "name": "AzureChatOpenAI",
    "properties": {
      "model": "gpt-4o",
      "temperature": 0.7
    }
  }
}

Usage in Your Agent

The minded.json configuration is passed directly to your Agent constructor:

import { Agent } from '@minded-ai/mindedjs';
import memorySchema from './schema';
import tools from './tools';
import mindedConfig from './minded.json';

const agent = new Agent({
  memorySchema,
  config: mindedConfig,
  tools, // Optional if specified in minded.json
});

Complete Example

Here's a full example of a minded.json file for a customer support agent:

{
  "flows": ["./flows"],
  "tools": ["./tools"],
  "agent": "./customerSupportAgent.ts",
  "llm": {
    "name": "ChatOpenAI",
    "properties": {
      "model": "gpt-4o",
      "temperature": 0.7,
      "maxTokens": 1000,
      "topP": 0.9
    }
  }
}

Corresponding project structure:

your-project/
├── minded.json              # Agent configuration
├── customerSupportAgent.ts  # Main agent file (default export)
├── schema.ts               # Memory schema
├── flows/                  # Flow definitions
│   ├── mainFlow.yaml
│   └── escalationFlow.yaml
└── tools/                  # Tool implementations
    ├── lookupOrder.ts
    ├── processRefund.ts
    └── index.ts

Environment-Specific Configuration

You can create environment-specific configurations:

your-project/
├── minded.json              # Default configuration
├── minded.development.json  # Development overrides
├── minded.production.json   # Production settings
└── minded.staging.json      # Staging configuration

Load the appropriate configuration based on your environment:

const env = process.env.NODE_ENV || 'development';
const configPath = env === 'production' ? './minded.production.json' : './minded.json';
const mindedConfig = require(configPath);

const agent = new Agent({
  memorySchema,
  config: mindedConfig,
  tools,
});

Next Steps

With your minded.json configured, you're ready to:

  1. Build your first agent - Follow the quick start guide

  2. Define your flows - Learn about flow structure

  3. Deploy to Minded platform - Deploy your agent

Last updated