neurocore_skill_neuroweave.skill

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

NeuroWeaveSkill

Knowledge graph memory skill powered by NeuroWeave.

Module Contents

class neurocore_skill_neuroweave.skill.NeuroWeaveSkill(name: str | None = None)

Bases: 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.

skill_meta: ClassVar[neurocore_ai.skills.base.SkillMeta]
init(config: dict[str, Any]) None

Initialize the skill and create (but don’t start) the NeuroWeave instance.

setup(context: flowengine.FlowContext) None

Start NeuroWeave on the first run.

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.

teardown(context: flowengine.FlowContext) None

Stop the NeuroWeave instance.

health_check() bool

Check if NeuroWeave is operational.