diff --git a/src/type.jl b/src/type.jl
index d554f2a..e04c124 100644
--- a/src/type.jl
+++ b/src/type.jl
@@ -1,375 +1,189 @@
-module type
-
-export agent, sommelier, companion, virtualcustomer, agentcontext
-
-using Dates, UUIDs, DataStructures, JSON, NATS
-using GeneralUtils
-
-# ---------------------------------------------- 100 --------------------------------------------- #
-
-
-mutable struct agentcontext
- text2textInstructLLM::Function
- getTextEmbedding::Function
- executeSQL::Function
- similarSQLVectorDB::Function
- insertSQLVectorDB::Function
- similarSommelierDecision::Function
- insertSommelierDecision::Function
- find_related_tables_for_user_question::Function
- pg_conn_str::String
- agentconfig::AbstractDict
-end
-
-abstract type agent end
-
-mutable struct sommelier <: agent
- name::String # agent name
- id::String # agent id
- retailername::String
- retailerid::String
- tools::Dict
- maxHistoryMsg::Integer # e.g. 21th and earlier messages will get summarized
- chathistory::Vector{Dict{String, Any}}
- memory::Dict{String, Any}
- context::agentcontext
- llmFormatName::String
-end
-
-""" A sommelier agent.
-
-# Arguments
- - `context::agentcontext`
- Application context containing shared functions for LLM, SQL, and vector database operations.
-
-# Keyword Arguments
- - `name::String`
- Agent's name. Default: `"Assistant"`
- - `id::String`
- Agent's ID. Default: generated UUID string.
- - `retailername::String`
- Retailer name associated with the sommelier. Default: `"retailer_name"`
- - `maxHistoryMsg::Integer`
- Maximum history messages. Default: `20`
- - `chathistory::Vector{Dict{String, String}}`
- Chat history. Default: empty vector.
- - `llmFormatName::String`
- LLM format name. Default: `"granite3"`
-
-# Return
- - `sommelier`: An instantiated sommelier agent.
-
-# Example
-```julia
-julia> using YiemAgent
-julia> context = agentcontext(
- text2textInstructLLM,
- getTextEmbedding,
- executeSQL,
- similarSQLVectorDB,
- insertSQLVectorDB,
- similarSommelierDecision,
- insertSommelierDecision
- )
-julia> agent = sommelier(context, name="WineExpert", id="123", retailername="MyWineShop")
-```
-"""
-function sommelier(
- context::agentcontext, # agent functions, db connect and other context
- ;
- name::String= "Assistant",
- id::String= string(uuid4()),
- retailername::String= "not specified",
- retailerid::String= "not specified",
- maxHistoryMsg::Integer= 20,
- chathistory::Vector{Dict{String, Any}} = Vector{Dict{String, Any}}(),
- llmFormatName::String= "granite3"
- )
-
- tools = Dict( # update input format
- "chatbox"=> Dict(
- "description" => "Useful for when you need to ask the user for more context. Do not ask the user their own question.",
- "input" => """Input is a text in JSON format.{\"Q1\": \"How are you doing?\", \"Q2\": \"How may I help you?\"}""",
- "output" => "" ,
- ),
- "winestock"=> Dict(
- "description" => "A handy tool for searching wine in your inventory that match the user preferences.",
- "input" => """Input is a JSON-formatted string that contains a detailed and precise search query.{\"wine type\": \"rose\", \"price\": \"max 35\", \"sweetness level\": \"sweet\", \"intensity level\": \"light bodied\", \"Tannin level\": \"low\", \"Acidity level\": \"low\"}""",
- "output" => """