Skip to content

Agent API_p18

grisun0 edited this page Oct 12, 2026 · 25 revisions

API (page 18 of 22)

Previous: API_p17.md

skills/lazyown_context.py

Imported by: skills/lazyown_mcp.py, skills/lazyown_session.py, skills/tests/test_harness_e2e.py

  • CompactionResult.summary (method) skills/lazyown_context.py:57 def summary(self)
  • ContextCompactor.__init__ (method) skills/lazyown_context.py:72 def __init__(self, budget_override, snip_threshold, collapse_threshold)
  • ContextCompactor.apply_budget (method) skills/lazyown_context.py:84 def apply_budget(self, content, tool_name) -- Hard-cap output.
  • ContextCompactor.snip (method) skills/lazyown_context.py:99 def snip(self, content) -- Remove duplicate consecutive lines (log noise).
  • ContextCompactor.microcompact (method) skills/lazyown_context.py:120 def microcompact(self, content) -- Strip known low-signal patterns.
  • ContextCompactor.collapse (method) skills/lazyown_context.py:136 def collapse(self, content, tool_name) -- Replace repetitive sections with a structural summary.
  • ContextCompactor.auto_compact_session (method) skills/lazyown_context.py:159 def auto_compact_session(entries) -- Template-based session summary when full pipeline is insufficient. entries: list of {"type": str, "data": dict} from...
  • ContextCompactor.compact (method) skills/lazyown_context.py:203 def compact(self, content, tool_name) -- Apply all applicable layers in order.
  • compact_output (function) skills/lazyown_context.py:237 def compact_output(content, tool_name) -- Convenience wrapper: compact and return string.

skills/lazyown_daemon.py

Depends on: core/logging.py, modules/event_engine.py, modules/logging_config.py, modules/session_state.py, modules/timeline_narrator.py, skills/sessions_watcher.py

skills/lazyown_facts.py

Depends on: core/logging.py, modules/logging_config.py Imported by: cli/commands/mcp_bridge.py, lazyc2.py, skills/lazyown_groq_agents.py, skills/lazyown_llm.py, skills/lazyown_mcp.py, skills/sessions_watcher.py, skills/tests/test_facts.py

skills/lazyown_groq_agents.py

Depends on: modules/atomic_enricher.py, modules/lazyown_bridge.py, modules/reactive_engine.py, modules/session_rag.py, modules/session_reader.py, modules/threat_model.py, skills/lazyown_facts.py, skills/lazyown_llm.py, skills/lazyown_mcp.py, skills/lazyown_objective.py, skills/lazyown_parquet_db.py Imported by: skills/hive_mind.py, skills/lazyown_mcp.py, skills/swan_agent.py, tests/test_bridge_catalog_filtered.py

skills/lazyown_hooks.py

Depends on: cli/commands/enum.py Imported by: skills/lazyown_mcp.py, skills/tests/test_harness_e2e.py

skills/lazyown_llm.py

Depends on: core/logging.py, modules/logging_config.py, skills/lazyown_facts.py, skills/lazyown_mcp.py, skills/lazyown_objective.py Imported by: skills/autonomous_daemon.py, skills/hive_mind.py, skills/lazyown_groq_agents.py, skills/lazyown_mcp.py

skills/lazyown_mcp.py

