Example Prompt Configuration

This is an example configuration object generated by smarter.apps.prompt.views.PromptConfigView. This is generated on every user prompt, hence, performance is important. The Smarter Platform generates historical artifacts on a variety of events, including for example:

  • history of the chat invocation

  • which Smarter Plugins (eg an extensible LLM tool) where selected to include in the LLM request, and the selection criteria used.

  • which tools were actually invoked by the LLM

  • the responses from each tool invocation

These artifacts are generated asynchronously, and PromptConfigView is optimized to return this data lazily and with extensive use of caching.

Usage

# Smarter Prompt Engineer Workbench
curl -X GET http://localhost:9357/api/v1/llm-clients/9/chat/config/?session_key=e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7

# Deployed Smarter LLMClient - Alpha
curl -X GET https://stackademy.3141-5926-5359.alpha.api.example.com/config/

# Deployed Smarter LLMClient - Production
curl -X GET https://stackademy.3141-5926-5359.api.example.com/config/

Note

There are multiple possible hosts and paths that lead to this endpoint, depending on your use case.

Json Object Keys

See also

Example JSON Object

Example Chat Configuration JSON Object
{
    "data": {
        "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7",
        "sandbox_mode": false,
        "debug_mode": true,
        "llm_client": {
            "id": 9,
            "url_llm_client": "http://localhost:9357/api/v1/llm-clients/9/chat/",
            "account": {
                "accountNumber": "3141-5926-5359"
            },
            "default_system_role": "The current date/time is Monday, 2025-12-08T13:37:43+0000\nYou are a helpful assistant. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. DO NOT GUESS. IF\n  YOU DON'T KNOW THE ANSWER, RESPOND THAT YOU DON'T KNOW.\n",
            "created_at": "2025-11-21T03:20:13.143128Z",
            "updated_at": "2025-11-21T03:20:13.176363Z",
            "name": "stackademy_sql",
            "description": "Stackademy University course catalogue inquiries using the Stackademy SQL plugin.",
            "version": "1.0.0",
            "deployed": false,
            "provider": "openai",
            "default_model": "gpt-4o-mini",
            "default_temperature": 0.5,
            "default_max_tokens": 1024,
            "app_name": "Stackademy",
            "app_assistant": "Stanley",
            "app_welcome_message": "Welcome to Stackademy! How can I help you today?",
            "app_example_prompts": [
                "Do you offer any courses on AI?",
                "My budget is $1,000. What courses can I take?",
                "I want to study programming. What do you suggest?"
            ],
            "app_placeholder": "Ask me anything about Stackademy courses...",
            "app_info_url": "https://stackademy.edu/online-courses",
            "app_background_image_url": null,
            "app_logo_url": null,
            "app_file_attachment": null,
            "dns_verification_status": "Not Verified",
            "tls_certificate_issuance_status": "No Certificate",
            "subdomain": null,
            "custom_domain": null
        },
        "history": {
            "chat": {
                "id": 6,
                "created_at": "2025-12-08T13:37:26.056430Z",
                "updated_at": "2025-12-08T13:37:26.056441Z",
                "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7",
                "ip_address": "172.66.0.243",
                "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36",
                "url": "http://localhost:9357/api/v1/llm-clients/9/config/",
                "account": 1,
                "llm_client": 9
            },
            "prompt_history": [
                {
                    "role": "system",
                    "content": "The current date/time is Monday, 2025-12-08T13:37:26+0000\nYou are a helpful assistant. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. DO NOT GUESS. IF\n  YOU DON'T KNOW THE ANSWER, RESPOND THAT YOU DON'T KNOW.\n\n\nAnd also:\nYou are a helpful student advisor at the fictional Stackademy University that only offers computer science degrees programs. Whenever possible you should defer to the tool calls provided for additional information about the courses offered by Stackademy University. Questions unrelated to the courses or Stackademy University should be answered with \"I am sorry, but I can only provide information about the courses offered by Stackademy University.\"\n",
                    "smarter_is_new": false
                },
                {
                    "role": "assistant",
                    "content": "Welcome to Stackademy! How can I help you today?",
                    "smarter_is_new": false
                },
                {
                    "role": "assistant",
                    "content": "Some example prompts to get you started:\r\n\r\nDo you offer any courses on AI?\r\nMy budget is $1,000. What courses can I take?\r\nI want to study programming. What do you suggest?\r\n",
                    "smarter_is_new": false
                },
                {
                    "role": "user",
                    "content": "Do you offer any courses on AI?",
                    "smarter_is_new": false
                },
                {
                    "role": "smarter",
                    "content": "Smarter selected this plugin: stackademy_sql",
                    "smarter_is_new": false
                },
                {
                    "role": "smarter",
                    "content": "Prompt configuration: llm=openai, model=gpt-4o-mini, temperature=0.5, max_completion_tokens=2048, tool_choice=auto.",
                    "smarter_is_new": true
                },
                {
                    "role": "smarter",
                    "content": "Tool presented: get_current_weather(location: The city and state, e.g. San Francisco, CA, unit: METRIC, USCS) - Get the current weather in a given location ",
                    "smarter_is_new": true
                },
                {
                    "role": "smarter",
                    "content": "Tool presented: smarter_plugin_0000000011(max_cost: the maximum cost that a student is willing to pay for a course., description: areas of specialization for courses in the catalogue.) - returns up to 10 rows of course detail data, filtered by the maximum cost a student is willing to pay for a course and the area of specialization.\n ",
                    "smarter_is_new": true
                },
                {
                    "role": "smarter",
                    "content": "openai prompt charges: 410 prompt tokens, 20 completion tokens = 430 total tokens charged.",
                    "smarter_is_new": true
                },
                {
                    "role": "assistant",
                    "audio": null,
                    "content": null,
                    "refusal": null,
                    "tool_calls": [
                        {
                            "id": "call_Rvv0U5O2cLgOeYBVUMQSVfMn",
                            "type": "function",
                            "function": {
                                "name": "smarter_plugin_0000000011",
                                "arguments": "{\"description\":\"AI\"}"
                            }
                        }
                    ],
                    "annotations": [],
                    "function_call": null,
                    "smarter_is_new": true
                },
                {
                    "role": "smarter",
                    "content": "openai called this tool: smarter_plugin_0000000011({'description': 'AI'})",
                    "smarter_is_new": true
                },
                {
                    "name": "smarter_plugin_0000000011",
                    "role": "tool",
                    "content": "SqlPlugin stackademy_sql response: [\n  {\n    \"course_code\": \"CS210\",\n    \"course_name\": \"Artificial Intelligence\",\n    \"description\": \"Introduction to AI concepts and techniques.\",\n    \"cost\": \"700.00\",\n    \"prerequisite_course_code\": \"CS107\",\n    \"prerequisite_course_name\": \"Algorithms\"\n  },\n  {\n    \"course_code\": \"CS316\",\n    \"course_name\": \"AI for Robotics\",\n    \"description\": \"Applying AI techniques to robotics.\",\n    \"cost\": \"850.00\",\n    \"prerequisite_course_code\": \"CS301\",\n    \"prerequisite_course_name\": \"Machine Learning\"\n  },\n  {\n    \"course_code\": \"CS319\",\n    \"course_name\": \"AI in Healthcare\",\n    \"description\": \"Applications of AI in healthcare.\",\n    \"cost\": \"800.00\",\n    \"prerequisite_course_code\": \"CS301\",\n    \"prerequisite_course_name\": \"Machine Learning\"\n  },\n  {\n    \"course_code\": \"CS405\",\n    \"course_name\": \"AI Capstone Project\",\n    \"description\": \"Team-based AI project.\",\n    \"cost\": \"1000.00\",\n    \"prerequisite_course_code\": \"CS301\",\n    \"prerequisite_course_name\": \"Machine Learning\"\n  }\n]",
                    "tool_call_id": "call_Rvv0U5O2cLgOeYBVUMQSVfMn",
                    "smarter_is_new": true
                },
                {
                    "role": "assistant",
                    "audio": null,
                    "content": "Yes, Stackademy University offers several courses on Artificial Intelligence (AI). Here are some options:\n\n1. **Course Code:** CS210  \n   **Course Name:** Artificial Intelligence  \n   **Description:** Introduction to AI concepts and techniques.  \n   **Cost:** $700.00  \n   **Prerequisite:** CS107 - Algorithms  \n\n2. **Course Code:** CS316  \n   **Course Name:** AI for Robotics  \n   **Description:** Applying AI techniques to robotics.  \n   **Cost:** $850.00  \n   **Prerequisite:** CS301 - Machine Learning  \n\n3. **Course Code:** CS319  \n   **Course Name:** AI in Healthcare  \n   **Description:** Applications of AI in healthcare.  \n   **Cost:** $800.00  \n   **Prerequisite:** CS301 - Machine Learning  \n\n4. **Course Code:** CS405  \n   **Course Name:** AI Capstone Project  \n   **Description:** Team-based AI project.  \n   **Cost:** $1000.00  \n   **Prerequisite:** CS301 - Machine Learning  \n\nIf you're interested in any specific course or need more details, feel free to ask!",
                    "refusal": null,
                    "tool_calls": null,
                    "annotations": [],
                    "function_call": null,
                    "smarter_is_new": true
                },
                {
                    "role": "smarter",
                    "content": "openai prompt charges: 559 prompt tokens, 233 completion tokens = 792 total tokens charged.",
                    "smarter_is_new": true
                }
            ],
            "chat_tool_call_history": [],
            "chat_plugin_usage_history": [
                {
                    "id": 3,
                    "chat": {
                        "id": 6,
                        "created_at": "2025-12-08T13:37:26.056430Z",
                        "updated_at": "2025-12-08T13:37:26.056441Z",
                        "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7",
                        "ip_address": "172.66.0.243",
                        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36",
                        "url": "http://localhost:9357/api/v1/llm-clients/9/config/",
                        "account": 1,
                        "llm_client": 9
                    },
                    "created_at": "2025-12-08T13:37:37.279189Z",
                    "updated_at": "2025-12-08T13:37:37.279217Z",
                    "input_text": "Do you offer any courses on AI?",
                    "plugin": 11
                }
            ],
            "llm_client_request_history": [
                {
                    "id": 4,
                    "created_at": "2025-12-08T13:37:33.303852Z",
                    "updated_at": "2025-12-08T13:37:33.303874Z",
                    "request": {
                        "messages": [
                            {
                                "role": "system",
                                "content": "The current date/time is Monday, 2025-12-08T13:37:26+0000\nYou are a helpful assistant. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. DO NOT GUESS. IF\n  YOU DON'T KNOW THE ANSWER, RESPOND THAT YOU DON'T KNOW.\n"
                            },
                            {
                                "role": "assistant",
                                "content": "Welcome to Stackademy! How can I help you today?"
                            },
                            {
                                "role": "assistant",
                                "content": "Some example prompts to get you started:\r\n\r\nDo you offer any courses on AI?\r\nMy budget is $1,000. What courses can I take?\r\nI want to study programming. What do you suggest?\r\n"
                            },
                            {
                                "role": "user",
                                "content": "Do you offer any courses on AI?"
                            }
                        ],
                        "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7"
                    },
                    "is_aggregation": false
                }
            ],
            "plugin_selector_history": []
        },
        "meta_data": {
            "ready": true,
            "name": "stackademy_sql",
            "api_host": "api.localhost:9357",
            "llm_client_id": null,
            "llm_client_name": null,
            "llm_client_custom_domain": null,
            "environment_api_domain": "api.localhost:9357",
            "err": "LLMClientHelper.__init__() not an llm_client. Quitting. http://localhost:9357/api/v1/llm-clients/9/chat/config/",
            "is_custom_domain": false,
            "is_deployed": false,
            "is_valid": true,
            "is_authentication_required": false,
            "llm_client": {
                "id": 9,
                "created_at": "2025-11-21T03:20:13.143128Z",
                "updated_at": "2025-11-21T03:20:13.176363Z",
                "account": {
                    "accountNumber": "3141-5926-5359"
                },
                "name": "stackademy_sql",
                "description": "Stackademy University course catalogue inquiries using the Stackademy SQL plugin.",
                "version": "1.0.0",
                "subdomain": null,
                "custom_domain": null,
                "deployed": false,
                "provider": "openai",
                "default_model": "gpt-4o-mini",
                "default_system_role": "You are a helpful assistant. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. DO NOT GUESS. IF\n  YOU DON'T KNOW THE ANSWER, RESPOND THAT YOU DON'T KNOW.\n",
                "default_temperature": 0.5,
                "default_max_tokens": 1024,
                "app_name": "Stackademy",
                "app_assistant": "Stanley",
                "app_welcome_message": "Welcome to Stackademy! How can I help you today?",
                "app_example_prompts": [
                    "Do you offer any courses on AI?",
                    "My budget is $1,000. What courses can I take?",
                    "I want to study programming. What do you suggest?"
                ],
                "app_placeholder": "Ask me anything about Stackademy courses...",
                "app_info_url": "https://stackademy.edu/online-courses",
                "app_background_image_url": null,
                "app_logo_url": null,
                "app_file_attachment": null,
                "dns_verification_status": "Not Verified",
                "tls_certificate_issuance_status": "No Certificate",
                "url_llm_client": "http://localhost:9357/api/v1/llm-clients/9/chat/"
            },
            "url": "http://localhost:9357/api/v1/llm-clients/9/chat/config/",
            "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7",
            "auth_header": "Bearer****",
            "api_token": null,
            "data": {
                "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7"
            },
            "is_smarter_api": true,
            "is_llm_client": false,
            "is_llm_client_smarter_api_url": false,
            "is_llm_client_named_url": false,
            "is_llm_client_sandbox_url": false,
            "is_llm_client_cli_api_url": false,
            "is_default_domain": false,
            "path": "/api/v1/llm-clients/9/chat/config/",
            "root_domain": "localhost",
            "subdomain": "",
            "api_subdomain": null,
            "domain": "localhost:9357",
            "timestamp": "2025-12-08T13:37:43.051436",
            "unique_client_string": "3141-5926-5359.http://localhost:9357/api/v1/llm-clients/9/chat/config/.Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36.172.66.0.243.2025-12-08T13:37:43.051436",
            "client_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7",
            "ip_address": "172.66.0.243",
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36",
            "parsed_url": "ParseResult(scheme='http', netloc='localhost:9357', path='/api/v1/llm-clients/9/chat/config/', params='', query='session_key=e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7', fragment='')",
            "request": true,
            "qualified_request": true,
            "url_path_parts": [
                "api",
                "v1",
                "llm_clients",
                "9",
                "chat",
                "config"
            ],
            "params": {
                "session_key": "e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7"
            },
            "uid": null,
            "cache_key": "024304946256a341bf7796262884d72a51478dceb0e8fcdf907e37886e52ab90",
            "is_config": true,
            "is_dashboard": false,
            "is_workbench": false,
            "is_environment_root_domain": false,
            "account": {
                "accountNumber": "3141-5926-5359"
            },
            "user": {
                "username": "admin",
                "email": "admin@smarter.sh"
            },
            "user_profile": {
                "user": {
                    "username": "admin",
                    "email": "admin@smarter.sh"
                },
                "account": {
                    "accountNumber": "3141-5926-5359"
                }
            },
            "class_name": "LLMClientHelper"
        },
        "plugins": {
            "meta_data": {
                "total_plugins": 1,
                "plugins_returned": 1
            },
            "plugins": [
                {
                    "id": 13,
                    "pluginMeta": {
                        "name": "stackademy_sql",
                        "account": {
                            "accountNumber": "3141-5926-5359"
                        },
                        "description": "Online course catalogue inquiries for fictional Stackademy University that only offers computer science degrees programs.",
                        "pluginClass": "sql",
                        "version": "0.1.0",
                        "author": {
                            "user": {
                                "username": "admin",
                                "email": "admin@smarter.sh"
                            },
                            "account": {
                                "accountNumber": "3141-5926-5359"
                            }
                        },
                        "tags": []
                    },
                    "createdAt": "2025-11-21T03:20:13.178700Z",
                    "updatedAt": "2025-11-21T03:20:13.178708Z",
                    "llm_client": 9
                }
            ]
        }
    },
    "api": "smarter.sh/v1",
    "thing": "ChatConfig",
    "metadata": {
        "command": "chat_config"
    }
}