@nebutra/agents 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +21 -676
  2. package/README.md +7 -3
  3. package/dist/{agent-CahnMASx.d.ts → agent-DDGWuUpe.d.ts} +1 -1
  4. package/{src/env.ts → dist/chunk-BMSL4E4A.js} +23 -47
  5. package/dist/{chunk-5JZJ5KMC.js → chunk-BZKIMAGK.js} +16 -7
  6. package/dist/{chunk-NPQECBXL.js → chunk-GRSMUTUS.js} +60 -7
  7. package/dist/{chunk-B7XWL35G.js → chunk-QYZDHC5A.js} +5 -1
  8. package/dist/{chunk-RLWM437Q.js → chunk-RNFUEMUB.js} +10 -3
  9. package/dist/chunk-RWQL4HXC.js +171 -0
  10. package/dist/{chunk-NVPE5EDI.js → chunk-V6VC2O6Q.js} +4 -3
  11. package/dist/chunk-VZPQOXWW.js +47 -0
  12. package/dist/{chunk-5LX742GP.js → chunk-XLBS3XUI.js} +4 -50
  13. package/dist/env.d.ts +42 -0
  14. package/dist/env.js +12 -0
  15. package/dist/fallback.d.ts +100 -0
  16. package/dist/fallback.js +18 -0
  17. package/dist/generation/index.d.ts +122 -0
  18. package/dist/generation/index.js +19 -0
  19. package/dist/index.d.ts +21 -328
  20. package/dist/index.js +57 -245
  21. package/dist/observability.d.ts +46 -0
  22. package/dist/observability.js +13 -0
  23. package/dist/providers/langchain.d.ts +2 -2
  24. package/dist/providers/vercel-ai.d.ts +2 -2
  25. package/dist/providers/vercel-ai.js +15 -7
  26. package/dist/sdk/config.d.ts +3 -0
  27. package/dist/sdk/config.js +1 -1
  28. package/dist/sdk/index.d.ts +36 -3
  29. package/dist/sdk/index.js +20 -7
  30. package/dist/sdk/models.d.ts +18 -6
  31. package/dist/sdk/models.js +1 -1
  32. package/dist/sdk/provider.d.ts +1 -0
  33. package/dist/sdk/provider.js +3 -3
  34. package/dist/tools.d.ts +1 -1
  35. package/dist/{types-NtgB3pch.d.ts → types-BytC-HfQ.d.ts} +1 -5
  36. package/package.json +71 -19
  37. package/.turbo/turbo-build.log +0 -40
  38. package/.turbo/turbo-test.log +0 -19
  39. package/.turbo/turbo-typecheck.log +0 -4
  40. package/AGENTS.md +0 -63
  41. package/CHANGELOG.md +0 -36
  42. package/src/__tests__/cost-observability.test.ts +0 -172
  43. package/src/__tests__/fallback-wiring.test.ts +0 -313
  44. package/src/__tests__/generation.test.ts +0 -111
  45. package/src/__tests__/public-api.test.ts +0 -114
  46. package/src/__tests__/runtime-gateway.test.ts +0 -108
  47. package/src/agent.ts +0 -117
  48. package/src/context.ts +0 -99
  49. package/src/fallback.ts +0 -358
  50. package/src/gateway.ts +0 -234
  51. package/src/generation/index.ts +0 -157
  52. package/src/generation/mock-provider.ts +0 -123
  53. package/src/generation/types.ts +0 -87
  54. package/src/index.ts +0 -104
  55. package/src/memory.ts +0 -126
  56. package/src/observability.ts +0 -102
  57. package/src/orchestrator.ts +0 -147
  58. package/src/providers/langchain.ts +0 -28
  59. package/src/providers/vercel-ai.ts +0 -114
  60. package/src/router.ts +0 -158
  61. package/src/sdk/config.ts +0 -73
  62. package/src/sdk/index.ts +0 -214
  63. package/src/sdk/models.ts +0 -57
  64. package/src/sdk/provider.ts +0 -80
  65. package/src/tenant.ts +0 -52
  66. package/src/tools.ts +0 -65
  67. package/src/types.ts +0 -114
  68. package/tsconfig.json +0 -12
  69. package/tsup.config.ts +0 -21
