Skip to content

Getting Started with EIAS

This guide walks you through setting up EIAS for local development and first use.

Prerequisites

Before you begin, ensure you have:

Installation

1. Clone the Repository

git clone https://github.com/your-org/eias.git
cd eias

2. Install Dependencies

npm install

3. Configure Environment

Create your environment file:

cp .env.example .env.local

Edit .env.local with your settings:

# Database connection (default works with docker-compose)
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/eias?schema=public"

# Required: Your Anthropic API key
ANTHROPIC_API_KEY="sk-ant-api03-..."

# Optional: For production authentication
# NEXTAUTH_SECRET="generate-a-32-char-secret"
# NEXTAUTH_URL="https://your-domain.com"

4. Start the Database

EIAS uses PostgreSQL. The easiest way to run it is with Docker:

docker compose up -d

This starts PostgreSQL on port 5432 with: - Username: postgres - Password: postgres - Database: eias

Verify it's running:

docker compose ps

5. Initialize the Database

Push the Prisma schema to create tables:

npm run db:push

Optionally, seed sample data for testing:

npm run db:seed

The seed creates: - A demo user - A sample project with uncertainty areas - An interview agent with invitations

6. Start the Development Server

npm run dev

Visit http://localhost:3000 to access EIAS.

First Steps

1. Explore the Dashboard

The dashboard shows: - Active Projects — Your research projects - Pending Insights — Insights awaiting review - Active Interviews — Ongoing expert invitations

2. Create Your First Project

  1. Click "New Project"
  2. Enter project details:
  3. Name: Your project title
  4. Description: What you're researching
  5. Goals: Key objectives (one per line)
  6. Click "Create Project"

3. Define Uncertainty Areas

Uncertainty areas are knowledge gaps you want experts to address.

  1. From your project page, click "Add Uncertainty Area"
  2. Fill in:
  3. Title: Brief name for the knowledge gap
  4. Description: What you need to learn
  5. Priority: High, Medium, or Low
  6. Questions: Specific questions (one per line)
  7. Click "Save"

4. Create an Interview Agent

  1. Click "New Agent"
  2. Configure the agent:
  3. Name: Agent identifier (e.g., "Clinical Workflow Expert Interview")
  4. Focus Areas: Select which uncertainty areas to probe
  5. Interview Style:
    • Exploratory: Open-ended, follows expert's lead
    • Focused: Targeted on specific questions
    • Validating: Confirms existing hypotheses
  6. Time Estimate: Expected interview duration
  7. Click "Create Agent"

The system generates an optimized system prompt based on your configuration.

5. Invite an Expert

  1. From the agent page, click "Create Invitation"
  2. Enter expert details:
  3. Name: Expert's name
  4. Role: Their expertise/title
  5. Expiration: When the link expires (default: 7 days)
  6. Click "Create Invitation"
  7. Copy the generated link and share it with your expert

6. Test the Interview

Click "Test Interview" to try the expert experience:

  1. You'll see the chat interface
  2. The agent introduces itself and the project context
  3. Respond naturally—the agent adapts its questions
  4. Complete the interview when finished

7. Extract and Review Insights

After an interview completes:

  1. Navigate to the session page
  2. Click "Extract Insights"
  3. Claude synthesizes 3-7 insights with:
  4. Category: Type of insight
  5. Confidence: High, Medium, or Low
  6. Source Messages: Which expert responses informed the insight
  7. Review each insight:
  8. Integrate: Add to project knowledge
  9. Review Later: Defer decision
  10. Discard: Remove from queue

Development Commands

# Start development server with hot reload
npm run dev

# Type checking
npm run typecheck

# Run ESLint
npm run lint

# Build for production
npm run build

# Start production server
npm run start

Database Commands

# Push schema changes to database
npm run db:push

# Seed sample data
npm run db:seed

# Open Prisma Studio (visual database browser)
npm run db:studio

# Generate Prisma client after schema changes
npx prisma generate

Troubleshooting

Database Connection Failed

Error: Can't reach database server at `localhost`:`5432`

Solution: Ensure Docker is running and the container is up:

docker compose up -d
docker compose ps  # Should show eias-postgres running

Prisma Schema Out of Sync

Error: The database schema is not in sync with your Prisma schema

Solution: Push the latest schema:

npm run db:push

Claude API Errors

Error: 401 Unauthorized

Solution: Check your API key in .env.local:

# Ensure no extra spaces or quotes
ANTHROPIC_API_KEY=sk-ant-api03-...

Port Already in Use

Error: Port 3000 is already in use

Solution: Either stop the other process or use a different port:

npm run dev -- -p 3001

Next Steps

Getting Help