@morphixai/agent-core
v0.2.9
Published
Context Flow Protocol + composable primitives for server-side AI agents (scope, runtime, toolkit, thread-state).
Downloads
250
Maintainers
Readme
@morphixai/agent-core
Context Flow Protocol + composable primitives for server-side AI agents — not a framework, not a runtime platform. Bring your own resource shapes and LLM; agent-core gives you the execution model.
Three layered modules ship from one package because they share types:
- scope/ — identity + generic
Scoperouting. agent-core does not define specific resource shapes; you supply aScopeResolvermappingAgentIdentity<NS>to a business-definedScopeunion with any N kinds and any resource bundle shape. - runtime/ —
AgentRuntimeprocess model: fork, dispose, ambient context. Generic over your resource shapes. - toolkit/ — optional
defineToolDSL +ToolRegistrywith a scope-awareScopeViolationErrorguard. The error class is standalone-usable — plug it into your own dispatcher without adopting the DSL.
Also exports thread-state/ and tracer/ helpers.
Install
npm install @morphixai/agent-coreCompanion packages (each usable standalone):
@morphixai/agent-workspace ·
@morphixai/agent-bus
Usage
import { defineTool, ToolRegistry, ScopeViolationError } from '@morphixai/agent-core';
// supply your own ScopeResolver: AgentIdentity<NS> -> your Scope union
// define tools with defineTool, register them, and let ToolRegistry enforce scope.See the source and type definitions (shipped with the package) for the full scope / runtime / toolkit / thread-state / tracer APIs.
License
MIT © MorphixAI
