Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 35s
Smoke Test / smoke (pull_request) Failing after 31s
Validate Config / YAML Lint (pull_request) Failing after 19s
Validate Config / JSON Validate (pull_request) Successful in 25s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 1m2s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Cron Syntax Check (pull_request) Successful in 15s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 14s
Validate Config / Shell Script Lint (pull_request) Failing after 1m8s
Validate Config / Playbook Schema Validation (pull_request) Successful in 26s
Architecture Lint / Lint Repository (pull_request) Failing after 26s
PR Checklist / pr-checklist (pull_request) Successful in 4m8s
Move 13 custom agent extension modules from local hermes-agent fork
into timmy-config's sidecar overlay as runtime patches. These files
are deployed into ~/.hermes/hermes-agent/agent/ by deploy.sh.
Files restructured:
- agent/conscience_mapping.py
- agent/evolution/{domain_distiller, self_correction_generator, world_modeler}.py
- agent/fallback_router.py
- agent/gemini_adapter.py
- agent/input_sanitizer.py
- agent/knowledge_ingester.py
- agent/meta_reasoning.py
- agent/nexus_architect.py
- agent/symbolic_memory.py
- agent/temporal_{knowledge_graph,reasoning}.py
This clears the way to reset hermes-agent to pure upstream.
Closes #339
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
"""Phase 3: Deep Knowledge Distillation from Google.
|
|
|
|
Performs deep dives into technical domains and distills them into
|
|
Timmy's Sovereign Knowledge Graph.
|
|
"""
|
|
|
|
import logging
|
|
import json
|
|
from typing import List, Dict, Any
|
|
from agent.gemini_adapter import GeminiAdapter
|
|
from agent.symbolic_memory import SymbolicMemory
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
class DomainDistiller:
|
|
def __init__(self):
|
|
self.adapter = GeminiAdapter()
|
|
self.symbolic = SymbolicMemory()
|
|
|
|
def distill_domain(self, domain: str):
|
|
"""Crawls and distills an entire technical domain."""
|
|
logger.info(f"Distilling domain: {domain}")
|
|
|
|
prompt = f"""
|
|
Please perform a deep knowledge distillation of the following domain: {domain}
|
|
|
|
Use Google Search to find foundational papers, recent developments, and key entities.
|
|
Synthesize this into a structured 'Domain Map' consisting of high-fidelity knowledge triples.
|
|
Focus on the structural relationships that define the domain.
|
|
|
|
Format: [{{"s": "subject", "p": "predicate", "o": "object"}}]
|
|
"""
|
|
result = self.adapter.generate(
|
|
model="gemini-3.1-pro-preview",
|
|
prompt=prompt,
|
|
system_instruction=f"You are Timmy's Domain Distiller. Your goal is to map the entire {domain} domain into a structured Knowledge Graph.",
|
|
grounding=True,
|
|
thinking=True,
|
|
response_mime_type="application/json"
|
|
)
|
|
|
|
triples = json.loads(result["text"])
|
|
count = self.symbolic.ingest_text(json.dumps(triples))
|
|
logger.info(f"Distilled {count} new triples for domain: {domain}")
|
|
return count
|