Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 226 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h2 align="center">Let AI build multi-agent workflows for you in minutes</h2>
<h5 align="center">

[Quickstart](#quick-start) | [Docs](https://docs.rowboatlabs.com/) | [Discord](https://discord.gg/gtbGcqF4) | [Website](https://www.rowboatlabs.com/) | [Youtube](https://www.youtube.com/@RowBoatLabs)
[Quickstart](#quick-start) | [Docs](https://docs.rowboatlabs.com/) | [Website](https://www.rowboatlabs.com/) | [Discord](https://discord.gg/jHhUKkKHn8)

</h5>

Expand All @@ -22,19 +22,15 @@ Powered by OpenAI's Agents SDK, Rowboat is the fastest way to build multi-agents
export OPENAI_API_KEY=your-openai-api-key
```

2. Clone the repository and start Rowboat
2. Clone the repository and start Rowboat docker
```bash
git clone [email protected]:rowboatlabs/rowboat.git
cd rowboat
./start.sh
docker-compose up --build
```

3. Access the app at [http://localhost:3000](http://localhost:3000).

Note: We have added native RAG support including file-uploads and URL scraping. See the [RAG](https://docs.rowboatlabs.com/using_rag) section of our docs for this.

Note: See the [Using custom LLM providers](https://docs.rowboatlabs.com/setup/#using-custom-llm-providers) section of our docs for using custom providers like OpenRouter and LiteLLM.

## Demo

#### Create a multi-agent assistant with MCP tools by chatting with Rowboat
Expand Down Expand Up @@ -99,3 +95,226 @@ There are 2 ways to integrate with the agents you create in Rowboat


Refer to [Docs](https://docs.rowboatlabs.com/) to learn how to start building agents with Rowboat.

## Running on Kubernetes

### Prerequisites
- Kubernetes cluster (tested with k3s on Raspberry Pi)
- kubectl configured to access your cluster
- Docker registry access (for pushing images)
- SSH access to the target server (for deployment)

### Important Configuration Note
Before deploying, you must update the image names in the Kubernetes configuration files to use your own Docker Hub username and image names:

1. In `k8s/arm64/rowboat_agents-deployment.yaml`:
- Change `stevef1uk/rowboat_agents:arm64` to `your-dockerhub-username/rowboat_agents:arm64`

2. In `k8s/arm64/rowboat-deployment.yaml`:
- Change `stevef1uk/rowboat:arm64` to `your-dockerhub-username/rowboat:arm64`

3. In `k8s/arm64/copilot-deployment.yaml`:
- Change `stevef1uk/copilot:arm64` to `your-dockerhub-username/copilot:arm64`

Replace `your-dockerhub-username` with your actual Docker Hub username. These changes ensure that Kubernetes pulls the correct images from your Docker Hub repository.

### Deployment Steps
1. Clone the repository
2. Update the following files with your specific configuration:
- `k8s/app-config.yaml`: Update environment variables
- `k8s/app-secrets.yaml`: Add your secrets (Auth0, OpenAI, etc.)
- `k8s/openai-secret.yaml`: Add your OpenAI API key

3. Set up the OpenAI secret:
```bash
# Generate base64-encoded API key
echo -n "your-openai-api-key" | base64

# Copy the output and replace the api-key value in k8s/openai-secret.yaml
# The file should look like this:
# apiVersion: v1
# kind: Secret
# metadata:
# name: openai-secret
# type: Opaque
# data:
# api-key: "YOUR_BASE64_ENCODED_API_KEY"
```

4. Apply the configurations in order:
```bash
kubectl apply -f k8s/app-config.yaml
kubectl apply -f k8s/app-secrets.yaml
kubectl apply -f k8s/openai-secret.yaml
```

5. Deploy the applications:
```bash
kubectl apply -f k8s/redis-deployment.yaml
kubectl apply -f k8s/mongodb-deployment.yaml
kubectl apply -f k8s/rowboat_agents-deployment.yaml
kubectl apply -f k8s/copilot-deployment.yaml
kubectl apply -f k8s/rowboat-deployment.yaml
```

6. Restart the deployments to ensure they pick up the new configurations:
```bash
kubectl rollout restart deployment redis
kubectl rollout restart deployment mongodb
kubectl rollout restart deployment rowboat-agents
kubectl rollout restart deployment copilot
kubectl rollout restart deployment rowboat
```

### Accessing the Application

#### Option 1: Using Port Forwarding (Development/Testing)
To access the Rowboat UI using port forwarding:

```bash
# Forward port 3000 to access the Rowboat UI
kubectl port-forward svc/rowboat 3000:3000
```

Then access the application at http://localhost:3000

#### Option 2: Using Ingress (Production)
For production deployments, it's recommended to use an Ingress controller. Here's how to set it up:

1. Create an Ingress configuration file `k8s/ingress.yaml`:
```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rowboat-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- host: rowboat.your-domain.com # Replace with your domain
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: rowboat
port:
number: 3000
```

2. Apply the Ingress configuration:
```bash
kubectl apply -f k8s/ingress.yaml
```

3. Configure your DNS to point to your cluster's Ingress controller IP address.

4. If using HTTPS (recommended for production):
- Add SSL certificate configuration to the Ingress
- Update the Auth0 configuration to use the HTTPS URL
- Set `ssl-redirect: "true"` in the Ingress annotations

### Configuration

The application uses the following configuration files:
- `k8s/app-config.yaml`: Contains environment variables and service configurations
- `k8s/app-secrets.yaml`: Contains sensitive information like API keys and Auth0 configuration

### Troubleshooting

1. Check deployment status:
```bash
kubectl get deployments
kubectl get pods
```

2. View logs:
```bash
kubectl logs deployment/rowboat
kubectl logs deployment/rowboat-agents
kubectl logs deployment/copilot
```

3. Common issues:
- If services are not accessible, verify port forwarding is running or Ingress is configured correctly
- If MongoDB connection fails, check the connection string in `app-config.yaml`
- If Auth0 authentication fails, verify the configuration in `app-secrets.yaml`
- If using Ingress, check the Ingress controller logs:
```bash
kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx
```

### Cleanup

To remove all Kubernetes resources:
```bash
kubectl delete -f k8s/
```

## CI/CD Configuration

The project uses Drone CI for continuous integration and deployment. The configuration is defined in `.drone.yml` and supports building and deploying to ARM64-based Kubernetes clusters.

### Required Secrets

The following secrets need to be configured in your Drone CI environment:

- `docker_username`: Your Docker Hub username
- `docker_password`: Your Docker Hub password
- `SSH_USER`: Username for SSH access to the target server
- `SSH_PASSWORD`: Password for SSH access to the target server

## Kubernetes Deployment

### API Key Configuration

When deploying to Kubernetes, ensure the following API keys are properly configured in `k8s/arm64/app-secrets.yaml`:

1. **CoPilot Service Authentication**
- The `COPILOT_API_KEY` must be identical in both the Rowboat and CoPilot services
- This key is used for internal service-to-service authentication
- Example configuration:
```yaml
COPILOT_API_KEY: "your-shared-api-key" # Must be the same value in both services
```

2. **OpenAI Integration**
- `OPENAI_API_KEY`: Your OpenAI API key for GPT model access
- `PROVIDER_API_KEY`: Optional provider-specific API key if using a different LLM provider
- `PROVIDER_BASE_URL`: Optional base URL for custom LLM provider

3. **Service-to-Service Communication**
- `AGENTS_API_KEY`: API key for Rowboat Agents service authentication
- Must be consistent across all services that need to communicate with the Agents service

### Common Issues

1. **403 Forbidden Errors**
- If you see "Streaming failed" or 403 errors in the UI, check that:
- `COPILOT_API_KEY` is identical in both Rowboat and CoPilot services
- The API key is properly set in the Kubernetes secret
- Both services have been restarted after updating the secret

2. **Service Connectivity**
- Ensure all services can resolve each other using the Kubernetes service names:
- Rowboat → CoPilot: `http://copilot:3002`
- Rowboat → Agents: `http://rowboat-agents:3001`
- Rowboat → MongoDB: `mongodb://admin:password@mongodb:27017/rowboat?authSource=admin`

### Updating Secrets

To update API keys or other secrets:

1. Edit `k8s/arm64/app-secrets.yaml`
2. Apply the changes:
```bash
kubectl apply -f k8s/arm64/app-secrets.yaml
```
3. Restart the affected services:
```bash
kubectl rollout restart deployment/copilot
kubectl rollout restart deployment/rowboat
```
# Test commit
4 changes: 2 additions & 2 deletions apps/copilot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
if PROVIDER_BASE_URL:
print(f"Using provider {PROVIDER_BASE_URL}, for completions")
completions_client = OpenAI(
base_url=PROVIDER_BASE_URL,
api_key=PROVIDER_API_KEY
base_url=PROVIDER_BASE_URL,
default_headers={"Authorization": f"Bearer {PROVIDER_API_KEY}"}
)
else:
print(f"Using OpenAI directly for completions")
Expand Down
53 changes: 26 additions & 27 deletions apps/docs/docs/using_rag.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Using RAG in Rowboat

Rowboat provides multiple ways to enhance your agents with Retrieval-Augmented Generation (RAG). This guide will help you set up and use each RAG feature.
Rowboat provides multiple ways to enhance your agents' context with Retrieval-Augmented Generation (RAG). This guide will help you set up and use each RAG features.

## Quick Start

Text RAG and local file uploads are enabled by default - no configuration needed! Just start using them right away.

## Available RAG Features
## RAG Features

### 1. Text RAG
✅ Enabled by default:
Expand All @@ -21,8 +21,28 @@ Text RAG and local file uploads are enabled by default - no configuration needed
- Files are stored locally
- No configuration required
- Files are parsed using OpenAI by default
- For larger files, we recommend using Gemini models - see section below.

### 3. S3 File Uploads
#### 2.1 Using Gemini for File Parsing
To use Google's Gemini model for parsing uploaded PDFs, set the following variable:

```bash
# Enable Gemini for file parsing
export USE_GEMINI_FILE_PARSING=true
export GOOGLE_API_KEY=your_google_api_key
```

### 3. URL Scraping
Rowboat uses Firecrawl for URL scraping. To enable URL scraping, set the following variables:

```bash
export USE_RAG_SCRAPING=true
export FIRECRAWL_API_KEY=your_firecrawl_api_key
```

## Advanced RAG features

### 1. File Uploads Backed by S3
To enable S3 file uploads, set the following variables:

```bash
Expand All @@ -36,20 +56,8 @@ export RAG_UPLOADS_S3_BUCKET=your_bucket_name
export RAG_UPLOADS_S3_REGION=your_region
```

### 4. URL Scraping
To enable URL scraping, set the following variables:
### 2. Changing Default Parsing Model

```bash
# Enable URL scraping
export USE_RAG_SCRAPING=true

# Firecrawl API key for web scraping
export FIRECRAWL_API_KEY=your_firecrawl_api_key
```

## File Parsing Options

### Default Parsing (OpenAI)
By default, uploaded PDF files are parsed using `gpt-4o`. You can customize this by setting the following:

```bash
Expand All @@ -64,16 +72,7 @@ export FILE_PARSING_PROVIDER_BASE_URL=your-provider-base-url
export FILE_PARSING_PROVIDER_API_KEY=your-provider-api-key
```

### Using Gemini for File Parsing
To use Google's Gemini model for parsing uploaded PDFs, set the following variable:

```bash
# Enable Gemini for file parsing
export USE_GEMINI_FILE_PARSING=true
export GOOGLE_API_KEY=your_google_api_key
```

## Embedding Model options
### 3. Embedding Model Options

By default, Rowboat uses OpenAI's `text-embedding-3-small` model for generating embeddings. You can customize this by setting the following:

Expand Down Expand Up @@ -101,4 +100,4 @@ export EMBEDDING_PROVIDER_BASE_URL=your-provider-base-url
export EMBEDDING_PROVIDER_API_KEY=your-provider-api-key
```

If you don't specify the provider settings, Rowboat will use OpenAI as the default provider.
If you don't specify the provider settings, Rowboat will use OpenAI as the default provider.
2 changes: 1 addition & 1 deletion apps/rowboat/app/projects/[projectId]/config/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function McpServersSection({
/>
<Input
label="SSE URL"
placeholder="https://localhost:8000/sse"
placeholder="http://host.docker.internal:8000/sse"
value={newServer.url}
onChange={(e) => {
setNewServer({ ...newServer, url: e.target.value });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function McpServersSection({ projectId }: { projectId: string }) {
<div className="space-y-2">
<label className="text-sm font-medium">SSE URL</label>
<Input
placeholder="https://localhost:8000/sse"
placeholder="http://host.docker.internal:8000/sse"
value={newServer.url}
onChange={(e) => {
setNewServer({ ...newServer, url: e.target.value });
Expand Down
Loading