---
title: conversion | CodeWeaver Docs
description: API reference for codeweaver.server.agent_api.search.conversion
url: "https://docs.knitli.com/api/server/agent_api/search/conversion"
type: static
generatedAt: "2026-04-17T17:21:09.653Z"
---

# conversion
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/server/agent_api/search/conversion.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F&text=conversion)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F&text=conversion)[Share on Bluesky](https://bsky.app/intent/compose?text=conversion%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F&title=conversion)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F&t=conversion)[Share on Email](mailto:?subject=conversion&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F)[Share on WhatsApp](https://wa.me/?text=conversion%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fagent_api%2Fsearch%2Fconversion%2F&text=conversion)
# `codeweaver.server.agent_api.search.conversion`
[Section titled “codeweaver.server.agent_api.search.conversion”](#codeweaverserveragent_apisearchconversion)
Conversion utilities for search results.

This module handles the conversion between different result formats, primarily converting SearchResult objects from vector stores to CodeMatch objects for API responses.

## Function: `convert_search_result_to_code_match`
[Section titled “Function: convert_search_result_to_code_match”](#function-convert_search_result_to_code_match)

**

```
convert_search_result_to_code_match()
```

Convert SearchResult from vector store to CodeMatch for response.

Args: result: SearchResult from vector store search

Returns: CodeMatch with all required fields populated