neurocore_skill_neuroweave.skill ================================ .. py:module:: neurocore_skill_neuroweave.skill .. autoapi-nested-parse:: NeuroWeave skill — knowledge graph memory for NeuroCore agents. Wraps NeuroWeave's async API as a sync FlowEngine Skill with three modes: - **process**: Extract knowledge from a message, update the graph. Consumes: ``message`` → Provides: ``neuroweave_result`` - **query**: Query the knowledge graph for relevant context. Consumes: ``query`` → Provides: ``neuroweave_result`` - **context**: Extract + query in one step (default). Consumes: ``message`` → Provides: ``neuroweave_result``, ``neuroweave_context`` The async NeuroWeave API is bridged to sync via ``asyncio.run()``. The NeuroWeave instance is created on ``init(config)`` and started lazily on the first ``process()`` call. Config keys (passed via neurocore_ai.yaml or blueprint): mode: str — "process", "query", or "context" (default: "context") llm_provider: str — "mock", "anthropic", or "openai" (default: "mock") llm_model: str — LLM model identifier llm_api_key: str — API key (or set via ANTHROPIC_API_KEY env) enable_visualization: bool — start the graph viz server (default: false) Classes ------- .. autoapisummary:: neurocore_skill_neuroweave.skill.NeuroWeaveSkill Module Contents --------------- .. py:class:: NeuroWeaveSkill(name: str | None = None) Bases: :py:obj:`neurocore_ai.skills.base.Skill` Knowledge graph memory skill powered by NeuroWeave. Bridges NeuroWeave's async API into NeuroCore's synchronous FlowEngine execution model. Manages a persistent NeuroWeave instance across the skill lifecycle. .. py:attribute:: skill_meta :type: ClassVar[neurocore_ai.skills.base.SkillMeta] .. py:method:: init(config: dict[str, Any]) -> None Initialize the skill and create (but don't start) the NeuroWeave instance. .. py:method:: setup(context: flowengine.FlowContext) -> None Start NeuroWeave on the first run. .. py:method:: process(context: flowengine.FlowContext) -> flowengine.FlowContext Execute the NeuroWeave operation based on configured mode. Args: context: FlowContext with input data. Returns: FlowContext with neuroweave results. .. py:method:: teardown(context: flowengine.FlowContext) -> None Stop the NeuroWeave instance. .. py:method:: health_check() -> bool Check if NeuroWeave is operational.