SurfSense/surfsense_backend/app/agents/new_chat/tools
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
..
confluence feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
discord feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
dropbox feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
gmail feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
google_calendar feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
google_drive feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
jira feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
linear feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
luma feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
notion feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
onedrive feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
teams feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
__init__.py refactor: rename and consolidate memory tools to update_memory 2026-04-08 23:29:26 +05:30
connected_accounts.py feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
generate_image.py feat: fixed vision/image provider specific errors and fixed podcast/video streaming 2026-05-02 19:18:53 -07:00
hitl.py fix: fixed composio issues 2026-05-02 21:16:03 -07:00
invalid_tool.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
knowledge_base.py feat: add Dropbox integration support with configuration and connector updates 2026-03-30 22:16:41 +05:30
mcp_client.py chore: linting 2026-04-27 14:04:50 -07:00
mcp_tool.py refactor(mcp): per-connector cache refresh on lifecycle events 2026-05-20 17:43:27 +02:00
mcp_tools_cache.py refactor(mcp): per-connector cache refresh on lifecycle events 2026-05-20 17:43:27 +02:00
podcast.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
registry.py feat(automations): add create_automation HITL tool (NL → draft → approve → save) 2026-05-28 00:12:02 +02:00
report.py feat: made agent file sytem optimized 2026-03-28 16:39:46 -07:00
resume.py fix: adjust spacing in resume template for highlights 2026-04-22 19:24:30 +05:30
scrape_webpage.py feat: update YouTube transcript fetching to select primary language transcripts 2026-02-06 14:02:46 -08:00
search_surfsense_docs.py refactor: add public URL handling for SurfSense documents across various components and schemas 2026-05-15 02:05:11 +05:30
tool_response.py chore: linting 2026-04-27 14:04:50 -07:00
update_memory.py refactor: extract shared memory service 2026-05-20 02:01:36 +05:30
video_presentation.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
web_search.py chore: ran linting 2026-03-17 04:40:46 +05:30