mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
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.
|
||
|---|---|---|
| .. | ||
| middleware | ||
| plugins | ||
| prompts | ||
| skills | ||
| subagents | ||
| tools | ||
| __init__.py | ||
| agent_cache.py | ||
| chat_deepagent.py | ||
| checkpointer.py | ||
| context.py | ||
| document_xml.py | ||
| errors.py | ||
| feature_flags.py | ||
| filesystem_backends.py | ||
| filesystem_selection.py | ||
| filesystem_state.py | ||
| llm_config.py | ||
| mention_resolver.py | ||
| path_resolver.py | ||
| permissions.py | ||
| plugin_loader.py | ||
| prompt_caching.py | ||
| sandbox.py | ||
| state_reducers.py | ||
| system_prompt.py | ||
| utils.py | ||