RedPlanetHQ/core

New Integration: Harvey

開放

#527 建立於 2026年2月24日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (184 個分叉)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

倉庫指標

星標
 (1,930 顆星)
PR 合併指標
 (平均合併 3小時 2分鐘) (30 天內合併 10 個 PR)

描述

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

貢獻者指南