SurfSense/surfsense_backend
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
..
alembic feat(automations): static_inputs on triggers + vertical-slice api/services 2026-05-27 21:21:43 +02:00
app feat(automations): add create_automation HITL tool (NL → draft → approve → save) 2026-05-28 00:12:02 +02:00
scripts chore(scripts): drop one-off MCP session lifetime probe 2026-05-20 19:11:00 +02:00
tests test(chat): add parity tests for streaming/flows/ parallel refactor 2026-05-25 21:50:18 +02:00
.dockerignore chore(backend): exclude tests/ from production Docker image 2026-05-06 17:16:22 +05:30
.env.example feat(env): add SURFSENSE_ENV variable for deployment environment and update observability resource attributes 2026-05-23 02:13:24 +05:30
.gitignore chore: enhance E2E tests by adding synthetic global LLM config and updating environment variables for Google OAuth 2026-05-12 02:37:39 +05:30
.python-version feat: SurfSense v0.0.6 init 2025-03-14 18:53:14 -07:00
alembic.ini add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00
celery_worker.py fix: celery_app path and gmail indexing 2025-10-21 21:11:41 -07:00
Dockerfile fix: docker one click setup 2026-05-20 01:25:07 -07:00
main.py feat(observability): add OpenTelemetry process bootstrap 2026-05-21 23:01:54 +05:30
pyproject.toml add next_fire_at to automation_triggers and croniter dep 2026-05-27 17:55:58 +02:00
uv.lock add next_fire_at to automation_triggers and croniter dep 2026-05-27 17:55:58 +02:00