Skip to main content
CogOS can process multiple input formats, automatically converting them into text suitable for the CM agent.

Auto-Detection

The simplest approach — auto_convert() handles format detection:

Available Converters

ConverterInput TypeDescription
PlainTextConverterstrPass-through with cleanup
MarkdownConverterstrMarkdown content / files
ChatHistoryConverterlist[dict]OpenAI message format
RAGConverterlist[dict]RAG chunks with metadata
JSONConverterdict / strArbitrary JSON data
auto_convert()anyAuto-detects format

Chat History

Convert OpenAI-compatible message arrays:

RAG Chunks

Convert retrieval-augmented generation chunks with metadata:

Custom Converters

Subclass InputConverter and implement convert():