diff --git a/skills/creative/sovereign_thinking.py b/skills/creative/sovereign_thinking.py new file mode 100644 index 000000000..b10259905 --- /dev/null +++ b/skills/creative/sovereign_thinking.py @@ -0,0 +1,47 @@ +""" +--- +title: Sovereign Thinking +description: Pauses the agent to perform deep reasoning on complex problems using Gemini 3.1 Pro. +conditions: + - Complex logic required + - High-stakes decision making + - Architecture or design tasks +--- +""" + +from agent.gemini_adapter import GeminiAdapter + +def think(problem: str, effort: str = "medium") -> str: + """ + Performs deep reasoning on a complex problem. + + Args: + problem: The complex problem or question to analyze. + effort: The reasoning effort ('low', 'medium', 'high', 'xhigh'). + """ + adapter = GeminiAdapter() + + budget_map = { + "low": 4000, + "medium": 16000, + "high": 32000, + "xhigh": 64000 + } + + budget = budget_map.get(effort, 16000) + + result = adapter.generate( + model="gemini-3.1-pro-preview", + prompt=problem, + system_instruction="You are the internal reasoning engine of the Hermes Agent. Think deeply and provide a structured analysis.", + thinking=True, + thinking_budget=budget + ) + + output = [] + if result.get("thoughts"): + output.append("### Internal Monologue\n" + result["thoughts"]) + + output.append("### Conclusion\n" + result["text"]) + + return "\n\n".join(output)