> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Development Setup

> Set up your development environment for PraisonAI JavaScript framework

Set up a local PraisonAI TypeScript development environment.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    Dev([Developer]) --> Repo[praisonai-ts]
    Repo --> Build[Build]

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Repo agent
    class Dev,Build tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

```

## Where the code lives

TypeScript source is in the **PraisonAI monorepo** at `src/praisonai-ts/`, while [`MervinPraison/praisonai-js`](https://github.com/MervinPraison/praisonai-js) is a **read-only npm mirror** updated automatically from the monorepo by the `Sync to praisonai-js` GitHub Actions workflow.

<Warning>
  Open **all** TypeScript issues and pull requests against [`MervinPraison/PraisonAI`](https://github.com/MervinPraison/PraisonAI). PRs opened against `praisonai-js` will be overwritten on the next sync.
</Warning>

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    Dev([Developer]) --> Monorepo[MervinPraison/PraisonAI<br/>src/praisonai-ts/]
    Monorepo -->|Sync to praisonai-js<br/>workflow| Mirror[MervinPraison/praisonai-js<br/>npm mirror]
    Mirror --> NPM[npm install praisonai]

    classDef source fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef output fill:#10B981,stroke:#7C90A0,color:#fff

    class Dev,Monorepo source
    class Mirror process
    class NPM output
```

<AccordionGroup>
  <Accordion title="Maintainers: run the mirror sync">
    Run the mirror sync after a TypeScript change merges to `main`:

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    gh workflow run "Sync to praisonai-js" --repo MervinPraison/PraisonAI
    ```

    The workflow rsyncs `src/praisonai-ts/` → `praisonai-js` (excludes `node_modules/`, `dist/`, `coverage/`, `.github/`). Default mode opens a PR against `praisonai-js`; `mode=commit` pushes directly.
  </Accordion>
</AccordionGroup>

## Development Setup

## Quick Start

<Steps>
  <Step title="Simple Usage">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    git clone https://github.com/MervinPraison/PraisonAI.git
    cd src/praisonai-ts
    ```
  </Step>

  <Step title="With Configuration">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    npm install
    ```
  </Step>

  <Step title="Build Package">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    npm run build
    ```
  </Step>
</Steps>

## Issue Routing & npm Mirror

File TypeScript issues on the monorepo, fix them in `src/praisonai-ts/`, and let maintainers publish the npm mirror.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "TypeScript Contribution Flow"
        Issue[🐛 Report issue] --> Repo[📦 PraisonAI monorepo]
        Repo --> Fix[🔧 Fix in src/praisonai-ts/]
        Fix --> Merge[✅ PR merged]
        Merge --> Sync[⚙️ Sync workflow]
        Sync --> Mirror[📤 praisonai-js npm mirror]
    end

    classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef result fill:#10B981,stroke:#7C90A0,color:#fff

    class Issue,Repo input
    class Fix,Sync process
    class Merge,Mirror result
```

File every TypeScript SDK bug or feature request on [MervinPraison/PraisonAI](https://github.com/MervinPraison/PraisonAI) using the bug or feature template. Do not open TypeScript issues on `praisonai-js`.

All TypeScript source lives in `src/praisonai-ts/` inside the [PraisonAI monorepo](https://github.com/MervinPraison/PraisonAI). Fork the monorepo, branch off `main`, and open your PR there.

<Info>
  [`MervinPraison/praisonai-js`](https://github.com/MervinPraison/praisonai-js) is a one-way, downstream mirror. It exists so the `praisonai` npm package can be published from a standalone repo. It is **not** a fix target — do not open code PRs against it.

  After a TypeScript PR merges on the monorepo, a maintainer syncs the mirror:

  ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  gh workflow run "Sync to praisonai-js" --repo MervinPraison/PraisonAI
  ```

  Direction is **monorepo → `praisonai-js`** only.
</Info>

## Package Structure

```
src/
├── agent/         # Agent-related interfaces and implementations
├── task/          # Task management and execution
├── utils/         # Utility functions and helpers
└── types/         # TypeScript type definitions
```

* Bundles cleanly for non-Node runtimes (Tauri, React Native, browser). See [Browser & Mobile Runtimes](/docs/docs/js/browser-runtime) for runtime-specific patterns.

## Related

<CardGroup cols={2}>
  <Card title="Contributing" icon="code-branch" href="/docs/contributing">General contribution guide</Card>
  <Card title="TypeScript" icon="book" href="/docs/docs/js/typescript">TypeScript overview</Card>
  <Card title="Node.js" icon="robot" href="/docs/docs/js/nodejs">Node.js overview</Card>
  <Card title="Browser & Mobile" icon="globe" href="/docs/docs/js/browser-runtime">Run in Tauri, React Native, browser, and edge runtimes</Card>
</CardGroup>