package/dist/index.d.ts CHANGED
@@ -1,14 +1,17 @@
1
- import { B as BaseAgent } from './agent-CahnMASx.js';
2
- import { z } from 'zod';
3
- import { EmbeddingModel, LanguageModel } from 'ai';
4
- export { GenerateTextResult, ModelMessage, StreamTextResult } from 'ai';
5
- import { A as AgentMessage, O as OrchestratorConfig, a as AgentContext, b as AgentResponse, P as PipelineStep, R as RouterConfig, c as AgentConfig } from './types-NtgB3pch.js';
6
- export { d as AgentTool, e as AgentUsageEvent, M as MemoryConfig, T as TokenUsage, f as ToolCallResult } from './types-NtgB3pch.js';
7
- export { EmbedOptions, GenerateOptions, configure, embed, embedMany, generateText, getConfig, streamText } from './sdk/index.js';
1
+ import { B as BaseAgent } from './agent-DDGWuUpe.js';
2
+ export { AgentsEnv, AgentsEnvSchema, FallbackProviderName, getAgentsEnv, isLangfuseConfigured } from './env.js';
3
+ export { CreateFallbackModelOptions, EmbeddingFallbackOptions, FallbackResult, buildSystemWithCache, filterAvailableProviders, isRetryableError, runEmbedWithFallback, runWithFallback, withAnthropicCacheControl } from './fallback.js';
4
+ export { GenerationCallOptions, GenerationContext, GenerationModality, GenerationProvider, GenerationResult, ImageGenerationRequest, VideoGenerationRequest, _resetGenerationRegistry, generateImage, generateVideo, listGenerationProviders, mockGenerationProvider, registerGenerationProvider } from './generation/index.js';
5
+ import { A as AgentMessage, O as OrchestratorConfig, a as AgentContext, b as AgentResponse, R as RouterConfig, c as AgentConfig } from './types-BytC-HfQ.js';
6
+ export { d as AgentTool, e as AgentUsageEvent, M as MemoryConfig, T as TokenUsage, f as ToolCallResult } from './types-BytC-HfQ.js';
7
+ export { TelemetryMetadata, buildTelemetryConfig, flushTelemetry, initLangfuse } from './observability.js';
8
+ export { EmbedOptions, GenerateOptions, GenerateStructuredResult, OPENAI_MAX_PROPERTY_NAME_LENGTH, assertSafeOpenAIJsonPayload, configure, embed, embedMany, findOversizedPropertyName, generateStructured, generateText, getConfig, streamText, validateStructured } from './sdk/index.js';
8
9
  export { BUILT_IN_TOOLS, databaseQueryTool, knowledgeBaseTool, webSearchTool } from './tools.js';
10
+ export { GenerateTextResult, ModelMessage, StreamTextResult } from 'ai';
9
11
  export { ModelPreset, models, resolveModel } from './sdk/models.js';
10
12
  export { NebutraAIConfig, NebutraAIConfigSchema, ProviderType, ResolvedNebutraAIConfig } from './sdk/config.js';
11
13
  export { createEmbeddingModel, createModel } from './sdk/provider.js';
14
+ import 'zod';
12
15
 
13
16
  /**
14
17
  * User context primitives — Memory-as-context layer for AI conversations.
@@ -52,258 +55,6 @@ declare function renderUserContextBlock(context: UserContext | null | undefined)
52
55
  */
53
56
  declare function buildPersonalizedSystemPrompt(basePrompt: string, context: UserContext | null | undefined): string;
54
57
 
