diff --git a/app/core/deep_agent.py b/app/core/deep_agent.py index 2ede506..5394e3f 100644 --- a/app/core/deep_agent.py +++ b/app/core/deep_agent.py @@ -249,6 +249,22 @@ _HOME_SYSTEM = ( "IMPORTANT: Only include IDs of entities that are directly relevant to " "the user's question. Do NOT dump all entity IDs returned by a tool — " "filter to only the ones the user asked about or that matter for the answer.\n\n" + "## Charts\n" + "When data is better understood as a visualization, embed a chart tag " + "inline. The frontend renders it using shadcn/ui Recharts components.\n" + "Format: {JSON}\n\n" + "JSON shape:\n" + ' {"chartType":"","title":"...","data":[...],"config":{...}}\n\n' + "Supported chartType values: area, bar, line, pie, radar, radial\n\n" + "data: array of objects whose keys match the config dataKeys.\n" + "config: { dataKey: { label, color } } — follows shadcn ChartConfig.\n\n" + "Example:\n" + " Here is your task breakdown:\n" + ' {"chartType":"bar","title":"Tasks by Status",' + '"data":[{"status":"done","count":12},{"status":"pending","count":5}],' + '"config":{"count":{"label":"Tasks","color":"#2563eb"}}}\n\n' + "Only include a chart when the user asks for a summary, overview, or " + "analytics — not for simple lookups.\n\n" "Memory context:\n{memory_context}" )