Anvia
Core Concepts

Package Exports

Find the public entrypoints exposed by @anvia/core.

The easiest import path is the root package:

import { AgentBuilder, createTool } from "@anvia/core";
import { OpenAIClient } from "@anvia/openai";

The root export includes the core public SDK. Use it for most applications and examples.

Studio is a separate package:

import { Studio } from "@anvia/studio";

Use Studio when you want the local playground, sessions, approval UI, and trace browser around built agents.

Focused Subpath Exports

Anvia also exposes focused subpaths when you want narrower imports.

ExportUse for
@anvia/core/agentAgents, agent builders, prompt requests, hooks, and agent errors
@anvia/core/completionCompletion request types, messages, content helpers, and usage
@anvia/core/embeddingsEmbedding interfaces and shared embedding types
@anvia/core/extractorStructured extraction builders and runtime
@anvia/core/mcpMCP connections, tool adapters, and result handling
@anvia/core/observabilityObservers, trace groups, and runtime observation types
@anvia/core/pipelinePipeline builders and pipeline execution
@anvia/core/skillsLocal skill loading, skill instructions, and skill tools
@anvia/core/streamingStreaming helpers such as readable stream adapters
@anvia/core/toolTool creation, tool sets, tool registries, and tool errors
@anvia/core/vector-storeVector store interfaces, filters, and local indexes

Root Import Example

import { AgentBuilder, createTool } from "@anvia/core";
import { OpenAIClient } from "@anvia/openai";

Root imports are clear for small apps, examples, and docs.

Subpath Import Example

import { AgentBuilder } from "@anvia/core/agent";
import { OpenAIClient } from "@anvia/openai";
import { createTool } from "@anvia/core/tool";

Subpath imports can make ownership clearer in larger codebases, especially when one module should only work with tools, providers, or completion message types.

Recommendation

Start with root imports while learning. Move to subpath imports when a file has a narrow responsibility or when your project style prefers explicit module boundaries.