VConSharp - Virtual Conversations for .NET

VConSharp - Virtual Conversations for .NET

Table of Contents

VConSharp - Virtual Conversations for .NET

What Even Is a vCon

Before diving into the library, you need to understand what a vCon actually is. Think of it like a PDF, but instead of holding a document, it holds a conversation. Any conversation. Phone calls, chat messages, video conferences, emails. The format does not care about the source.

The term vCon stands for “virtual conversation” and originated from a simple question: why is there a vCard for contact information, but nothing equivalent for conversations? The answer is that there was not one. Until now.

A vCon is an open standard maintained by the IETF. No patents, no licensing fees, no intellectual property concerns. It is a JSON-based format designed to capture, store, and analyze conversational data in a way that is both machine readable and tamper resistant.

Why This Matters

Every company that records customer conversations captures personal information. Voices. Faces. Things that are far more sensitive than names or email addresses. You can change your name. Changing your voice or face is not really an option. Well, sometimes it is.

With privacy regulations like GDPR and CCPA becoming more stringent, companies need structured ways to track what data they have captured, where it came from, and who was involved. vCons provide exactly that structure.

When a customer exercises their right to have data deleted, you need to know what exists and where. When training machine learning models on conversation data, you need to track which data was used so you can retrain if that data needs to be removed. vCons make all of this manageable.

The Core Components

A vCon consists of several key components that work together to fully describe a conversation.

Parties identify who participated in the conversation. Not just names, but how their identities were verified, contact information, and roles.

Dialogs contain the actual conversation content. This could be audio recordings, video, text transcripts, or chat messages. vCons can be “packed” with the media embedded directly in the JSON, or “unpacked” with references to external files.

Analysis holds any insights derived from the dialogs. Sentiment analysis, keyword extraction, emotion detection, AI summaries. Anything generated by analyzing the conversation lives here.

Attachments provide context. The sales lead that prompted a call, a support ticket that initiated a chat session, documents referenced during the conversation.

Where vCons Can Be Used

The applications are broader than you might expect. Customer service centers can use vCons to capture and analyze support calls. Sales teams can track prospect conversations across multiple channels. Healthcare providers can document patient consultations while maintaining compliance.

Any scenario where you need to record, store, or analyze human communication is a candidate for vCons. The format is channel agnostic. Phone, video, chat, email. It all fits.

Enter VConSharp

VConSharp is a .NET implementation of the vCon specification. I built it because I needed a way to work with vCons in C# and there was nothing available. The library is a port of the original TypeScript implementation, adapted to feel natural in .NET.

Library

NuGet

Source Code

GitHub

Creating a vCon

Building a vCon starts with the factory method:

var vcon = VCon.BuildNew();

From there, you add parties to identify the participants:

var party = new Party(new Dictionary<string, object>
{
    ["tel"] = "+1234567890",
    ["name"] = "John Doe"
});
vcon.AddParty(party);

Then add dialogs for the actual conversation content:

var dialog = new Dialog("text/plain", DateTime.UtcNow, new[] { 0, 1 });
dialog.Body = "Hello, this is a conversation!";
vcon.AddDialog(dialog);

Signing for Tamper Protection

One of the most important features of vCons is the ability to sign them cryptographically. This ensures that once a conversation is captured, it cannot be modified without detection.

var keyPair = VCon.GenerateKeyPair();
vcon.Sign(keyPair.PrivateKey);

Later, you can verify that the vCon has not been tampered with:

bool isValid = vcon.Verify(keyPair.PublicKey);

This is critical for compliance scenarios where you need to prove that conversation records have not been altered.

Adding Analysis

After capturing a conversation, you will often want to attach analysis results. Maybe you ran sentiment analysis, extracted keywords, or generated an AI summary.

vcon.AddAnalysis(new Dictionary<string, object>
{
    ["type"] = "sentiment",
    ["dialog"] = 0,
    ["vendor"] = "sentiment-analyzer",
    ["body"] = new Dictionary<string, object>
    {
        ["score"] = 0.8,
        ["label"] = "positive"
    }
});

The analysis is linked to specific dialogs, so you can track exactly what content was analyzed and what the results were.

Working with Attachments

Context matters. VConSharp lets you attach related documents and files:

var attachment = vcon.AddAttachment(
    "application/pdf",
    "base64EncodedContent",
    Encoding.Base64
);

Later, you can find attachments by type:

var pdf = vcon.FindAttachmentByType("application/pdf");

Serialization

Everything serializes to JSON, making vCons easy to store and transmit:

string json = vcon.ToJson();

And you can reconstruct a vCon from JSON:

var vcon = VCon.BuildFromJson(jsonString);

A Gateway for .NET Developers

VConSharp is intentionally simple. The goal was to lower the barrier for .NET developers to start working with vCons. You do not need to understand the full specification to get started. Create a vCon, add parties and dialogs, serialize to JSON. That is the basic workflow.

As your needs grow, the library supports the full specification: attachments, analysis, tags, signing, and verification. But you can adopt those features incrementally as you need them.

Wrapping Up

vCons represent a fundamental shift in how we think about conversation data. Instead of scattered recordings in proprietary formats, you get a standardized, secure, and extensible format that works across platforms and vendors.

VConSharp brings that capability to .NET. Whether you are building a customer service platform, a compliance system, or anything else that touches human communication, vCons provide a solid foundation.

If you would like to learn more about the vCon specification, check out the IETF vCon Working Group. If you want to see a real-world implementation of a vCon server, take a look at Conserver.io, which is an open-source vCon server built using VConSharp.

Related Posts

MauiNativePdfView - A Native PDF Viewer for .NET MAUI

MauiNativePdfView - A Native PDF Viewer for .NET MAUI

Overview Displaying PDFs in mobile applications is a surprisingly common requirement. Whether it is user manuals, invoices, reports, or legal documents, chances are good that at some point in your app’s lifecycle you will need to show a PDF. In .NET MAUI, the typical approach has been to use a WebView and let the browser handle the rendering. While this works, it comes with its own set of challenges: performance issues with larger documents, limited control over the viewing experience, and the additional complexity of handling web-based solutions for what should be a native task.

Read More
Componentizer4k - In-Page Navigation for .NET MAUI

Componentizer4k - In-Page Navigation for .NET MAUI

Overview When building a workflow for a mobile application, it’s not uncommon to need to be able to go through a multi-step process. In .NET MAUI, I often see people use something like the CarouselView control to switch between these components. While that works, it becomes cumbersome because the carousel control is intended for use where you have an indefinite amount of similar items. If you need to manage multiple controls where each control has a unique view model, that is where the Componentizer shines. You can think of it as an in-page way to navigate between subcomponents or workflows of your page with familiar APIs and MVVM-focused features.

Read More
Quick Tip - Accessing The Service Provider in .NET MAUI

Quick Tip - Accessing The Service Provider in .NET MAUI

Better Service Resolution in .NET 8 In .NET MAUI we have very good access to dependency injection and primary constructors which makes things like the following very easy.

Read More