npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

elsium-ai

v0.6.0

Published

ElsiumAI — A high-performance, TypeScript-first AI framework

Readme

elsium-ai

Single import for the entire ElsiumAI framework.

npm License


Install

npm install elsium-ai

Why use this package?

elsium-ai is the umbrella package that re-exports every public API from all ElsiumAI sub-packages. Instead of installing and importing from many individual packages, you can import everything from a single entry point.

Before -- importing from individual sub-packages:

import { env } from '@elsium-ai/core'
import { gateway } from '@elsium-ai/gateway'
import { defineAgent } from '@elsium-ai/agents'

After -- importing from the umbrella package:

import { env, gateway, defineAgent } from 'elsium-ai'

Same APIs, one dependency, one import path.


What's Included

Every value and type listed below is available directly from 'elsium-ai'.

@elsium-ai/core

| Values | Types | |--------|-------| | ElsiumError | Role | | ok | ContentPart | | err | TextContent | | isOk | ImageContent | | isErr | AudioContent | | unwrap | DocumentContent | | unwrapOr | Message | | tryCatch | ToolCall | | tryCatchSync | ToolResult | | createStream | TokenUsage | | createLogger | CostBreakdown | | env | StopReason | | envNumber | LLMResponse | | envBool | StreamEvent | | generateId | XRayData | | generateTraceId | StreamCheckpoint | | extractText | ProviderConfig | | sleep | CompletionRequest | | retry | ToolDefinition | | zodToJsonSchema | TenantContext | | createRegistry | Middleware | | countTokens | Result | | createContextManager | Ok | | | Err | | | ElsiumStream | | | ResilientStreamOptions | | | LogLevel | | | Logger | | | ErrorCode | | | Registry | | | ContextStrategy | | | ContextManagerConfig | | | StreamMiddleware | | | StreamMiddlewareNext | | | ContextManager |

@elsium-ai/gateway

| Values | Types | |--------|-------| | gateway | LLMProvider | | registerProviderFactory | ProviderFactory | | calculateCost | Gateway | | estimateCost | | | composeStreamMiddleware | | | registerPricing | GatewayConfig | | composeMiddleware | XRayStore | | loggingMiddleware | ProviderMeshConfig | | costTrackingMiddleware | ProviderEntry | | xrayMiddleware | RoutingStrategy | | createAnthropicProvider | ProviderMesh | | createOpenAIProvider | SecurityMiddlewareConfig | | createGoogleProvider | SecurityViolation | | createProviderMesh | SecurityResult | | securityMiddleware | CacheAdapter | | detectPromptInjection | CacheStats | | detectJailbreak | CacheMiddlewareConfig | | redactSecrets | OutputGuardrailConfig | | checkBlockedPatterns | OutputGuardrailRule | | cacheMiddleware | OutputViolation | | createInMemoryCache | BatchConfig | | outputGuardrailMiddleware | BatchResult | | createBatch | BatchResultItem |

@elsium-ai/agents

| Values | Types | |--------|-------| | defineAgent | Agent | | runSequential | AgentDependencies | | runParallel | AgentConfig | | runSupervisor | AgentResult | | createMemory | AgentRunOptions | | createSharedMemory | SharedMemory | | createSemanticValidator | MultiAgentOptions | | createAgentSecurity | GuardrailConfig | | createConfidenceScorer | AgentHooks | | executeStateMachine | Memory | | createInMemoryMemoryStore | MemoryConfig | | createSqliteMemoryStore | MemoryStore | | | SqliteMemoryStoreConfig | | | StateTransitionResult | | | SemanticGuardrailConfig | | | SemanticCheck | | | SemanticCheckResult | | | SemanticValidationResult | | | SemanticValidator | | | AgentSecurityConfig | | | AgentSecurityResult | | | ConfidenceConfig | | | ConfidenceResult | | | StateDefinition | | | StateHistoryEntry | | | StateMachineResult |

@elsium-ai/tools

| Values | Types | |--------|-------| | defineTool | Tool | | createToolkit | ToolConfig | | httpFetchTool | ToolContext | | calculatorTool | ToolExecutionResult | | jsonParseTool | Toolkit | | currentTimeTool | | | formatToolResult | | | formatToolResultAsText | |

@elsium-ai/rag

| Values | Types | |--------|-------| | rag | RAGPipeline | | createInMemoryStore | RAGPipelineConfig | | createOpenAIEmbeddings | IngestResult | | createGoogleEmbeddings | Document | | createCohereEmbeddings | Chunk | | createMockEmbeddings | EmbeddedChunk | | vectorStoreRegistry | RetrievalResult | | embeddingProviderRegistry | QueryOptions | | createPgVectorStore | EmbeddingProvider | | createQdrantStore | VectorStore | | createBM25Index | VectorStoreFactory | | createHybridSearch | EmbeddingProviderFactory | | | PgVectorStoreConfig |

@elsium-ai/workflows

| Values | Types | |--------|-------| | defineWorkflow | Workflow | | defineParallelWorkflow | WorkflowConfig | | defineBranchWorkflow | WorkflowResult | | defineDagWorkflow | WorkflowRunOptions | | step | StepConfig | | | StepContext | | | StepResult | | | DagStepConfig | | | DagWorkflowConfig |

