Entry Points
@ageniti/core ships a root export plus narrower subpath exports.
Recommended Default
Most applications should start with the root package:
import { createAgenitiApp, defineAction, s } from "@ageniti/core";That keeps usage simple and matches the examples in the documentation.
Available Exports
Root Export
@ageniti/coreUse the root export when you want the main authoring API in one place. It carries the action contract, runtime, transports, adapters, schema, client, and test utilities — everything you need at runtime in your app or host.
Since 0.2.0: the packaging, docs, and project tool-chain helpers (
buildArtifacts,packageArtifacts,publishArtifacts,createGuideDoc,exportDocs,initProject,doctorProject,findDefaultAppModule,loadProjectConfig,detectTypeScriptRuntime,supportsTypeScriptEntrypoints) are no longer re-exported from the root entry. Import them from their dedicated subpath (@ageniti/core/build,@ageniti/core/docs,@ageniti/core/project) so the runtime hot path stays lean.
Subpath Exports
@ageniti/core/ai-sdk
@ageniti/core/adapters
@ageniti/core/app
@ageniti/core/build
@ageniti/core/cli
@ageniti/core/client
@ageniti/core/client-gen
@ageniti/core/core
@ageniti/core/dev
@ageniti/core/docs
@ageniti/core/handlers
@ageniti/core/http
@ageniti/core/json-runner
@ageniti/core/lint
@ageniti/core/manifest
@ageniti/core/mcp
@ageniti/core/project
@ageniti/core/react
@ageniti/core/react-hooks
@ageniti/core/schema
@ageniti/core/schema-adapter
@ageniti/core/test-utilsWhat Each Subpath Contains
@ageniti/core/ai-sdk: OpenAI-compatible tools, Responses tools, AI SDK tools, and combined manifests.@ageniti/core/adapters: built-in surface adapters plus adapter helpers.@ageniti/core/app:createAgenitiApp().@ageniti/core/build:buildArtifacts(),packageArtifacts(),publishArtifacts()— build, pack, and publish a distributable CLI tarball.@ageniti/core/docs:createGuideDoc()andexportDocs()— emit a unifiedGUIDE.mdfor app actions.@ageniti/core/project:initProject(),doctorProject(),findDefaultAppModule(),loadProjectConfig(),detectTypeScriptRuntime(),supportsTypeScriptEntrypoints()— project scaffolding and discovery helpers.@ageniti/core/cli:createCli().@ageniti/core/client:createClient()andAgenitiClientErrorfor the typed in-process / HTTP client.@ageniti/core/client-gen:generateClientTypes()andjsonSchemaToTs()for emitting.d.tstyped-client files at build time.@ageniti/core/core: runtime and action primitives such asdefineAction(),createRuntime(), and theERROR_CODESconstants.@ageniti/core/dev:createDevServer().@ageniti/core/handlers:defineActions(),actionFromHandler(), andactionsFromHandlers()for batch-wrapping existing functions.@ageniti/core/http:createHttpHandler(),createHttpServer(),parseRequestBody(),sendJson(), andsendText().@ageniti/core/json-runner:createJsonRunner().@ageniti/core/lint:lintActions().@ageniti/core/manifest: manifest helpers such asdescribeAction(),createSurfaceManifest(), anddiffActionManifests().@ageniti/core/mcp: MCP manifest, handler, and stdio server helpers (Content-Length and newline framing).@ageniti/core/react:createReactActionAdapter(),makeInvoker(), andstreamAction()(no React import — safe in non-React projects).@ageniti/core/react-hooks: theuseAction()state-machine hook (React peer dep).@ageniti/core/schema:s,isSchema(),assertSchema(),toJSONSchema(), andSchemaValidationError.@ageniti/core/schema-adapter:wrapSchema(),isZodLike(),isStandardSchemaV1(), andzodToJsonSchema()for foreign schema interop.@ageniti/core/test-utils:createTestRuntime(),expectOk(),expectError(),expectLog(),collectStream(),stubAction().
Example Import Patterns
Authoring app actions:
import { defineAction, s } from "@ageniti/core";Building only an MCP server wrapper:
import { createMcpHandler } from "@ageniti/core/mcp";Running a validation or tooling step:
import { lintActions } from "@ageniti/core/lint";Generating AI tool definitions without pulling the app helper:
import { createAISDKTools, createOpenAITools } from "@ageniti/core/ai-sdk";When To Prefer Subpaths
Prefer a subpath when:
- you are building a narrowly scoped integration layer
- you want imports to reflect architectural boundaries
- you are exposing only one surface from a package or service
- you are writing tooling around manifests, linting, or schema conversion
Prefer the root export when:
- you are writing the main application integration
- you want the shortest onboarding path
- you do not need explicit module-level separation
- you need build helpers or project setup helpers that do not have dedicated subpath exports
Type Declarations
Type declarations are now reduced to the smallest practical shape: the package keeps one root declaration file for the main entry point and one central subpath declaration map under src/types/ for every public subpath export.