SurfSense/surfsense_backend/app/agents
CREDO23 2b7d91aa03 feat(automations): add create_automation HITL tool (NL → draft → approve → save)
Single tool exposed to the main agent. The main agent passes a natural-language
`intent`; a focused drafter sub-LLM turns it into a full AutomationCreate JSON;
that JSON is surfaced via request_approval (action_type "automation_create") so
the user can edit/approve it on a frontend card; on approval the tool persists
via AutomationService. Three phases, one tool call.

Scope split:
- main agent sees only `intent: str` (no schema knowledge leaks into the calling
  graph) — prompt fragments scoped accordingly.
- drafter sub-LLM owns the schema + few-shot intent→JSON examples — lives in
  the generating graph's prompt (tools/automation/prompt.py).

Files:
- main_agent/tools/automation/{create.py, prompt.py, __init__.py}: new tool
  + drafter system prompt with two few-shot intent→JSON examples.
- system_prompt/prompts/tools/create_automation/{description.md, example.md}:
  intent-only guidance for the main agent.
- main_agent/tools/index.py: add create_automation to the main-agent allowlist.
- new_chat/tools/registry.py: deferred-import factory to break the
  multi_agent_chat ↔ registry cycle; one ToolDefinition entry.
2026-05-28 00:12:02 +02:00
..
autocomplete Merge commit '61f4d05cd1' into dev_mod 2026-04-28 09:25:41 -07:00
multi_agent_chat feat(automations): add create_automation HITL tool (NL → draft → approve → save) 2026-05-28 00:12:02 +02:00
new_chat feat(automations): add create_automation HITL tool (NL → draft → approve → save) 2026-05-28 00:12:02 +02:00
podcaster cloud: added openrouter integration with global configs 2026-04-15 23:46:29 -07:00
video_presentation cloud: added openrouter integration with global configs 2026-04-15 23:46:29 -07:00
__init__.py feat: Added chat_history to researcher agent 2025-05-10 20:06:19 -07:00