Depends on: cli/command_chain.py, cli/graph_advisor.py, cli/palette.py, cli/palette_command.py, cli/recommendation.py, cli/recommendation_signals.py, core/llm_budget.py, core/logging.py, core/payload_schema.py, modules/__init__.py, modules/ai_exploit_chain.py, modules/atomic_enricher.py, modules/auto_pivot.py, modules/auto_registry.py, modules/autonomous_exploit_engine.py, modules/backdoor/server.c, modules/collab_bp.py, modules/cve_matcher.py, modules/dashboard_engine.py, modules/db.py, modules/evasion_engine.py, modules/event_bus.py, modules/event_engine.py, modules/evidence.py, modules/exploit_recommender.py, modules/exploitgym_gym.py, modules/goals.py, modules/integrations/misp_export.py, modules/intelligence_engine.py, modules/intercept.py, modules/killchain.py, modules/lazy_bridge.py, modules/lazy_engine.py, modules/lazy_loop.py, modules/lazy_mentions.py, modules/lazyown_bridge.py, modules/llm_client.py, modules/llm_evaluator.py, modules/llm_pool.py, modules/mcp_agent_bridge.py, modules/memory_store.py, modules/metrics.py, modules/module_registry.py, modules/obs_parser.py, modules/pipeline_engine.py, modules/planner.py, modules/playbook_engine.py, modules/reactive_engine.py, modules/recommender.py, modules/session_rag.py, modules/session_reader.py, modules/session_state.py, modules/threat_model.py, modules/timeline_narrator.py, modules/traffic_recorder.py, modules/unified_dashboard.py, modules/world_model.py, skills/aci_planner.py, skills/autonomous_daemon.py, skills/autonomous_replay.py, skills/daemon_control.py, skills/hive_mind.py, skills/lazyown_automapper.py, skills/lazyown_campaign.py, skills/lazyown_claudemd.py, skills/lazyown_context.py, skills/lazyown_facts.py, skills/lazyown_groq_agents.py, skills/lazyown_hooks.py, skills/lazyown_llm.py, skills/lazyown_mcp_helpers.py, skills/lazyown_objective.py, skills/lazyown_parquet_db.py, skills/lazyown_permissions.py, skills/lazyown_policy.py, skills/lazyown_session.py, skills/mcp_lazy.py, skills/swan_agent.py Imported by: skills/autonomous_daemon.py, skills/lazyown_groq_agents.py, skills/lazyown_llm.py, skills/lazyown_mcp_opencode.py, skills/tests/test_mcp_smoke.py, tests/test_boyscout_contracts.py, tests/test_mcp_improvements.py, tests/test_rea_mcp.py

skills/lazyown_mcp_helpers.py

Imported by: skills/lazyown_mcp.py, tests/test_mcp_improvements.py

skills/lazyown_mcp_opencode.py

Depends on: modules/backdoor/server.c, skills/lazyown_mcp.py

skills/lazyown_objective.py

Imported by: skills/autonomous_daemon.py, skills/lazyown_groq_agents.py, skills/lazyown_llm.py, skills/lazyown_mcp.py, skills/sessions_watcher.py, skills/tests/test_objectives.py, tests/test_daemon_loop.py

skills/lazyown_parquet_db.py

Depends on: core/logging.py, modules/atomic_enricher.py, skills/lazyown_policy.py Imported by: cli/commands/mcp_bridge.py, skills/hive_mind.py, skills/lazyown_groq_agents.py, skills/lazyown_mcp.py, skills/tests/test_parquet_db.py, skills/update_knowledge.py, tests/test_core_modules.py

skills/lazyown_permissions.py

Depends on: cli/commands/enum.py Imported by: skills/lazyown_mcp.py, skills/tests/test_harness_e2e.py

skills/lazyown_policy.py

Depends on: cli/commands/enum.py, core/logging.py, modules/detection_oracle.py, modules/logging_config.py Imported by: cli/recommendation_signals.py, modules/unified_dashboard.py, skills/autonomous_daemon.py, skills/lazyown_mcp.py, skills/lazyown_parquet_db.py, skills/swan_agent.py, tests/test_engage_orchestrator.py, tests/test_moe_rl_swan.py, tests/test_scope_bound_auto_gate.py

skills/lazyown_session.py

Depends on: skills/lazyown_context.py Imported by: skills/lazyown_mcp.py, skills/tests/test_harness_e2e.py

skills/mcp_generated_tools.py

  • get_generated_tool_definitions (function) skills/mcp_generated_tools.py:659 def get_generated_tool_definitions() -- Return list[types.Tool] entries for all generated tools.
  • register_all_generated_handlers (function) skills/mcp_generated_tools.py:684 def register_all_generated_handlers(register_handler_fn, make_text_fn, run_lazyown_cmd_fn) -- Register every generated handler via register_handler_fn.

skills/mcp_lazy.py

Imported by: skills/lazyown_mcp.py, tests/test_mcp_lazy.py

  • ensure_optional (function) skills/mcp_lazy.py:18 def ensure_optional(namespace, flag, loader) -- Return the cached flag or run loader once to compute it.

