Swappable models
Change providers without rebuilding the agent around them.
Models, knowledge, memory, tools, and tracing — connected through one typed contract. Composable packages, no platform lock-in, built for TypeScript teams that want to own the stack.
Models you already use
Get models, memory, tools, and tracing through one typed contract. Swap adapters whenever you need.
Change providers without rebuilding the agent around them.
Keep sessions and durable memory in the database you already operate.
Run every agent through one predictable TypeScript contract.
Follow observed model calls, tools, and failures across the entire execution.
Install only the adapters you need. No platform lock-in.
Studio for local inspection. Lens for self-hosted observability and evaluation.
Start with generate() or stream(). Complete, block, or suspend at a real application boundary—then resume in a linked phase, even from another process.
One typed input starts a bounded model-and-tool loop.
Arguments are validated before the protected action can run.
An interaction and JSON-safe continuation return to your application.
Your server claims the response and starts a linked phase.
The approved tool runs and one typed result closes the lifecycle.
1const issueRefund = createTool({2 name: 'issue_refund',3 inputSchema: refundInput,4 outputSchema: refundResult,5 requiresApproval: ({ amount }) =>6 amount > 1007 ? { reason: 'High-value refund.' }8 : false,9 async execute(input) {10 await auth.require(actor, input)11 return billing.refund(input)12 },13})Validate input, require approval, and authorize the side effect in your code.
Generate and stream finish as completed, blocked, or suspended.
Every resumed phase keeps its relationship to the original run.
Start with the core runtime and one provider adapter. Add retrieval, memory, UI, and observability when the product needs them.
Read the quickstart1import { Agent } from '@anvia/core'2import { OpenAIClient } from '@anvia/openai'34const client = new OpenAIClient({ apiKey: process.env.OPENAI_API_KEY! })5const model = client.completionModel({6 modelId: 'gpt-5.6-sol',7 api: 'responses',8})910const agent = new Agent({11 id: 'support',12 model,13 instructions: 'Answer support questions clearly.',14 maxTurns: 4,15})1617const response = await agent.generate({18 prompt: 'Draft a reply.',19})Anvia coordinates the bounded model-and-tool loop. Your application keeps authority over users, credentials, data, permissions, persistence, and deployment.
Identity, policy, credentials, tools, and product UI remain explicit application concerns.
COMPOSE + AUTHORIZERetrieve, generate, act, and observe through one bounded execution contract.
completedblockedsuspendedOpenAI, Anthropic, Gemini, Mistral, Grok
Your stores, schemas, retention, and lifecycle
Studio locally. Lens in your infrastructure.
Every integration is an @anvia package. No platform lock-in and no all-or-nothing framework.
@anvia/core@anvia/client@anvia/mcp@anvia/server@anvia/react@anvia/react-ui@anvia/cli
@anvia/openai@anvia/anthropic@anvia/gemini@anvia/mistral@anvia/grok
@anvia/memory-sqlite@anvia/memory-postgres@anvia/memory-drizzle@anvia/memory-prisma@anvia/transformers@anvia/qdrant@anvia/pinecone@anvia/pgvector@anvia/redis@anvia/chroma@anvia/lancedb@anvia/milvus@anvia/weaviate@anvia/graph@anvia/neo4j@anvia/memgraph
@anvia/studio@anvia/sandbox@anvia/browser@anvia/logger@anvia/otel@anvia/lens@anvia/langfuse
Models, knowledge, memory, tools, and tracing through one typed contract.
Open StudioRun, inspect, and intervene on local agents without leaving the browser.
Open LensSelf-hosted observability and evaluation for production agent runs.
OpenThree complete patterns for products that need grounded answers, connected data, or visible browser work.
Authenticate before retrieval, derive filters from trusted roles, and rank only documents the user may access.
principal → permission filter → retrieval → answerExtract a typed graph, traverse allowed relationships, and return provenance-linked evidence.
documents → graph → bounded traversal → evidenceRun Chromium in Docker, restrict navigation, expose semantic tools, and coordinate human takeover.
sandbox → Chromium → semantic tools → humanAnvia 1.0 puts agents, providers, memory, streaming, React, Studio, observability, and evaluation on one synchronized stable package train.
$ pnpm add @anvia/core @anvia/openaiInstall from npm's default latest tag and keep Anvia package versions aligned.