hyperagents 1.2.3rc5.post3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agents/__init__.py +31 -0
- agents/background_monitor.py +453 -0
- agents/learning.py +460 -0
- agents/planner.py +421 -0
- agents/transcriber.py +341 -0
- civilization/__init__.py +51 -0
- civilization/api/__init__.py +7 -0
- civilization/api/civilization_api.py +361 -0
- civilization/graph/__init__.py +19 -0
- civilization/graph/knowledge_linker.py +348 -0
- civilization/graph/org_graph.py +348 -0
- civilization/graph/process_graph.py +386 -0
- civilization/ingestion/__init__.py +20 -0
- civilization/ingestion/chunker.py +273 -0
- civilization/ingestion/document_ingestor.py +358 -0
- civilization/ingestion/embedder.py +262 -0
- civilization/ingestion/extractor.py +224 -0
- civilization/interview/__init__.py +19 -0
- civilization/interview/gap_detector.py +380 -0
- civilization/interview/interviewer.py +323 -0
- civilization/interview/questioner.py +363 -0
- civilization/retrieval/__init__.py +17 -0
- civilization/retrieval/civilization_rag.py +316 -0
- civilization/retrieval/context_injector.py +342 -0
- civilization/retrieval/relevance_ranker.py +287 -0
- civilization/schema.py +299 -0
- civilization/store.py +177 -0
- civilization/sync/__init__.py +16 -0
- civilization/sync/confluence_sync.py +317 -0
- civilization/sync/gdrive_sync.py +262 -0
- civilization/sync/notion_sync.py +237 -0
- civilization/versioning/__init__.py +19 -0
- civilization/versioning/diff_engine.py +351 -0
- civilization/versioning/staleness_detector.py +303 -0
- civilization/versioning/version_manager.py +293 -0
- cli/__init__.py +1 -0
- cli/doctor.py +334 -0
- cli/hyperclaw.py +1357 -0
- cli/onboarding.py +469 -0
- core/__init__.py +1 -0
- core/connectors/__init__.py +119 -0
- core/connectors/infrastructure.py +772 -0
- core/connectors/messaging.py +586 -0
- core/connectors/productivity.py +764 -0
- core/connectors/smarthome.py +528 -0
- core/connectors/social.py +730 -0
- core/hyperrouter/__init__.py +23 -0
- core/hyperrouter/bandit.py +218 -0
- core/hyperrouter/fast_loop.py +68 -0
- core/hyperrouter/slow_loop.py +143 -0
- core/hyperstate/__init__.py +24 -0
- core/hyperstate/certifier.py +154 -0
- core/hyperstate/schema.py +160 -0
- core/hyperstate/state_manager.py +103 -0
- core/hyperstate/store.py +163 -0
- core/providers/__init__.py +121 -0
- core/providers/embeddings.py +389 -0
- core/providers/image.py +534 -0
- core/providers/llm.py +1935 -0
- core/providers/search.py +608 -0
- core/providers/voice.py +474 -0
- hyperagents-1.2.3rc5.post3.dist-info/METADATA +469 -0
- hyperagents-1.2.3rc5.post3.dist-info/RECORD +361 -0
- hyperagents-1.2.3rc5.post3.dist-info/WHEEL +5 -0
- hyperagents-1.2.3rc5.post3.dist-info/entry_points.txt +6 -0
- hyperagents-1.2.3rc5.post3.dist-info/licenses/LICENSE +21 -0
- hyperagents-1.2.3rc5.post3.dist-info/top_level.txt +13 -0
- hyperclaw/__init__.py +67 -0
- hyperclaw/__main__.py +220 -0
- hyperclaw/agent.py +775 -0
- hyperclaw/agent_coordinator.py +577 -0
- hyperclaw/anthropic_params.py +225 -0
- hyperclaw/api_utils.py +85 -0
- hyperclaw/approval_telegram.py +209 -0
- hyperclaw/approval_terminal.py +80 -0
- hyperclaw/attachments.py +177 -0
- hyperclaw/branding.py +55 -0
- hyperclaw/brief/__init__.py +11 -0
- hyperclaw/brief/cli.py +204 -0
- hyperclaw/brief/collect.py +146 -0
- hyperclaw/brief/compose.py +333 -0
- hyperclaw/brief/diff.py +110 -0
- hyperclaw/brief/errors.py +99 -0
- hyperclaw/brief/google.py +269 -0
- hyperclaw/brief/google_auth.py +294 -0
- hyperclaw/brief/links.py +124 -0
- hyperclaw/brief/service.py +424 -0
- hyperclaw/brief/store.py +205 -0
- hyperclaw/brief/tasks.py +200 -0
- hyperclaw/chat_scope.py +115 -0
- hyperclaw/cli_tui.py +497 -0
- hyperclaw/client_guard.py +717 -0
- hyperclaw/connection_check.py +113 -0
- hyperclaw/cost_guard.py +1728 -0
- hyperclaw/default_config/agents.yaml +534 -0
- hyperclaw/default_config/hyperclaw.yaml +27 -0
- hyperclaw/default_config/models.yaml +161 -0
- hyperclaw/deployment.py +39 -0
- hyperclaw/digest/__init__.py +9 -0
- hyperclaw/digest/cli.py +117 -0
- hyperclaw/digest/errors.py +100 -0
- hyperclaw/digest/gitlab.py +187 -0
- hyperclaw/digest/http.py +113 -0
- hyperclaw/digest/redact.py +32 -0
- hyperclaw/digest/service.py +271 -0
- hyperclaw/digest/slack.py +223 -0
- hyperclaw/digest/state.py +124 -0
- hyperclaw/digest/summarize.py +198 -0
- hyperclaw/digest/tokens.py +143 -0
- hyperclaw/distribution.py +46 -0
- hyperclaw/documents.py +351 -0
- hyperclaw/feeds.py +339 -0
- hyperclaw/google_workspace/__init__.py +5 -0
- hyperclaw/google_workspace/api.py +151 -0
- hyperclaw/google_workspace/auth.py +397 -0
- hyperclaw/google_workspace/calendar.py +157 -0
- hyperclaw/google_workspace/cli.py +72 -0
- hyperclaw/google_workspace/drive.py +236 -0
- hyperclaw/google_workspace/errors.py +58 -0
- hyperclaw/google_workspace/gmail.py +295 -0
- hyperclaw/google_workspace/meet.py +122 -0
- hyperclaw/google_workspace/tools.py +319 -0
- hyperclaw/hyperspeed.py +57 -0
- hyperclaw/integrations_layer.py +1427 -0
- hyperclaw/live_state.py +188 -0
- hyperclaw/managed_config.py +245 -0
- hyperclaw/media_hub.py +179 -0
- hyperclaw/memory_manager.py +584 -0
- hyperclaw/model_catalog.py +551 -0
- hyperclaw/model_policy.py +211 -0
- hyperclaw/model_router.py +595 -0
- hyperclaw/model_selector.py +72 -0
- hyperclaw/naming.py +284 -0
- hyperclaw/notices.py +65 -0
- hyperclaw/oai_stream.py +106 -0
- hyperclaw/orchestrator.py +591 -0
- hyperclaw/outbox.py +82 -0
- hyperclaw/persona.py +367 -0
- hyperclaw/prometheus.py +219 -0
- hyperclaw/prompt_assembly.py +157 -0
- hyperclaw/provider_setup.py +146 -0
- hyperclaw/providers.py +340 -0
- hyperclaw/qualification.py +341 -0
- hyperclaw/qualification_keys/hyper-d292fd127cef5a3e.pub +1 -0
- hyperclaw/qualification_records/anthropic--claude-sonnet-5-5.json +14 -0
- hyperclaw/reasoning_display.py +35 -0
- hyperclaw/scheduler.py +454 -0
- hyperclaw/server.py +847 -0
- hyperclaw/setup.py +627 -0
- hyperclaw/skills.py +717 -0
- hyperclaw/solomon.py +442 -0
- hyperclaw/swarm.py +533 -0
- hyperclaw/taint.py +832 -0
- hyperclaw/team/__init__.py +28 -0
- hyperclaw/team/dispatcher.py +431 -0
- hyperclaw/team/genesis.py +106 -0
- hyperclaw/team/lead.py +110 -0
- hyperclaw/team/model.py +135 -0
- hyperclaw/team/morning.py +238 -0
- hyperclaw/team/repos.py +66 -0
- hyperclaw/team/roster.py +264 -0
- hyperclaw/team/specialist.py +235 -0
- hyperclaw/team/status.py +163 -0
- hyperclaw/team/watchers.py +112 -0
- hyperclaw/teamsetup/__init__.py +17 -0
- hyperclaw/teamsetup/checks.py +208 -0
- hyperclaw/teamsetup/item.py +391 -0
- hyperclaw/teamsetup/oauth_loopback.py +84 -0
- hyperclaw/teamsetup/onboard.py +550 -0
- hyperclaw/teamsetup/profile.py +82 -0
- hyperclaw/teamsetup/secrets.py +313 -0
- hyperclaw/teamsetup/selfcheck.py +295 -0
- hyperclaw/teamsetup/service.py +495 -0
- hyperclaw/teamsetup/slack_oauth.py +442 -0
- hyperclaw/teamsetup/tty.py +62 -0
- hyperclaw/telegram_bot.py +1106 -0
- hyperclaw/telegram_intake.py +126 -0
- hyperclaw/telegram_pairing.py +360 -0
- hyperclaw/terminal_provider.py +323 -0
- hyperclaw/tools/__init__.py +1 -0
- hyperclaw/tools/approval.py +949 -0
- hyperclaw/tools/args.py +212 -0
- hyperclaw/tools/catalog.py +244 -0
- hyperclaw/tools/classify.py +266 -0
- hyperclaw/tools/effects.py +724 -0
- hyperclaw/tools/egress.py +210 -0
- hyperclaw/tools/envelope.py +188 -0
- hyperclaw/tools/guard.py +367 -0
- hyperclaw/tools/ledger.py +339 -0
- hyperclaw/tools/receipts.py +70 -0
- hyperclaw/tools/registry.py +318 -0
- hyperclaw/tools/service_guard.py +151 -0
- hyperclaw/tools/surfaces.py +54 -0
- hyperclaw/tools/workspace.py +87 -0
- hyperclaw/trading/__init__.py +77 -0
- hyperclaw/truth_guard.py +791 -0
- hyperclaw/tts.py +124 -0
- hyperclaw/tui.py +4255 -0
- hyperclaw/tui_bridge.py +938 -0
- hyperclaw/unattended.py +60 -0
- hyperclaw/updates/__init__.py +54 -0
- hyperclaw/updates/check.py +131 -0
- hyperclaw/updates/index.py +178 -0
- hyperclaw/updates/install.py +110 -0
- hyperclaw/updates/managed.py +161 -0
- hyperclaw/updates/manifest.py +138 -0
- hyperclaw/updates/notices.py +86 -0
- hyperclaw/updates/paths.py +53 -0
- hyperclaw/updates/release.py +146 -0
- hyperclaw/updates/upgrade.py +253 -0
- hyperclaw/updates/versioning.py +104 -0
- hyperclaw/userconfig.py +119 -0
- hyperclaw/xai.py +83 -0
- integrations/__init__.py +31 -0
- integrations/automation/__init__.py +1 -0
- integrations/automation/make.py +87 -0
- integrations/automation/zapier.py +87 -0
- integrations/base.py +476 -0
- integrations/communication/__init__.py +1 -0
- integrations/communication/twilio.py +279 -0
- integrations/communication/zoom.py +290 -0
- integrations/data/__init__.py +1 -0
- integrations/data/google_analytics.py +135 -0
- integrations/data/postgres.py +182 -0
- integrations/data/supabase_connector.py +202 -0
- integrations/data/weather_feeds.py +450 -0
- integrations/developer/__init__.py +9 -0
- integrations/developer/github.py +406 -0
- integrations/developer/gitlab.py +298 -0
- integrations/enterprise/__init__.py +13 -0
- integrations/enterprise/confluence.py +266 -0
- integrations/enterprise/hubspot.py +293 -0
- integrations/enterprise/jira.py +314 -0
- integrations/enterprise/salesforce.py +286 -0
- integrations/finance/__init__.py +1 -0
- integrations/finance/polymarket_client.py +247 -0
- integrations/finance/quickbooks.py +281 -0
- integrations/finance/stripe.py +261 -0
- integrations/gateway.py +238 -0
- integrations/messaging/__init__.py +32 -0
- integrations/messaging/discord.py +159 -0
- integrations/messaging/email.py +401 -0
- integrations/messaging/imessage.py +443 -0
- integrations/messaging/signal.py +175 -0
- integrations/messaging/slack.py +217 -0
- integrations/messaging/sms.py +175 -0
- integrations/messaging/teams.py +208 -0
- integrations/messaging/telegram.py +260 -0
- integrations/messaging/whatsapp.py +203 -0
- integrations/productivity/__init__.py +17 -0
- integrations/productivity/airtable.py +217 -0
- integrations/productivity/asana.py +248 -0
- integrations/productivity/google/__init__.py +19 -0
- integrations/productivity/google/base.py +89 -0
- integrations/productivity/google/calendar.py +272 -0
- integrations/productivity/google/docs.py +202 -0
- integrations/productivity/google/drive.py +268 -0
- integrations/productivity/google/gmail.py +279 -0
- integrations/productivity/google/meet.py +218 -0
- integrations/productivity/google/sheets.py +222 -0
- integrations/productivity/google/tasks.py +199 -0
- integrations/productivity/linear.py +279 -0
- integrations/productivity/microsoft/__init__.py +13 -0
- integrations/productivity/microsoft/base.py +93 -0
- integrations/productivity/microsoft/calendar.py +207 -0
- integrations/productivity/microsoft/onedrive.py +222 -0
- integrations/productivity/microsoft/outlook.py +241 -0
- integrations/productivity/microsoft/sharepoint.py +211 -0
- integrations/productivity/notion.py +243 -0
- integrations/productivity/todoist.py +250 -0
- integrations/productivity/trello.py +244 -0
- integrations/storage/__init__.py +1 -0
- integrations/storage/box.py +279 -0
- integrations/storage/dropbox.py +215 -0
- integrations/telegram_inbound.py +179 -0
- integrations/telegram_poller.py +151 -0
- memory/__init__.py +1 -0
- memory/causal_graph.py +125 -0
- memory/impact_tracker.py +88 -0
- memory/vector_memory.py +436 -0
- models/__init__.py +12 -0
- models/chatjimmy_client.py +210 -0
- models/claude_client.py +235 -0
- models/claude_code_subagent.py +192 -0
- models/openai_client.py +120 -0
- models/router.py +162 -0
- recursive/discovery_loop.py +118 -0
- recursive/optimization_loop.py +135 -0
- recursive/validation_loop.py +38 -0
- security/__init__.py +1 -0
- security/audit_logger.py +106 -0
- security/filesystem_guard.py +100 -0
- security/hypershield.py +99 -0
- security/network_guard.py +97 -0
- security/policy_engine.py +198 -0
- swarm/__init__.py +1 -0
- swarm/agents/__init__.py +0 -0
- swarm/agents/base.py +230 -0
- swarm/agents/business/__init__.py +0 -0
- swarm/agents/business/counsel.py +31 -0
- swarm/agents/business/herald.py +32 -0
- swarm/agents/business/ledger.py +26 -0
- swarm/agents/business/nexus.py +30 -0
- swarm/agents/business/ops.py +30 -0
- swarm/agents/business/pipeline.py +28 -0
- swarm/agents/business/revenue.py +30 -0
- swarm/agents/business/sovereign.py +31 -0
- swarm/agents/business/strategos.py +27 -0
- swarm/agents/business/talent.py +27 -0
- swarm/agents/business/venture.py +32 -0
- swarm/agents/comms/__init__.py +1 -0
- swarm/agents/comms/cipher.py +32 -0
- swarm/agents/comms/echo_comms.py +31 -0
- swarm/agents/comms/envoy.py +31 -0
- swarm/agents/comms/herald_scheduler.py +33 -0
- swarm/agents/comms/pulse.py +29 -0
- swarm/agents/creative/__init__.py +0 -0
- swarm/agents/creative/author.py +27 -0
- swarm/agents/creative/lens.py +25 -0
- swarm/agents/executive/__init__.py +1 -0
- swarm/agents/intelligence/__init__.py +1 -0
- swarm/agents/intelligence/arbiter.py +30 -0
- swarm/agents/intelligence/sentinel.py +30 -0
- swarm/agents/media/__init__.py +0 -0
- swarm/agents/personal/__init__.py +0 -0
- swarm/agents/personal/atlas.py +27 -0
- swarm/agents/personal/hearth.py +26 -0
- swarm/agents/personal/midas.py +27 -0
- swarm/agents/personal/navigator.py +27 -0
- swarm/agents/personal/nourish.py +31 -0
- swarm/agents/personal/vitals.py +33 -0
- swarm/agents/recursive/__init__.py +0 -0
- swarm/agents/recursive/alchemist.py +73 -0
- swarm/agents/recursive/calibrator.py +45 -0
- swarm/agents/recursive/scout.py +97 -0
- swarm/agents/scientific/__init__.py +0 -0
- swarm/agents/scientific/cosmos.py +36 -0
- swarm/agents/scientific/gaia.py +26 -0
- swarm/agents/scientific/medicus.py +33 -0
- swarm/agents/scientific/oracle_agent.py +39 -0
- swarm/agents/scientific/scribe.py +39 -0
- swarm/agents/talent/__init__.py +0 -0
- swarm/agents/talent/deal.py +28 -0
- swarm/agents/talent/roster.py +29 -0
- swarm/agents/talent/scout.py +29 -0
- swarm/agents/talent/stage.py +27 -0
- swarm/agents/tech/__init__.py +0 -0
- swarm/agents/tech/aegis.py +28 -0
- swarm/agents/tech/bridge.py +28 -0
- swarm/agents/tech/forge.py +28 -0
- swarm/agents/trading/__init__.py +1 -0
- swarm/agents/trading/global_prediction_engine.py +611 -0
- swarm/agents/trading/polymarket_trader.py +165 -0
- swarm/agents/trading/prediction_strategist.py +218 -0
- swarm/autogen_bridge.py +68 -0
- swarm/bid_protocol.py +196 -0
- swarm/dispatcher.py +527 -0
- swarm/nexus.py +181 -0
- swarm/registry.py +112 -0
- telegram_listener.py +403 -0
- ui/tui/app.py +214 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""HEARTH — Home Management. Maintenance scheduling, vendor coordination."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class HearthAgent(BaseAgent):
|
|
8
|
+
agent_id = "HEARTH"
|
|
9
|
+
domain = "personal"
|
|
10
|
+
description = "Home Management — maintenance scheduling, vendor coordination"
|
|
11
|
+
supported_task_types = ["planning", "scheduling", "quick_lookup"]
|
|
12
|
+
preferred_model = "chatjimmy"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
system = (
|
|
16
|
+
"You are HEARTH, a home management AI. You schedule maintenance tasks, "
|
|
17
|
+
"coordinate vendors, and keep home operations running smoothly."
|
|
18
|
+
)
|
|
19
|
+
result = await self.model_router.call(
|
|
20
|
+
task_type="quick_lookup",
|
|
21
|
+
messages=[{"role": "user", "content": task}],
|
|
22
|
+
system=system,
|
|
23
|
+
state=state,
|
|
24
|
+
)
|
|
25
|
+
await self.log_completion(state, result, "chatjimmy", bool(result))
|
|
26
|
+
return result
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""MIDAS — Personal Finance. Budget analysis, expense tracking, investment monitoring."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class MidasAgent(BaseAgent):
|
|
8
|
+
agent_id = "MIDAS"
|
|
9
|
+
domain = "personal"
|
|
10
|
+
description = "Personal Finance — budgets, expenses, investment monitoring"
|
|
11
|
+
supported_task_types = ["analysis", "finance", "planning"]
|
|
12
|
+
preferred_model = "claude-sonnet-4-6"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
system = (
|
|
16
|
+
"You are MIDAS, a personal finance AI. You analyze budgets, categorize expenses, "
|
|
17
|
+
"and monitor investments. All financial data is handled with strict privacy. "
|
|
18
|
+
"Provide clear, actionable financial insights."
|
|
19
|
+
)
|
|
20
|
+
result = await self.model_router.call(
|
|
21
|
+
task_type="finance",
|
|
22
|
+
messages=[{"role": "user", "content": task}],
|
|
23
|
+
system=system,
|
|
24
|
+
state=state,
|
|
25
|
+
)
|
|
26
|
+
await self.log_completion(state, result, "claude-sonnet-4-6", bool(result))
|
|
27
|
+
return result
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""NAVIGATOR — Travel & Logistics. Itineraries, routing, logistics coordination."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class NavigatorAgent(BaseAgent):
|
|
8
|
+
agent_id = "NAVIGATOR"
|
|
9
|
+
domain = "personal"
|
|
10
|
+
description = "Travel & Logistics — itineraries, routing, logistics coordination"
|
|
11
|
+
supported_task_types = ["planning", "research", "synthesis"]
|
|
12
|
+
preferred_model = "chatjimmy"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
needs_itinerary = any(w in task.lower() for w in ["itinerary", "trip", "plan", "route"])
|
|
16
|
+
system = (
|
|
17
|
+
"You are NAVIGATOR, a travel and logistics AI. You create detailed travel itineraries, "
|
|
18
|
+
"optimize routes, and coordinate complex logistics."
|
|
19
|
+
)
|
|
20
|
+
result = await self.model_router.call(
|
|
21
|
+
task_type="planning",
|
|
22
|
+
messages=[{"role": "user", "content": task}],
|
|
23
|
+
system=system,
|
|
24
|
+
state=state,
|
|
25
|
+
)
|
|
26
|
+
await self.log_completion(state, result, "claude-sonnet-4-6" if needs_itinerary else "chatjimmy", bool(result))
|
|
27
|
+
return result
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""NOURISH — Nutrition & Fitness. Meal planning, workout programming, sleep optimization."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class NourishAgent(BaseAgent):
|
|
8
|
+
agent_id = "NOURISH"
|
|
9
|
+
domain = "personal"
|
|
10
|
+
description = "Nutrition & Fitness — meal planning, workouts, sleep optimization"
|
|
11
|
+
supported_task_types = ["health", "planning", "research"]
|
|
12
|
+
preferred_model = "chatjimmy"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
# ChatJimmy for quick lookups; escalate to Claude for detailed plans
|
|
16
|
+
task_lower = task.lower()
|
|
17
|
+
needs_detail = any(w in task_lower for w in ["plan", "program", "optimize", "create", "design"])
|
|
18
|
+
model = "claude-sonnet-4-6" if needs_detail else "chatjimmy"
|
|
19
|
+
|
|
20
|
+
system = (
|
|
21
|
+
"You are NOURISH, a nutrition and fitness AI. You design personalized meal plans, "
|
|
22
|
+
"workout programs, and sleep optimization strategies based on individual goals."
|
|
23
|
+
)
|
|
24
|
+
result = await self.model_router.call(
|
|
25
|
+
task_type="health",
|
|
26
|
+
messages=[{"role": "user", "content": task}],
|
|
27
|
+
system=system,
|
|
28
|
+
state=state,
|
|
29
|
+
)
|
|
30
|
+
await self.log_completion(state, result, model, bool(result))
|
|
31
|
+
return result
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""VITALS — Health & Wellness. Symptom tracking, medication reminders, wellness optimization."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
MEDICAL_DISCLAIMER = (
|
|
7
|
+
"\n\n---\n⚕️ **Not a substitute for professional medical advice.** "
|
|
8
|
+
"Always consult a qualified healthcare provider for medical decisions."
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VitalsAgent(BaseAgent):
|
|
13
|
+
agent_id = "VITALS"
|
|
14
|
+
domain = "personal"
|
|
15
|
+
description = "Health & Wellness — symptom tracking, medication reminders, wellness"
|
|
16
|
+
supported_task_types = ["health", "analysis", "planning"]
|
|
17
|
+
preferred_model = "claude-sonnet-4-6"
|
|
18
|
+
|
|
19
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
20
|
+
system = (
|
|
21
|
+
"You are VITALS, a health and wellness AI. You track symptoms, remind about "
|
|
22
|
+
"medications, and optimize wellness routines. Always be careful and accurate "
|
|
23
|
+
"with health information."
|
|
24
|
+
)
|
|
25
|
+
result = await self.model_router.call(
|
|
26
|
+
task_type="health",
|
|
27
|
+
messages=[{"role": "user", "content": task}],
|
|
28
|
+
system=system,
|
|
29
|
+
state=state,
|
|
30
|
+
)
|
|
31
|
+
result += MEDICAL_DISCLAIMER
|
|
32
|
+
await self.log_completion(state, result, "claude-sonnet-4-6", bool(result))
|
|
33
|
+
return result
|
|
File without changes
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""ALCHEMIST — Skill Integration. Validates discoveries, implements skills via ClaudeCodeSubagent."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import logging
|
|
5
|
+
from swarm.agents.base import BaseAgent
|
|
6
|
+
from swarm.agents.recursive.scout import Discovery
|
|
7
|
+
from core.hyperstate.schema import HyperState
|
|
8
|
+
|
|
9
|
+
log = logging.getLogger("hyperclaw.agent.ALCHEMIST")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AlchemistAgent(BaseAgent):
|
|
13
|
+
agent_id = "ALCHEMIST"
|
|
14
|
+
domain = "recursive"
|
|
15
|
+
description = "Skill Integration — validates discoveries, implements and certifies new skills"
|
|
16
|
+
supported_task_types = ["code", "research", "analysis"]
|
|
17
|
+
preferred_model = "claude-sonnet-4-6"
|
|
18
|
+
|
|
19
|
+
async def validate(self, discovery: dict) -> bool:
|
|
20
|
+
"""Validate a discovery — check if it's actionable and relevant enough to implement."""
|
|
21
|
+
relevance = discovery.get("relevance_score", 0.0)
|
|
22
|
+
actionable = discovery.get("actionable", False)
|
|
23
|
+
return actionable and relevance >= 0.6
|
|
24
|
+
|
|
25
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
26
|
+
discoveries = context.get("discoveries", [])
|
|
27
|
+
validated_count = 0
|
|
28
|
+
skill_count = 0
|
|
29
|
+
|
|
30
|
+
for d in discoveries:
|
|
31
|
+
d_dict = d if isinstance(d, dict) else d.__dict__
|
|
32
|
+
if not await self.validate(d_dict):
|
|
33
|
+
continue
|
|
34
|
+
validated_count += 1
|
|
35
|
+
|
|
36
|
+
# Implement via ClaudeCodeSubagent
|
|
37
|
+
try:
|
|
38
|
+
from models.claude_code_subagent import ClaudeCodeSubagent
|
|
39
|
+
from models.claude_client import ClaudeClient
|
|
40
|
+
from core.hyperstate.certifier import Certifier
|
|
41
|
+
import os
|
|
42
|
+
|
|
43
|
+
client = ClaudeClient(api_key=os.environ.get("ANTHROPIC_API_KEY", ""))
|
|
44
|
+
subagent = ClaudeCodeSubagent(client)
|
|
45
|
+
implementation_task = (
|
|
46
|
+
f"Implement a Python utility based on this discovery:\n"
|
|
47
|
+
f"Title: {d_dict.get('title', 'Unknown')}\n"
|
|
48
|
+
f"Summary: {d_dict.get('summary', 'No summary')}\n"
|
|
49
|
+
f"Write a concrete, runnable Python function with assertions to test it."
|
|
50
|
+
)
|
|
51
|
+
result = await subagent.run(implementation_task, context="HyperClaw skill integration")
|
|
52
|
+
|
|
53
|
+
if result.success:
|
|
54
|
+
# Write skill node to CausalGraph
|
|
55
|
+
import uuid
|
|
56
|
+
skill_node_id = await self.causal_graph.add_node(
|
|
57
|
+
label=f"skill: {d_dict.get('title', 'unknown')}",
|
|
58
|
+
node_type="skill",
|
|
59
|
+
domain=d_dict.get("domain", "recursive"),
|
|
60
|
+
metadata={
|
|
61
|
+
"source_discovery": d_dict.get("source_name", ""),
|
|
62
|
+
"code_length": len(result.code),
|
|
63
|
+
"iterations": result.iterations,
|
|
64
|
+
},
|
|
65
|
+
)
|
|
66
|
+
skill_count += 1
|
|
67
|
+
log.info(f"ALCHEMIST: skill certified — node={skill_node_id}")
|
|
68
|
+
except Exception as e:
|
|
69
|
+
log.warning(f"ALCHEMIST: skill integration failed for discovery: {e}")
|
|
70
|
+
|
|
71
|
+
result_str = f"ALCHEMIST: validated={validated_count}, skills_added={skill_count}"
|
|
72
|
+
await self.log_completion(state, result_str, "claude-sonnet-4-6", True)
|
|
73
|
+
return result_str
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""CALIBRATOR — Performance Optimization. Analyzes routing efficiency, proposes optimizations."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from swarm.agents.base import BaseAgent
|
|
5
|
+
from core.hyperstate.schema import HyperState
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CalibratorAgent(BaseAgent):
|
|
9
|
+
agent_id = "CALIBRATOR"
|
|
10
|
+
domain = "recursive"
|
|
11
|
+
description = "Performance Optimization — routing analysis, efficiency improvements"
|
|
12
|
+
supported_task_types = ["analysis", "routing"]
|
|
13
|
+
preferred_model = "chatjimmy"
|
|
14
|
+
|
|
15
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
16
|
+
# Analyze model_scores to identify inefficiencies
|
|
17
|
+
inefficiencies = []
|
|
18
|
+
for model_id, task_scores in state.model_scores.items():
|
|
19
|
+
for task_type, score in task_scores.items():
|
|
20
|
+
if score.attempts >= 5:
|
|
21
|
+
win_rate = score.successes / score.attempts
|
|
22
|
+
if win_rate < 0.5:
|
|
23
|
+
inefficiencies.append(
|
|
24
|
+
f"{model_id} on {task_type}: {win_rate:.0%} win rate ({score.attempts} attempts)"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
if inefficiencies:
|
|
28
|
+
report = "CALIBRATOR optimization report:\n" + "\n".join(f"- {i}" for i in inefficiencies)
|
|
29
|
+
report += "\n\nRecommendation: Route these task types to higher-performing models."
|
|
30
|
+
else:
|
|
31
|
+
report = "CALIBRATOR: No significant routing inefficiencies detected. System operating optimally."
|
|
32
|
+
|
|
33
|
+
# Write optimization report to HyperState
|
|
34
|
+
from core.hyperstate.schema import ExperimentEntry
|
|
35
|
+
state.experiment_log.append(ExperimentEntry(
|
|
36
|
+
method="calibrator_optimization_report",
|
|
37
|
+
model_used="chatjimmy",
|
|
38
|
+
result=report[:500],
|
|
39
|
+
certified=False,
|
|
40
|
+
test_trace="",
|
|
41
|
+
))
|
|
42
|
+
state._bump_version()
|
|
43
|
+
|
|
44
|
+
await self.log_completion(state, report, "chatjimmy", True)
|
|
45
|
+
return report
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"""SCOUT — Capability Research. Monitors arXiv, GitHub, PubMed for actionable discoveries."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import asyncio
|
|
5
|
+
import uuid
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
|
+
from datetime import datetime, timezone
|
|
8
|
+
from uuid import UUID
|
|
9
|
+
|
|
10
|
+
from swarm.agents.base import BaseAgent
|
|
11
|
+
from core.hyperstate.schema import HyperState
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class Discovery:
|
|
16
|
+
discovery_id: UUID = field(default_factory=uuid.uuid4)
|
|
17
|
+
source_name: str = ""
|
|
18
|
+
title: str = ""
|
|
19
|
+
url: str = ""
|
|
20
|
+
summary: str = ""
|
|
21
|
+
domain: str = "scientific"
|
|
22
|
+
relevance_score: float = 0.0
|
|
23
|
+
actionable: bool = False
|
|
24
|
+
validated: bool = False
|
|
25
|
+
added_to_knowledge_graph: bool = False
|
|
26
|
+
discovered_at: datetime = field(default_factory=lambda: datetime.now(timezone.utc))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
SOURCES = [
|
|
30
|
+
{"name": "arxiv-cs-ai", "domain": "recursive", "url": "https://arxiv.org/list/cs.AI/recent"},
|
|
31
|
+
{"name": "arxiv-q-bio", "domain": "scientific", "url": "https://arxiv.org/list/q-bio/recent"},
|
|
32
|
+
{"name": "arxiv-astro-ph", "domain": "scientific", "url": "https://arxiv.org/list/astro-ph/recent"},
|
|
33
|
+
{"name": "github-trending-python", "domain": "recursive", "url": "https://github.com/trending/python"},
|
|
34
|
+
{"name": "pubmed-ai-health", "domain": "scientific", "url": "https://pubmed.ncbi.nlm.nih.gov/?term=artificial+intelligence+healthcare"},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ScoutAgent(BaseAgent):
|
|
39
|
+
agent_id = "SCOUT"
|
|
40
|
+
domain = "recursive"
|
|
41
|
+
description = "Capability Research — monitors arXiv, GitHub, PubMed for actionable discoveries"
|
|
42
|
+
supported_task_types = ["research", "quick_lookup", "summarization"]
|
|
43
|
+
preferred_model = "chatjimmy"
|
|
44
|
+
|
|
45
|
+
async def sweep(self, domains: list[str]) -> list[Discovery]:
|
|
46
|
+
"""Parallel poll of all sources within the given domains."""
|
|
47
|
+
tasks = [self._poll_source(src) for src in SOURCES if src["domain"] in domains]
|
|
48
|
+
results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
49
|
+
discoveries: list[Discovery] = []
|
|
50
|
+
for r in results:
|
|
51
|
+
if isinstance(r, list):
|
|
52
|
+
discoveries.extend(r)
|
|
53
|
+
return discoveries
|
|
54
|
+
|
|
55
|
+
async def _poll_source(self, source: dict) -> list[Discovery]:
|
|
56
|
+
"""Poll a single source. Returns a synthetic discovery for now (no live web calls)."""
|
|
57
|
+
# In production: httpx GET → parse → triage with ChatJimmy → escalate to Claude if relevance > 0.6
|
|
58
|
+
# Stub: return a synthetic discovery for testability
|
|
59
|
+
return [
|
|
60
|
+
Discovery(
|
|
61
|
+
source_name=source["name"],
|
|
62
|
+
title=f"[{source['name']}] Recent advances in AI",
|
|
63
|
+
url=source["url"],
|
|
64
|
+
summary=f"Synthetic discovery from {source['name']} — awaiting live feed integration.",
|
|
65
|
+
domain=source["domain"],
|
|
66
|
+
relevance_score=0.7,
|
|
67
|
+
actionable=True,
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
72
|
+
domains = context.get("domains", ["scientific", "recursive"])
|
|
73
|
+
discoveries = await self.sweep(domains)
|
|
74
|
+
summary = f"SCOUT found {len(discoveries)} discoveries:\n"
|
|
75
|
+
for d in discoveries:
|
|
76
|
+
summary += f"- [{d.source_name}] {d.title} (relevance={d.relevance_score:.2f})\n"
|
|
77
|
+
|
|
78
|
+
# Write to HyperMemory
|
|
79
|
+
for d in discoveries:
|
|
80
|
+
try:
|
|
81
|
+
await self.causal_graph.add_node(
|
|
82
|
+
label=d.title,
|
|
83
|
+
node_type="discovery",
|
|
84
|
+
domain=d.domain,
|
|
85
|
+
metadata={
|
|
86
|
+
"source": d.source_name,
|
|
87
|
+
"url": d.url,
|
|
88
|
+
"relevance_score": d.relevance_score,
|
|
89
|
+
"discovery_id": str(d.discovery_id),
|
|
90
|
+
},
|
|
91
|
+
)
|
|
92
|
+
d.added_to_knowledge_graph = True
|
|
93
|
+
except Exception:
|
|
94
|
+
pass
|
|
95
|
+
|
|
96
|
+
await self.log_completion(state, summary, "chatjimmy", True)
|
|
97
|
+
return summary
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""COSMOS — Space & Astronomy. Orbital calculations, data processing, astronomical analysis."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CosmosAgent(BaseAgent):
|
|
8
|
+
agent_id = "COSMOS"
|
|
9
|
+
domain = "scientific"
|
|
10
|
+
description = "Space & Astronomy — orbital calculations, astronomical analysis, data processing"
|
|
11
|
+
supported_task_types = ["research", "analysis", "scientific", "code"]
|
|
12
|
+
preferred_model = "claude-sonnet-4-6"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
needs_code = any(w in task.lower() for w in ["calculate", "compute", "script", "code", "orbital"])
|
|
16
|
+
system = (
|
|
17
|
+
"You are COSMOS, a space and astronomy AI. You analyze astronomical data, "
|
|
18
|
+
"perform orbital mechanics calculations, and process space mission data."
|
|
19
|
+
)
|
|
20
|
+
if needs_code:
|
|
21
|
+
from models.claude_code_subagent import ClaudeCodeSubagent
|
|
22
|
+
from models.claude_client import ClaudeClient
|
|
23
|
+
import os
|
|
24
|
+
client = ClaudeClient(api_key=os.environ.get("ANTHROPIC_API_KEY", ""))
|
|
25
|
+
subagent = ClaudeCodeSubagent(client)
|
|
26
|
+
result_obj = await subagent.run(task, context=system)
|
|
27
|
+
result = result_obj.code if result_obj.success else f"[COSMOS] Code generation failed: {result_obj.error}"
|
|
28
|
+
else:
|
|
29
|
+
result = await self.model_router.call(
|
|
30
|
+
task_type="scientific",
|
|
31
|
+
messages=[{"role": "user", "content": task}],
|
|
32
|
+
system=system,
|
|
33
|
+
state=state,
|
|
34
|
+
)
|
|
35
|
+
await self.log_completion(state, result, "claude-sonnet-4-6", bool(result))
|
|
36
|
+
return result
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""GAIA — Climate & Environment. Emissions modeling, climate data, sustainability."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class GaiaAgent(BaseAgent):
|
|
8
|
+
agent_id = "GAIA"
|
|
9
|
+
domain = "scientific"
|
|
10
|
+
description = "Climate & Environment — emissions modeling, sustainability reporting"
|
|
11
|
+
supported_task_types = ["research", "analysis", "scientific"]
|
|
12
|
+
preferred_model = "claude-sonnet-4-6"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
system = (
|
|
16
|
+
"You are GAIA, a climate and environmental AI. You model emissions, analyze climate data, "
|
|
17
|
+
"and produce sustainability reports grounded in scientific consensus."
|
|
18
|
+
)
|
|
19
|
+
result = await self.model_router.call(
|
|
20
|
+
task_type="scientific",
|
|
21
|
+
messages=[{"role": "user", "content": task}],
|
|
22
|
+
system=system,
|
|
23
|
+
state=state,
|
|
24
|
+
)
|
|
25
|
+
await self.log_completion(state, result, "claude-sonnet-4-6", bool(result))
|
|
26
|
+
return result
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""MEDICUS — Healthcare & Biology. Literature synthesis, clinical data, genomics."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
MEDICAL_DISCLAIMER = (
|
|
7
|
+
"\n\n---\n⚕️ **Medical disclaimer:** This information is for research purposes only "
|
|
8
|
+
"and is not a substitute for professional medical advice, diagnosis, or treatment."
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MedicusAgent(BaseAgent):
|
|
13
|
+
agent_id = "MEDICUS"
|
|
14
|
+
domain = "scientific"
|
|
15
|
+
description = "Healthcare & Biology — literature synthesis, clinical data, genomics"
|
|
16
|
+
supported_task_types = ["research", "analysis", "scientific", "health"]
|
|
17
|
+
preferred_model = "claude-sonnet-4-6"
|
|
18
|
+
|
|
19
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
20
|
+
system = (
|
|
21
|
+
"You are MEDICUS, a healthcare and biomedical research AI. You synthesize medical literature, "
|
|
22
|
+
"analyze clinical data, assess drug interactions, and interpret genomic information. "
|
|
23
|
+
"Be rigorous, cite evidence levels, and flag uncertainty."
|
|
24
|
+
)
|
|
25
|
+
result = await self.model_router.call(
|
|
26
|
+
task_type="research",
|
|
27
|
+
messages=[{"role": "user", "content": task}],
|
|
28
|
+
system=system,
|
|
29
|
+
state=state,
|
|
30
|
+
)
|
|
31
|
+
result += MEDICAL_DISCLAIMER
|
|
32
|
+
await self.log_completion(state, result, "claude-sonnet-4-6", bool(result))
|
|
33
|
+
return result
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""ORACLE — Quantitative Analysis. Statistical modeling, data analysis scripts, finance."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class OracleAgent(BaseAgent):
|
|
8
|
+
agent_id = "ORACLE"
|
|
9
|
+
domain = "scientific"
|
|
10
|
+
description = "Quantitative Analysis — statistical modeling, data analysis, code certification"
|
|
11
|
+
supported_task_types = ["analysis", "code", "scientific", "finance"]
|
|
12
|
+
preferred_model = "claude-sonnet-4-6"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
needs_code = any(w in task.lower() for w in ["model", "script", "code", "compute", "calculate", "analyze data"])
|
|
16
|
+
if needs_code:
|
|
17
|
+
from models.claude_code_subagent import ClaudeCodeSubagent
|
|
18
|
+
from models.claude_client import ClaudeClient
|
|
19
|
+
import os
|
|
20
|
+
client = ClaudeClient(api_key=os.environ.get("ANTHROPIC_API_KEY", ""))
|
|
21
|
+
subagent = ClaudeCodeSubagent(client)
|
|
22
|
+
result_obj = await subagent.run(task, context="Statistical analysis and data science task.")
|
|
23
|
+
if result_obj.success:
|
|
24
|
+
result = f"[ORACLE] Certified analysis:\n```python\n{result_obj.code}\n```\nOutput:\n{result_obj.test_trace}"
|
|
25
|
+
else:
|
|
26
|
+
result = f"[ORACLE] Analysis failed after {result_obj.iterations} iterations: {result_obj.error}"
|
|
27
|
+
else:
|
|
28
|
+
system = (
|
|
29
|
+
"You are ORACLE, a quantitative analysis AI. You build statistical models, "
|
|
30
|
+
"analyze datasets, and derive insights through rigorous mathematical methods."
|
|
31
|
+
)
|
|
32
|
+
result = await self.model_router.call(
|
|
33
|
+
task_type="analysis",
|
|
34
|
+
messages=[{"role": "user", "content": task}],
|
|
35
|
+
system=system,
|
|
36
|
+
state=state,
|
|
37
|
+
)
|
|
38
|
+
await self.log_completion(state, result, "claude-sonnet-4-6", bool(result))
|
|
39
|
+
return result
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""SCRIBE — Research Synthesis. Fast first-pass triage, deep synthesis on high-relevance material."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ScribeAgent(BaseAgent):
|
|
8
|
+
agent_id = "SCRIBE"
|
|
9
|
+
domain = "scientific"
|
|
10
|
+
description = "Research Synthesis — literature triage and deep synthesis"
|
|
11
|
+
supported_task_types = ["research", "synthesis", "summarization"]
|
|
12
|
+
preferred_model = "chatjimmy"
|
|
13
|
+
|
|
14
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
15
|
+
# ChatJimmy for first-pass triage; Claude for deep synthesis
|
|
16
|
+
needs_deep = any(w in task.lower() for w in ["synthesize", "analyze", "compare", "integrate"])
|
|
17
|
+
system_cj = "You are SCRIBE. Quickly summarize the key points of the following research material."
|
|
18
|
+
system_claude = (
|
|
19
|
+
"You are SCRIBE, a research synthesis AI. You integrate findings across multiple sources, "
|
|
20
|
+
"identify contradictions, and produce authoritative research summaries."
|
|
21
|
+
)
|
|
22
|
+
if needs_deep:
|
|
23
|
+
result = await self.model_router.call(
|
|
24
|
+
task_type="synthesis",
|
|
25
|
+
messages=[{"role": "user", "content": task}],
|
|
26
|
+
system=system_claude,
|
|
27
|
+
state=state,
|
|
28
|
+
)
|
|
29
|
+
model = "claude-sonnet-4-6"
|
|
30
|
+
else:
|
|
31
|
+
result = await self.model_router.call(
|
|
32
|
+
task_type="summarization",
|
|
33
|
+
messages=[{"role": "user", "content": task}],
|
|
34
|
+
system=system_cj,
|
|
35
|
+
state=state,
|
|
36
|
+
)
|
|
37
|
+
model = "chatjimmy"
|
|
38
|
+
await self.log_completion(state, result, model, bool(result))
|
|
39
|
+
return result
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""DEAL — Brand Partnerships Agent. Brand deal research, partnership structuring, sponsorship intel."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
class DealAgent(BaseAgent):
|
|
7
|
+
agent_id = "DEAL"
|
|
8
|
+
domain = "talent"
|
|
9
|
+
description = "Brand Partnerships — deal research, partnership structuring, sponsorship intel, negotiation prep"
|
|
10
|
+
supported_task_types = ["partnerships", "sponsorship", "negotiation", "brand_deals", "research"]
|
|
11
|
+
preferred_model = "claude-sonnet-4-6"
|
|
12
|
+
|
|
13
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
14
|
+
system = self._build_system(
|
|
15
|
+
"You are DEAL, Brand Partnerships Intelligence for talent management. "
|
|
16
|
+
"Every talent has a brand value — you know what it is and how to monetize it. "
|
|
17
|
+
"You research brand partnership opportunities, structure deals, analyze sponsorship terms, "
|
|
18
|
+
"and prep negotiation briefs. You understand NIL, endorsement law basics, and market rates. "
|
|
19
|
+
"You work closely with SCOUT (discovery) and ROSTER (operations). "
|
|
20
|
+
"You produce deal memos, not just ideas."
|
|
21
|
+
)
|
|
22
|
+
result = await self.model_router.call(
|
|
23
|
+
task_type="partnerships",
|
|
24
|
+
messages=[{"role": "user", "content": task}],
|
|
25
|
+
system=system, state=state,
|
|
26
|
+
)
|
|
27
|
+
await self.log_completion(state, result, self.preferred_model, bool(result))
|
|
28
|
+
return result
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""ROSTER — Talent Operations Agent. Roster management, contract tracking, talent CRM."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
class RosterAgent(BaseAgent):
|
|
7
|
+
agent_id = "ROSTER"
|
|
8
|
+
domain = "talent"
|
|
9
|
+
description = "Talent Operations — roster management, contract tracking, talent CRM, onboarding/offboarding"
|
|
10
|
+
supported_task_types = ["talent_ops", "crm", "contract_tracking", "onboarding", "roster"]
|
|
11
|
+
preferred_model = "claude-sonnet-4-6"
|
|
12
|
+
|
|
13
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
14
|
+
system = self._build_system(
|
|
15
|
+
"You are ROSTER, Talent Operations for talent management. "
|
|
16
|
+
"You are the operational backbone. You manage the full roster: "
|
|
17
|
+
"Jane Example, John Placeholder, Sam Sample, Alex Fictional, "
|
|
18
|
+
"Casey Demo, Riley Testcase, Jordan Mockname, Taylor Example, Morgan Placeholder, Drew Sample. "
|
|
19
|
+
"DEPARTED (do not include): Pat Former, Chris Formerly, Robin Exmember. "
|
|
20
|
+
"You track contracts, manage onboarding, maintain talent CRM, and flag upcoming renewals. "
|
|
21
|
+
"CRITICAL: Only surface verified, current information about talent. Never recycle old personal data."
|
|
22
|
+
)
|
|
23
|
+
result = await self.model_router.call(
|
|
24
|
+
task_type="talent_ops",
|
|
25
|
+
messages=[{"role": "user", "content": task}],
|
|
26
|
+
system=system, state=state,
|
|
27
|
+
)
|
|
28
|
+
await self.log_completion(state, result, self.preferred_model, bool(result))
|
|
29
|
+
return result
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""SCOUT — Talent Discovery Agent. Scouting, roster analysis, athlete/artist research, deal intel."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from swarm.agents.base import BaseAgent
|
|
4
|
+
from core.hyperstate.schema import HyperState
|
|
5
|
+
|
|
6
|
+
class TalentScoutAgent(BaseAgent):
|
|
7
|
+
agent_id = "SCOUT"
|
|
8
|
+
domain = "talent"
|
|
9
|
+
description = "Talent Discovery — scouting, roster analysis, athlete/artist research, deal intelligence"
|
|
10
|
+
supported_task_types = ["talent_scouting", "research", "analysis", "roster", "deal_intel"]
|
|
11
|
+
preferred_model = "claude-sonnet-4-6"
|
|
12
|
+
|
|
13
|
+
async def run(self, task: str, state: HyperState, context: dict) -> str:
|
|
14
|
+
system = self._build_system(
|
|
15
|
+
"You are SCOUT, Talent Discovery Intelligence for talent management. "
|
|
16
|
+
"You identify emerging and elite talent in sports, entertainment, and digital media. "
|
|
17
|
+
"Current roster: Jane Example, John Placeholder, Sam Sample, Alex Fictional, "
|
|
18
|
+
"Casey Demo, Riley Testcase, Jordan Mockname, Taylor Example, Morgan Placeholder, Drew Sample. "
|
|
19
|
+
"Target: 60 talent by end of 2026. Waitlist: 40. "
|
|
20
|
+
"You research market value, brand fit, growth trajectory. You never present stale intel. "
|
|
21
|
+
"CRITICAL: Never surface personal info about talent unless verified and current."
|
|
22
|
+
)
|
|
23
|
+
result = await self.model_router.call(
|
|
24
|
+
task_type="talent_scouting",
|
|
25
|
+
messages=[{"role": "user", "content": task}],
|
|
26
|
+
system=system, state=state,
|
|
27
|
+
)
|
|
28
|
+
await self.log_completion(state, result, self.preferred_model, bool(result))
|
|
29
|
+
return result
|