# Agentic Framework Dashboard

This package provides a Next.js-based web dashboard for monitoring and interacting with agentic-framework agents.

## Installation

The dashboard is an optional component of the agentic-framework. To install it:

```bash
pip install agentic-framework
```

### Prerequisites

The dashboard requires Node.js (v18+) and npm (v8+) to be installed on your system.

## Usage

### Backend Setup

The dashboard is designed to work with the API server generated by `agentic serve <agent_path>`. To start the API server:

```bash
agentic serve <agent_path>
```

### Starting the Dashboard

To start the dashboard:

```bash
agentic dashboard start
```

This will start the dashboard server on http://localhost:3000.

#### Options

- `--port`, `-p`: Specify the port to run the dashboard on (default: 3000)
- `--dev`: Run in development mode for live reloading and debugging

### Building the Dashboard

If you need to pre-build the dashboard:

```bash
agentic dashboard build
```

## Programmatic Usage

You can also start the dashboard programmatically from your Python code:

```python
from agentic.dashboard import setup

# Start the dashboard
process = setup.start_dashboard(port=3000, dev_mode=False)

# The process will continue running until terminated
# You can stop it with:
# process.terminate()
```

## Development

If you want to modify the dashboard, you can run it in development mode:

```bash
agentic dashboard start --dev
```

This will start the Next.js development server with hot reloading enabled.

## Structure

The dashboard is built with:

- Next.js for the frontend framework
- React for UI components
- Tailwind CSS for styling
- SWR for data fetching

It communicates with the agentic-framework backend via a REST API.