@elsium-ai/observe

| Values | Types | |--------|-------| | observe | Tracer | | createSpan | TracerConfig | | createMetrics | TracerExporter | | createCostEngine | CostReport | | createExperiment | Span | | instrumentComplete | ExperimentStore | | instrumentAgent | | | createFileExperimentStore | | | toOTelSpan | SpanData | | toOTelExportRequest | SpanKind | | toTraceparent | SpanStatus | | parseTraceparent | MetricsCollector | | injectTraceContext | MetricEntry | | extractTraceContext | CostEngine | | createOTLPExporter | CostEngineConfig | | | CostAlert | | | CostDimension | | | CostIntelligenceReport | | | ModelSuggestion | | | Experiment | | | ExperimentConfig | | | ExperimentVariant | | | ExperimentResults | | | OTelSpan | | | OTelExportRequest | | | TraceContext | | | OTLPExporterConfig |

@elsium-ai/app

| Values | Types | |--------|-------| | createApp | AppConfig | | sseHeaders | ServerConfig | | formatSSE | CorsConfig | | streamResponse | AuthConfig | | tenantMiddleware | RateLimitConfig | | tenantRateLimitMiddleware | StreamChatEvent | | tenantBudgetMiddleware | StreamCompleteEvent | | | TenantMiddlewareConfig |

@elsium-ai/mcp

| Values | Types | |--------|-------| | createMCPClient | MCPClient | | createMCPServer | MCPClientConfig | | createMCPHttpHandler | MCPToolInfo | | | MCPServer | | | MCPServerConfig | | | JsonRpcRequest | | | JsonRpcResponse | | | MCPTransport |

@elsium-ai/client

| Values | Types | |--------|-------| | createClient | ElsiumClient | | | ClientConfig |

@elsium-ai/testing

| Values | Types | |--------|-------| | mockProvider | MockProviderOptions | | createFixture | MockResponseConfig | | loadFixture | MockProvider | | createRecorder | EvalSuiteConfig | | runEvalSuite | EvalCase | | formatEvalReport | EvalCriterion | | createSnapshotStore | EvalResult | | createPromptRegistry | EvalSuiteResult | | definePrompt | LLMJudge | | createRegressionSuite | SnapshotStore | | createReplayRecorder | PromptDefinition | | createReplayPlayer | PromptDiff | | | PromptRegistry | | | RegressionBaseline | | | RegressionResult | | | RegressionDetail | | | RegressionSuite | | | ReplayEntry | | | ReplayRecorder | | | ReplayPlayer |


Quick Example

import {
  env,
  gateway,
  defineAgent,
  defineTool,
  observe,
  createCostEngine,
} from 'elsium-ai'
import { z } from 'zod'

// Set up observability
const tracer = observe({ serviceName: 'my-app' })
const costEngine = createCostEngine({ budget: { daily: 10.0 } })

// Create a gateway to an LLM provider
const llm = gateway({
  provider: 'anthropic',
  model: 'claude-sonnet-4-6',
  apiKey: env('ANTHROPIC_API_KEY'),
})

// Define a tool
const weatherTool = defineTool({
  name: 'get_weather',
  description: 'Get current weather for a city',
  parameters: z.object({ city: z.string() }),
  execute: async ({ city }) => ({ temp: 72, city }),
})

// Define an agent with the tool
const agent = defineAgent(
  {
    name: 'assistant',
    system: 'You are a helpful assistant.',
    tools: [weatherTool],
  },
  { complete: (req) => llm.complete(req) },
)

// Run the agent
const result = await agent.run('What is the weather in Paris?')
console.log(result.output)

Individual Packages

For full API documentation, see each sub-package README.

| Package | npm | Description | |---------|-----|-------------| | @elsium-ai/core | npm | Types, errors, result pattern, streaming, logger, config, tokens, context manager, registry, schema | | @elsium-ai/gateway | npm | Multi-provider LLM gateway, middleware, provider mesh, security, caching, output guardrails, batch | | @elsium-ai/agents | npm | Agent definitions, memory, persistent stores (in-memory, SQLite), guardrails, multi-agent | | @elsium-ai/tools | npm | Tool definitions with Zod validation, built-in tools | | @elsium-ai/rag | npm | Document ingestion, chunking, embeddings, vector search, PgVector store, plugin registries | | @elsium-ai/workflows | npm | Sequential, parallel, and branching workflow definitions | | @elsium-ai/observe | npm | Tracing, metrics, cost intelligence, OpenTelemetry export, A/B experiments | | @elsium-ai/app | npm | HTTP server with CORS, auth, rate limiting, SSE streaming, multi-tenant | | @elsium-ai/client | npm | TypeScript HTTP client with SSE parsing for consuming ElsiumAI servers | | @elsium-ai/mcp | npm | Model Context Protocol client and server | | @elsium-ai/testing | npm | Mocks, fixtures, evals, snapshot testing, prompt versioning, replay |


License

MIT - Copyright (c) 2026 Eric Utrera