# 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

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

## Configuration Fields

### flows (required)

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

```json
{
  "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.

```json
{
  "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.

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

{% hint style="info" %}
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.
{% endhint %}

### llm (required)

Configures the language model for your agent.

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

#### Supported LLM Providers

**ChatOpenAI**

```json
{
  "llm": {
    "name": "ChatOpenAI",
    "properties": {
      "model": "gpt-5.2",
      "temperature": 0.7
    }
  }
}
```

**AzureChatOpenAI**

```json
{
  "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:

```typescript
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:

```json
{
  "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)
├── agentMemorySchema.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:

```typescript
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](/getting-started/quick-start.md) - Follow the quick start guide
2. [Define your flows](/low-code-editor/flows.md) - Learn about flow structure
3. [Deploy to Minded platform](https://github.com/minded-ai/mindedjs/blob/main/docs/platform/deployment.md) - Deploy your agent


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.minded.com/getting-started/project-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
