common.py
1 import sys 2 3 INIT_DEFAULT = { 4 "namespace": "default_namespace", 5 "broker_type": "solace", 6 "broker_url": "ws://localhost:8008", 7 "broker_vpn": "default", 8 "broker_username": "default", 9 "broker_password": "default", 10 "container_engine": "docker", 11 "dev_mode": False, 12 "add_webui_gateway": True, 13 "webui_frontend_welcome_message": "", 14 "webui_frontend_bot_name": "Solace Agent Mesh", 15 "webui_frontend_collect_feedback": False, 16 "webui_fastapi_host": "127.0.0.1", 17 "webui_fastapi_port": 8000, 18 "webui_enable_embed_resolution": True, 19 "platform_api_host": "127.0.0.1", 20 "platform_api_port": 8001, 21 } 22 23 USE_DEFAULT_SHARED_SESSION = "use_default_shared_session" 24 USE_DEFAULT_SHARED_ARTIFACT = "use_default_shared_artifact" 25 26 DEFAULT_COMMUNICATION_TIMEOUT = 600 27 28 AGENT_DEFAULTS = { 29 "supports_streaming": True, 30 "model_provider": "general", 31 "instruction": "You are a helpful AI assistant named __AGENT_NAME__.", 32 "artifact_handling_mode": "reference", 33 "enable_embed_resolution": True, 34 "enable_artifact_content_instruction": True, 35 "tools": "[]", 36 "session_service_type": "sql", 37 "session_service_behavior": "PERSISTENT", 38 "artifact_service_type": USE_DEFAULT_SHARED_ARTIFACT, 39 "artifact_service_base_path": "/tmp/samv2", 40 "artifact_service_scope": "namespace", 41 "agent_card_description": "A helpful AI assistant.", 42 "agent_card_default_input_modes": ["text"], 43 "agent_card_default_output_modes": ["text", "file"], 44 "agent_card_skills_str": "[]", 45 "agent_card_publishing_interval": 10, 46 "agent_discovery_enabled": True, 47 "inter_agent_communication_allow_list": [], 48 "inter_agent_communication_deny_list": [], 49 "inter_agent_communication_timeout": DEFAULT_COMMUNICATION_TIMEOUT, 50 "namespace": "${NAMESPACE}", 51 } 52 53 GATEWAY_DEFAULTS = { 54 "namespace": "${NAMESPACE}", 55 "gateway_id_suffix": "-gw-01", 56 "artifact_service_type": USE_DEFAULT_SHARED_ARTIFACT, 57 "artifact_service_scope": "namespace", 58 "artifact_service_base_path": "/tmp/samv2", 59 "system_purpose": ( 60 "The system is an AI Chatbot with agentic capabilities.\n" 61 "It will use the agents available to provide information,\n" 62 "reasoning and general assistance for the users in this system.\n" 63 "**Always return useful artifacts and files that you create to the user.**\n" 64 "Provide a status update before each tool call.\n" 65 "Your external name is Agent Mesh." 66 ), 67 "response_format": ( 68 "Responses should be clear, concise, and professionally toned.\n" 69 "Format responses to the user in Markdown using appropriate formatting." 70 ), 71 } 72 73 PROXY_DEFAULTS = { 74 "namespace": "${NAMESPACE}", 75 "artifact_service_type": "filesystem", 76 "artifact_service_base_path": "/tmp/samv2", 77 "artifact_service_scope": "namespace", 78 "artifact_handling_mode": "reference", 79 "discovery_interval_seconds": 5, 80 "proxied_agents": [], 81 } 82 83 84 port_55555 = "-p 55554:55555" if sys.platform == "darwin" else "-p 55555:55555" 85 86 CONTAINER_RUN_COMMAND = f" run -d --rm -p 8080:8080 {port_55555} -p 8008:8008 -u 1004 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace-broker solace/solace-pubsub-standard"