feat: add Sovereign Thinking skill
This commit is contained in:
47
skills/creative/sovereign_thinking.py
Normal file
47
skills/creative/sovereign_thinking.py
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user