RedPlanetHQ/core

New Integration: Harvey

Aberta

#527 aberto em 24 de fev. de 2026

 (0 comentário) (0 reação) (0 responsável)TypeScript (184 forks)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

Métricas do repositório

Stars
 (1.930 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Description

Add Harvey integration to sync legal AI assistant data, client matters, document QA results, query history, and workflow analytics into CORE.

Reference Implementations

Existing Integrations (use as templates)

  • integrations/notion/ - Similar knowledge/document system
  • integrations/linear/ - Project management integration
  • integrations/slack/ - For reference

Required Files Structure

integrations/harvey/
├── src/
│   ├── index.ts          # Main entry, API spec
│   ├── schedule.ts       # Sync logic
│   ├── utils.ts          # Harvey API utilities
│   ├── account-create.ts # Auth setup
│   └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md

Harvey API Integration

Authentication Setup

  • Use API key or OAuth-based authentication via Harvey's Developer Portal
  • Access managed through enterprise agreements (check Order Form or email support@harvey.ai)
  • API documentation at developers.harvey.ai

Key APIs

  • Matters API - Client matter management
    • Create, retrieve, update, and organize client matters
    • Associate documents and queries with matters
  • Query API - Legal AI assistant queries
    • Submit legal research queries
    • Retrieve query history and results
    • Context-aware follow-up queries
  • Document QA API - Document analysis
    • Upload documents for AI analysis
    • Ask questions about document contents
    • Extract key information and clauses
  • Workflow API - Automated legal workflows
    • Create and manage automated workflows
    • Track workflow execution and results

Key Endpoints

  • POST /api/v1/matters - Create a new matter
  • GET /api/v1/matters - List matters
  • GET /api/v1/matters/{id} - Get matter details
  • POST /api/v1/query - Submit a legal query
  • GET /api/v1/query/history - Get query history
  • POST /api/v1/documents/qa - Document QA
  • POST /api/v1/documents/upload - Upload documents
  • GET /api/v1/workflows - List workflows

Events to Track

  1. Matter Activity - New matters created, matter updates, matter status changes
  2. Query Activity - Legal queries submitted, responses generated, research completed
  3. Document Analysis - Documents uploaded, QA sessions, key findings extracted
  4. Workflow Events - Workflows triggered, completed, or failed
  5. Usage Analytics - Query volumes, response times, feature utilization

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement API key/OAuth authentication flow in account-create.ts
  • Create API utilities in utils.ts
  • Implement sync logic in schedule.ts for matters, queries, and documents
  • Convert legal AI events to CORE activity format
  • Add error handling and rate limiting
  • Create integration documentation
  • Add to integrations/README.md

Technical Notes

  • Harvey is an enterprise-focused AI legal assistant - API access requires an enterprise agreement
  • Built on OpenAI's models with legal-specific fine-tuning
  • Harvey has integrated Google's Deep Research capabilities
  • API access and available features depend on the organization's Order Form
  • Contact support@harvey.ai for API access details
  • There is a community-maintained Harvey API v2 client on GitHub: trexima/harvey-client

Resources

Labels

enhancement, integration, new-feature

Guia do colaborador