55
- /**
56
- * Environment validation for `@nebutra/agents`.
57
- *
58
- * All variables are OPTIONAL — the package must work with zero new env config.
59
- * Provider keys (OPENROUTER_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
60
- * are validated lazily by the provider resolver, not here.
61
- */
62
-
63
- /** Comma-separated provider chain. Order = priority. */
64
- declare const FallbackProviderName: z.ZodEnum<{
65
- openrouter: "openrouter";
66
- anthropic: "anthropic";
67
- openai: "openai";
68
- }>;
69
- type FallbackProviderName = z.infer<typeof FallbackProviderName>;
70
- declare const AgentsEnvSchema: z.ZodObject<{
71
- ANTHROPIC_API_KEY: z.ZodOptional<z.ZodString>;
72
- LANGFUSE_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
73
- LANGFUSE_SECRET_KEY: z.ZodOptional<z.ZodString>;
74
- LANGFUSE_HOST: z.ZodDefault<z.ZodString>;
75
- LLM_FALLBACK_CHAIN: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodEnum<{
76
- openrouter: "openrouter";
77
- anthropic: "anthropic";
78
- openai: "openai";
79
- }>>>>;
80
- LLM_EMBEDDING_FALLBACK_CHAIN: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodEnum<{
81
- openrouter: "openrouter";
82
- anthropic: "anthropic";
83
- openai: "openai";
84
- }>>>>;
85
- }, z.core.$strip>;
86
- type AgentsEnv = z.infer<typeof AgentsEnvSchema>;
87
- /** Returns the validated env (cached). Safe to call from any runtime. */
88
- declare function getAgentsEnv(): AgentsEnv;
89
- /** True iff Langfuse credentials are present. */
90
- declare function isLangfuseConfigured(): boolean;
91
-
92
- /**
93
- * Multi-provider fallback chain + prompt-caching helpers.
94
- *
95
- * Cost & reliability primitives for production LLM workloads:
96
- *
97
- * 1. `createFallbackModel()` — picks a primary model and returns a callable
98
- * that retries on retryable errors (429 / 5xx / network) by swapping to
99
- * the next provider in `LLM_FALLBACK_CHAIN`.
100
- *
101
- * 2. `withCacheControl()` — annotates the system message with Anthropic
102
- * `cacheControl: { type: 'ephemeral' }` for a 90% discount on cached
103
- * prefix tokens. OpenAI auto-caches when the prefix is stable and ≥1024
104
- * tokens — see comment in `generateWithFallback()`.
105
- *
106
- * Reference: https://sdk.vercel.ai/docs/ai-sdk-providers/anthropic#cache-control
107
- */
108
-
109
- /**
110
- * Filter a chain to providers whose API key is present in env.
111
- * Returns the original chain unchanged if NO providers have keys (so callers
112
- * still see a meaningful error rather than an empty-chain throw).
113
- */
114
- declare function filterAvailableProviders(chain: readonly FallbackProviderName[]): readonly FallbackProviderName[];
115
- declare function isRetryableError(error: unknown): boolean;
116
- interface FallbackResult<T> {
117
- result: T;
118
- provider: FallbackProviderName;
119
- attempts: number;
120
- }
121
- interface CreateFallbackModelOptions {
122
- /** Override the default chain from env. */
123
- chain?: readonly FallbackProviderName[];
124
- /** Model preset / id passed to each provider in the chain. */
125
- model?: string;
126
- /**
127
- * If true (default), filter the chain to providers whose API key is present
128
- * in env. Set false to keep the original chain (caller wants to surface
129
- * "missing key" errors as fallback steps — useful for tests).
130
- */
131
- filterAvailable?: boolean;
132
- }
133
- /**
134
- * Run an AI SDK call against the configured fallback chain.
135
- *
136
- * The caller provides an `invoke(model)` function — usually a closure over
137
- * `streamText` or `generateText` — and `runWithFallback` walks the chain,
138
- * trying each provider in order until one succeeds or the chain is exhausted.
139
- */
140
- declare function runWithFallback<T>(invoke: (model: LanguageModel) => Promise<T>, options?: CreateFallbackModelOptions): Promise<FallbackResult<T>>;
141
- /**
142
- * Build `providerOptions` that enable prompt caching across providers.
143
- *
144
- * - Anthropic: explicit `cacheControl: { type: 'ephemeral' }` on the system
145
- * message — 90% cost reduction on cached prefix tokens.
146
- * - OpenAI: prompt caching is AUTOMATIC for prompts ≥1024 tokens with a
147
- * stable prefix. No flag needed — but callers MUST keep the system prompt
148
- * + tools FIRST and dynamic user content LAST, otherwise the cache is
149
- * invalidated on every call.
150
- * - OpenRouter: passes provider options through transparently.
151
- */
152
- declare function withAnthropicCacheControl(): {
153
- anthropic: {
154
- cacheControl: {
155
- type: "ephemeral";
156
- };
157
- };
158
- };
159
- /**
160
- * Wraps the system message in a structured cache-control hint.
161
- * Returns the messages array unchanged if no system text is provided.
162
- *
163
- * IMPORTANT: keep stable content (system prompt + tool defs) FIRST,
164
- * dynamic content (user query) LAST — required for both Anthropic explicit
165
- * caching AND OpenAI automatic caching to hit.
166
- */
167
- declare function buildSystemWithCache(systemPrompt: string): {
168
- role: "system";
169
- content: string;
170
- providerOptions: ReturnType<typeof withAnthropicCacheControl>;
171
- };
172
- interface EmbeddingFallbackOptions {
173
- chain?: readonly FallbackProviderName[];
174
- model?: string;
175
- filterAvailable?: boolean;
176
- }
177
- /**
178
- * Run an AI SDK embedding call against the configured embedding fallback chain.
179
- *
180
- * The caller provides an `invoke(model)` function — usually a closure over
181
- * `embed` or `embedMany` from the `ai` package — and this helper walks the
182
- * embedding-capable chain, trying each provider until one succeeds.
183
- */
184
- declare function runEmbedWithFallback<T>(invoke: (model: EmbeddingModel) => Promise<T>, options?: EmbeddingFallbackOptions): Promise<FallbackResult<T>>;
185
-
186
- /**
187
- * Image / video generation modality for `@nebutra/agents`.
188
- *
189
- * The text + embedding modalities wrap the Vercel AI SDK. Image / video
190
- * generation is a *new modality on the same provider layer*: providers are
191
- * env-key gated exactly like the LLM fallback chain (see `fallback.ts`), so
192
- * single-provider — or zero-provider (mock) — deploys just work.
193
- *
194
- * Generation is tenant-scoped: every call carries a {@link GenerationContext}
195
- * so downstream metering / audit can attribute units to an organization.
196
- */
197
- /** What a provider can produce. */
198
- type GenerationModality = "image" | "video";
199
- /** Tenant-scoped attribution for a generation call (mirrors AgentContext). */
200
- interface GenerationContext {
201
- readonly tenantId: string;
202
- readonly userId: string;
203
- /** Optional logical grouping (e.g. a canvas / conversation id). */
204
- readonly conversationId?: string;
205
- }
206
- interface ImageGenerationRequest {
207
- readonly prompt: string;
208
- /** Pixel width — defaults to 1024. */
209
- readonly width?: number;
210
- /** Pixel height — defaults to 1024. */
211
- readonly height?: number;
212
- /** Optional model id / preset; provider-specific passthrough. */
213
- readonly model?: string;
214
- /** Reference images (data: URI or URL) for edit / variation flows. */
215
- readonly inputImages?: readonly string[];
216
- }
217
- interface VideoGenerationRequest {
218
- readonly prompt: string;
219
- /** Clip length in seconds — defaults to 5. */
220
- readonly durationSeconds?: number;
221
- readonly width?: number;
222
- readonly height?: number;
223
- readonly model?: string;
224
- /** Optional first-frame image (data: URI or URL). */
225
- readonly inputImage?: string;
226
- }
227
- interface GenerationResult {
228
- readonly modality: GenerationModality;
229
- /** e.g. "image/svg+xml", "image/png", "video/mp4". */
230
- readonly mimeType: string;
231
- /** `data:` URI (mock / inline) or a remote URL the caller can fetch. */
232
- readonly url: string;
233
- readonly width: number;
234
- readonly height: number;
235
- /** Provider that actually produced the asset. */
236
- readonly providerName: string;
237
- /** Model id reported by the provider. */
238
- readonly model: string;
239
- /**
240
- * Best-effort billable units for `@nebutra/metering` (e.g. 1 image,
241
- * N seconds of video). Callers decide the meter mapping.
242
- */
243
- readonly usage: {
244
- readonly units: number;
245
- };
246
- }
247
- /**
248
- * A generation backend. `envKey` mirrors the LLM provider gating: when the
249
- * variable is absent the provider is filtered out of the chain. `null` means
250
- * "always available" — reserved for the deterministic mock provider so CI and
251
- * flag-gated demos never need a paid secret.
252
- */
253
- interface GenerationProvider {
254
- readonly name: string;
255
- readonly envKey: string | null;
256
- readonly capabilities: readonly GenerationModality[];
257
- generateImage?(req: ImageGenerationRequest, ctx: GenerationContext): Promise<GenerationResult>;
258
- generateVideo?(req: VideoGenerationRequest, ctx: GenerationContext): Promise<GenerationResult>;
259
- }
260
- interface GenerationCallOptions {
261
- /**
262
- * Ordered provider-name preference. Unknown / unavailable names are skipped.
263
- * Defaults to `GENERATION_FALLBACK_CHAIN` env (comma-separated) then registry
264
- * order, always ending at `mock` so a result is guaranteed.
265
- */
266
- readonly chain?: readonly string[];
267
- }
268
-
269
- /**
270
- * Deterministic mock generation provider.
271
- *
272
- * Always available (`envKey: null`) so CI and flag-gated demos never need a
273
- * paid secret. Output is a stable, content-addressed SVG `data:` URI: the same
274
- * prompt + size always yields byte-identical bytes, which makes canvas
275
- * placement and websocket-sync tests deterministic.
276
- *
277
- * Wiring a real provider (Replicate / OpenAI images / Volces) later is purely
278
- * additive — register it with a non-null `envKey` and it takes priority over
279
- * `mock` in the fallback chain whenever its key is present.
280
- */
281
-
282
- declare const mockGenerationProvider: GenerationProvider;
283
-
284
- /**
285
- * Image / video generation modality — public surface.
286
- *
287
- * Mirrors the LLM fallback design (`fallback.ts`): an ordered provider chain,
288
- * filtered to providers whose `envKey` is present, with `mock` as the
289
- * guaranteed terminal so a result is always produced. Retryable failures
290
- * (429 / 5xx / network) rotate to the next provider via `isRetryableError`.
291
- */
292
-
293
- declare function registerGenerationProvider(provider: GenerationProvider): void;
294
- /** Test helper — restores the registry to just the mock provider. */
295
- declare function _resetGenerationRegistry(): void;
296
- /** Provider names available for a modality, in resolved priority order. */
297
- declare function listGenerationProviders(modality: GenerationModality, options?: GenerationCallOptions): string[];
298
- /**
299
- * Generate an image. Always resolves (falls back to the deterministic mock).
300
- */
301
- declare function generateImage(req: ImageGenerationRequest, ctx: GenerationContext, options?: GenerationCallOptions): Promise<GenerationResult>;
302
- /**
303
- * Generate a video (or, in mock mode, a deterministic poster frame).
304
- */
305
- declare function generateVideo(req: VideoGenerationRequest, ctx: GenerationContext, options?: GenerationCallOptions): Promise<GenerationResult>;
306
-
307
58
  /**
308
59
  * Agent memory — Redis-backed per-tenant conversation persistence.
309
60
  *
@@ -331,55 +82,14 @@ declare function saveMemory(tenantId: string, conversationId: string, messages:
331
82
  declare function clearMemory(tenantId: string, conversationId: string): Promise<void>;
332
83
 
333
84
  /**
334
- * LLM observability via Langfuse.
335
- *
336
- * - No-op when env vars are missing — the package works with zero config.
337
- * - Exposes `experimental_telemetry` settings ready to plug into Vercel AI SDK.
338
- * - Use `LangfuseExporter` from `langfuse-vercel` in your OTEL NodeSDK setup
339
- * for full trace export (see README).
340
- */
341
- type LangfuseClient = {
342
- trace: (input: unknown) => unknown;
343
- flushAsync: () => Promise<void>;
344
- shutdownAsync: () => Promise<void>;
345
- };
346
- /**
347
- * Returns a configured `Langfuse` client, or `null` when env is missing.
348
- *
349
- * Telemetry is OPTIONAL. If LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY are
350
- * not set, this returns null (no error). Callers must handle the null case.
351
- */
352
- declare function initLangfuse(): Promise<LangfuseClient | null>;
353
- interface TelemetryMetadata {
354
- tenantId?: string | undefined;
355
- userId?: string | undefined;
356
- sessionId?: string | undefined;
357
- agentId?: string | undefined;
358
- [key: string]: unknown;
359
- }
360
- /**
361
- * Build the `experimental_telemetry` option for AI SDK calls.
362
- * Returns `{ isEnabled: false }` (a safe no-op) when Langfuse is not configured,
363
- * which avoids any OTEL span creation cost.
364
- */
365
- declare function buildTelemetryConfig(args: {
366
- functionId: string;
367
- metadata?: TelemetryMetadata;
368
- }): {
369
- isEnabled: boolean;
370
- functionId?: string;
371
- metadata?: Record<string, unknown>;
372
- };
373
- /** Flush pending telemetry before process exit. Safe to call when disabled. */
374
- declare function flushTelemetry(): Promise<void>;
375
-
376
- /**
377
- * AgentOrchestrator — multi-agent coordination engine.
85
+ * AgentOrchestrator — single-agent routing for the gateway's chat surface.
378
86
  *
379
- * Supports three execution modes:
380
- * - chat(): route a single message to the best agent
381
- * - pipeline(): chain agents sequentially (output → next input)
382
- * - broadcast(): fan-out to all agents and collect results
87
+ * Routes a message to the best-matching registered agent and executes it.
88
+ * Multi-agent fan-out / pipeline orchestration deliberately does NOT live here:
89
+ * that grammar is owned by @nebutra/agent-runtime (planWaves / runAgentWaves
90
+ * over a node topology), the single source of truth for wave scheduling. The
91
+ * previous `broadcast()` / `pipeline()` methods were unwired @experimental
92
+ * duplicates and were removed to keep one orchestration substrate.
383
93
  */