skills/mcp_tool_generator.py

skills/sessions_watcher.py

Depends on: core/logging.py, modules/event_engine.py, modules/logging_config.py, skills/lazyown_facts.py, skills/lazyown_objective.py Imported by: skills/lazyown_daemon.py

skills/setup.sh

skills/swan_agent.py

Depends on: core/logging.py, modules/detection_oracle.py, modules/logging_config.py, modules/moe_router.py, modules/rl_trainer.py, skills/hive_mind.py, skills/lazyown_groq_agents.py, skills/lazyown_policy.py Imported by: modules/loop_ai_bridge.py, skills/autonomous_daemon.py, skills/lazyown_mcp.py, skills/unified_orchestrator.py, tests/test_moe_rl_swan.py

  • SwanResult.is_success (method) skills/swan_agent.py:167 def is_success(self)
  • IResultAggregator.aggregate (method) skills/swan_agent.py:209 def aggregate(self, task_type, goal, votes) -- Return (synthesis_text, consensus_confidence).
  • ISwanOrchestrator.run (method) skills/swan_agent.py:226 def run(self, task_type, goal, engagement_phase, timeout) -- Execute with the best single expert and return result.
  • ISwanOrchestrator.ensemble_run (method) skills/swan_agent.py:236 def ensemble_run(self, task_type, goal, n_experts, engagement_phase, timeout) -- Execute with top-N experts in parallel and synthesize results.
  • WeightedTextAggregator.aggregate (method) skills/swan_agent.py:264 def aggregate(self, task_type, goal, votes)
  • ExpertExecutor.execute (method) skills/swan_agent.py:351 def execute(self, expert_id, backend, model, goal, task_type, timeout, api_key) -- Run the expert and return a SwanResult.
  • OutcomeEvaluator.evaluate (method) skills/swan_agent.py:479 def evaluate(self, result, task_type) -- Return (reward, detection_prob).
  • SwanOrchestrator.__init__ (method) skills/swan_agent.py:572 def __init__(self, executor, evaluator, aggregator, api_key)
  • SwanOrchestrator.run (method) skills/swan_agent.py:592 def run(self, task_type, goal, engagement_phase, timeout) -- Execute the task with the best single expert selected by the MoE+RL router.
  • SwanOrchestrator.ensemble_run (method) skills/swan_agent.py:680 def ensemble_run(self, task_type, goal, n_experts, engagement_phase, timeout) -- Execute with top-N experts in parallel and synthesize results.
  • SwanOrchestrator.status (method) skills/swan_agent.py:763 def status(self) -- Return a diagnostic snapshot of the SWAN system.
  • mcp_swan_run (function) skills/swan_agent.py:945 def mcp_swan_run(task_type, goal, phase) -- Route and execute a task with the best MoE+RL-selected expert.
  • mcp_swan_ensemble (function) skills/swan_agent.py:968 def mcp_swan_ensemble(task_type, goal, n_experts, phase) -- Run top-N experts in parallel and return a synthesized result.
  • mcp_swan_status (function) skills/swan_agent.py:996 def mcp_swan_status() -- Return SWAN system status: expert weights, RL epsilon, performance.
  • mcp_swan_route (function) skills/swan_agent.py:1003 def mcp_swan_route(task_type, goal) -- Show which expert would be selected for a task without executing.
  • get_swan (function) skills/swan_agent.py:1039 def get_swan(api_key) -- Return (or create) the module-level singleton SwanOrchestrator.

skills/toposwarm_autonomous.py

Depends on: core/logging.py, modules/logging_config.py, modules/reactive_engine.py, modules/toposwarm_bridge.py

skills/unified_orchestrator.py

Depends on: modules/engage_summary.py, skills/autonomous_daemon.py, skills/hive_mind.py, skills/swan_agent.py Imported by: lazyown.py, tests/test_improvements_spec.py

skills/update_knowledge.py

Depends on: core/logging.py, modules/logging_config.py, skills/lazyown_parquet_db.py

slack_c2_bot.py

Depends on: core/parsers.py, lazyown.py, modules/llm_adapter.py, utils.py

Next: API_p19.md

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally