Cosolvent

The open-source headless marketplace engine for thin market formation. A full sponsor admin dashboard, plus a powerful API for building a custom participant frontend using AI.

View Feature Sheet ↓ Explore Repository →

Build Without Boundaries

As part of the MarketForge ensemble, Cosolvent serves as the open-source layer. It provides the essential digital infrastructure that connects isolated buyers and sellers within highly specialized, low-volume ecosystems.

Rather than spending months building role permissions, deal-flow assembly, and semantic scaffolding from scratch, Cosolvent allows you to generate a functional marketplace structure instantly, ready to be customized for your exact vertical.

Core Features

  • Matching Engine: Pre-built logic for resolving complex semantic matches.
  • Deal Assembly: Manage the multi-step lifecycle of thin market deal negotiations.
  • Role Permissions: Native support for multi-party structures, including facilitators and intermediaries.
  • Open Source: MIT License ensures you own and control what you build.

The Content Match Story — Knowing Before Committing

Most matching platforms announce a match. Cosolvent argues for one.

When two parties are matched, Cosolvent generates a Content Match Story — an AI-authored narrative that explains why the pairing is promising and what they could plausibly accomplish together. Not a profile summary. Not a referral. A case, made on behalf of the match.

Delivery is progressive and privacy-respecting: the story begins anonymously, so both parties can assess fit before any identifying information is exchanged. Identity is revealed only on double opt-in. This means participants arrive at their first conversation already understanding the match argument — wasted calls drop, conversion on genuine matches rises, and every interaction starts with shared context rather than mutual assessment from scratch.

In thin markets — where each viable match is rare and every trust withdrawal is costly — the Content Match Story is not a convenience feature. It is a structural intervention that makes low-density markets viable.

Scope Boundaries: What We Build vs. What You Build

Cosolvent is deliberately architected as a headless marketplace engine. It provides the universal infrastructure for thin market formation, but explicitly defers the participant-facing interface to the market sponsor.

  • Frontend UIs: Cosolvent provides APIs. The vertical sponsor builds the web or mobile app.
  • Monetization & Payments: We defer payment processing and business models to existing tools like Stripe.
  • Trust & Verification: Escrow, dispute resolution, and regulatory compliance are handled by the sponsor.
  • Digital Twins: Simulated populations belong in ClientSynth, separated from live market data.
View Feature Sheet ↓ ⬇ Roadmap (PDF) Explore Repository → ← Back to Ecosystem

Cosolvent Feature Overview

✅ Implemented    🔜 Planned

Configuration & Deployment
YAML-Driven Marketplace DefinitionDefine participant types, schemas, permissions, and discovery settings in a single marketplace.yaml file.
Deterministic Compiler PipelineYAML → normalize → hash → render → write → manifest. Reproducible artifact generation with drift detection.
Browser-Based Setup PanelVisual configuration UI with presets, real-time validation, and live YAML preview.
Docker Compose DeploymentSingle-command launch: API server, PostgreSQL + pgvector, Redis, ARQ background workers.
🔜AI-Assisted ConfigurationAI assistant generates config suggestions from conversational market description.
🔜Multi-TenancyTenant isolation for hosting multiple marketplaces on a single deployment.
Profile Infrastructure
Dynamic Profile SchemasRuntime Pydantic models generated from config. No hard-coded entity types.
Three-Tier Field VisibilityEvery field tagged public, protected, or private with enforcement at the API layer.
Configurable OnboardingPer-type onboarding: manual/auto approval, document uploads, AI extraction, completeness thresholds.
🔜Gallery / Matching SeparationSplit into a curated gallery layer (browsing) and a richer matching layer (AI-only signals).
🔜Group / Cooperative TypeGroups of small producers participate as a single entity with aggregated profiles.
AI & Semantic Search
AI Document ExtractionLLM reads uploaded documents and extracts structured profile fields automatically.
Semantic Vector Searchpgvector cosine-distance search with metadata filtering and configurable thresholds.
Hybrid & RAG SearchTwo retrieval modes — hybrid (vector + keyword) and rag_strict (vector-only with grounding).
Multi-Provider AIProvider-agnostic LLM layer supporting OpenAI, OpenRouter, and Google Gemini.
🔜CommonContext IntegrationSponsor-curated domain knowledge library with vertical-specific metadata and domain Q&A.
🔜VLM IntegrationImage-based document extraction for certificates, invoices, and product photos.
Matching & Deal Engine
Participant DiscoveryConfig-driven search with filter fields, anonymous/authenticated results, and similarity thresholds.
🔜Bidirectional MatchingMutual preference matching considering both parties' profiles.
🔜Deal Data ModelStructured deals linking principals, facilitators, role slots, product, route, and timeline.
🔜Handoff ArtifactPlatform's primary deliverable — assembled from profiles, signals, conversations, and recommendations.
🔜Anticipatory MatchingProactive notifications when new listings match a participant's needs.
AI Risk Insulation & Dynamic Contracts