384
94
 
385
95
  declare class AgentOrchestrator {
@@ -392,28 +102,11 @@ declare class AgentOrchestrator {
392
102
  * Overwrites any agent with the same ID.
393
103
  */
394
104
  registerAgent(agent: BaseAgent): void;
395
- /**
396
- * Get a registered agent by ID.
397
- */
105
+ /** Get a registered agent by ID. */
398
106
  getAgent(agentId: string): BaseAgent | undefined;
399
- /**
400
- * Route a message to the best agent and execute.
401
- */
107
+ /** Route a message to the best agent and execute. */
402
108
  chat(message: string, context: AgentContext): Promise<AgentResponse>;
403
- /**
404
- * Execute a multi-agent pipeline where each step's output feeds the next.
405
- * @experimental — API may change. Use `chat()` for production workloads.
406
- */
407
- pipeline(steps: readonly PipelineStep[], input: string, context: AgentContext): Promise<AgentResponse>;
408
- /**
409
- * Broadcast a message to ALL registered agents in parallel.
410
- * Returns an array of responses (one per agent).
411
- * @experimental — API may change. Use `chat()` for production workloads.
412
- */
413
- broadcast(message: string, context: AgentContext): Promise<readonly AgentResponse[]>;
414
- /**
415
- * Check tenant quota before execution.
416
- */
109
+ /** Check tenant quota before execution. */
417
110
  private assertQuota;
418
111
  }
419
112
 
@@ -473,4 +166,4 @@ declare function checkAgentQuota(tenantId: string): Promise<{
473
166
  remaining: number;
474
167
  }>;
475
168
 
476
- export { AgentConfig, AgentContext, AgentMessage, AgentOrchestrator, AgentResponse, AgentRouter, type AgentsEnv, AgentsEnvSchema, BaseAgent, type CreateFallbackModelOptions, type EmbeddingFallbackOptions, FallbackProviderName, type FallbackResult, type GenerationCallOptions, type GenerationContext, type GenerationModality, type GenerationProvider, type GenerationResult, type ImageGenerationRequest, OrchestratorConfig, PipelineStep, RouterConfig, type TelemetryMetadata, type UserContext, type VideoGenerationRequest, _resetGenerationRegistry, buildPersonalizedSystemPrompt, buildSystemWithCache, buildTelemetryConfig, checkAgentQuota, clearMemory, createAgentContext, filterAvailableProviders, flushTelemetry, generateImage, generateVideo, getAgentsEnv, getMemory, initLangfuse, isLangfuseConfigured, isRetryableError, listGenerationProviders, mockGenerationProvider, registerGenerationProvider, renderUserContextBlock, runEmbedWithFallback, runWithFallback, saveMemory, withAnthropicCacheControl };
169
+ export { AgentConfig, AgentContext, AgentMessage, AgentOrchestrator, AgentResponse, AgentRouter, BaseAgent, OrchestratorConfig, RouterConfig, type UserContext, buildPersonalizedSystemPrompt, checkAgentQuota, clearMemory, createAgentContext, getMemory, renderUserContextBlock, saveMemory };