The AI Risk Insulation module of the Cosolvent engine addresses externally imposed market uncertainty (EMU). By acting as a secure oracle, it ingests real-time macro-economic feeds—such as central bank daily exchange rates, tariff registries, corridor shipping logs, and commodity price indexes—to programmatically write, negotiate, and execute Dynamic Contingent Contracts.

This directly neutralizes the Option Value of Delay in volatile macro environments by adapting transaction terms, currency splits, and compliance escapes within automated escrow locks.

Programmatic JSON Contract Schema

Below is an example of a serialized Dynamic Contingent Contract managed by the Cosolvent engine, establishing a currency collar, tariff threshold split, and regulatory compliance escape trigger.

{
  "contract_id": "dcc_8f3a9d2c_412e",
  "principals": {
    "buyer": "buyer_firm_109",
    "seller": "seller_firm_304"
  },
  "financials": {
    "base_amount": 125000.00,
    "currency": "USD",
    "settlement_type": "prog_escrow"
  },
  "ai_risk_insulation": {
    "currency_collar": {
      "reference_pair": "CAD_USD",
      "oracle_source": "central_bank_feed",
      "base_rate": 0.7350,
      "lower_floor": 0.7100,
      "upper_ceiling": 0.7600,
      "contingency": {
        "action": "adjust_pro_rata",
        "formula": "price * (current_rate / base_rate)"
      }
    },
    "tariff_indexation": {
      "commodity_code": "1001.99.00",
      "transit_corridor": "CA_US_border_windsor",
      "base_tariff_pct": 0.05,
      "max_tariff_cap": 0.15,
      "escalation_contingency": {
        "split_ratio": { "buyer": 0.5, "seller": 0.5 },
        "action": "terminate_with_full_refund_above_cap"
      }
    },
    "regulatory_escape": {
      "required_registries": [
        "fda_import_compliance",
        "cfia_export_certification"
      ],
      "check_frequency_seconds": 3600,
      "contingency": {
        "trigger_on_revocation": true,
        "action": "automatic_force_majeure_refund",
        "escrow_resolution": "return_to_buyer"
      }
    }
  }
}
Oracle Feed Ingestion PipelineNative integrations for swallowing official central bank daily FX rates and tariff lookup APIs.
Currency Collar StructuringDefines dynamic adjustment ranges to cushion buyer/seller margins from unexpected intraday or multi-day FX drops.
🔜Programmatic Escrow LocksBinds settlement funds in automated multi-sig escrows that auto-release or auto-refund based on compliance oracle status.
🔜Tariff Cost-Splitting EngineApportion border cost increases fairly between transacting parties based on real-time customs database queries.
🔜Force Majeure Auto-TriggersAutomatically terminates pending deals and refunds escrows if crucial regulatory certificates are revoked mid-transit.
Communication
Conversation LifecycleCreate, accept, reject, and close conversations with full state tracking.
Real-Time WebSocketLive message delivery via WebSocket connections.
Config-Driven RulesConversation initiation rules defined per participant-type pair in marketplace config.
🔜Progressive Trust GatingCommunication channels unlock progressively as trust stages advance.
Trust & Verification
Admin Approval WorkflowBinary trust gate — admin manually approves or rejects participant applications.
🔜Verification PipelineAuto-analyze documents for consistency and assign verification confidence scores.
🔜Reputation SystemTrack transaction outcomes, response times, and dispute rates.
🔜Progressive Trust StagesSix-stage trust ladder from anonymous browsing to post-transaction evaluation.
Admin & Developer Tools
Admin DashboardAggregate marketplace statistics, user management, and application approval.
OpenAPI DocumentationAuto-generated interactive API docs at /docs.
Drift Detectioncompile --check verifies generated artifacts match current config.
36+ Unit TestsCoverage across config, compiler, permissions, visibility, schemas, and more.
Background Job ProcessingARQ worker pool for async document processing, embedding generation.
Architecture
LanguagePython 3.11+
API FrameworkFastAPI
DatabasePostgreSQL + pgvector
Cache / QueueRedis + ARQ
AI ProvidersOpenAI · OpenRouter · Google Gemini
LicenseOpen Source (MIT)