Skip to main content

Core Types

ID

Unique identifier type used throughout the system.

TaskPriority

Priority levels for tasks.

TaskStatus

Execution status of tasks.

Configuration Types

OfficeLLMConfig

Main configuration for officeLLM instances.

ManagerConfig

Configuration for manager agents.

WorkerConfig

Configuration for worker agents.

Provider Types

ProviderType

Supported LLM provider types.

ProviderConfig

Union type for all provider configurations.

BaseProviderConfig

Common configuration properties for all providers.

OpenAIConfig

OpenAI provider configuration.

AnthropicConfig

Anthropic provider configuration.

GeminiConfig

Google Gemini provider configuration.

OpenRouterConfig

OpenRouter provider configuration.

Task Types

Task

Task definition for execution.

TaskResult

Result of task execution.

Provider Communication Types

ProviderMessage

Message format for LLM provider communication.

ToolCall

Tool/function call format.

ToolDefinition

Tool/function definition format.

ProviderResponse

Response format from LLM providers.

Legacy Types (Deprecated)

These types from the old architecture are maintained for backward compatibility but are not recommended for new code.

Expertise

Worker expertise definition (legacy).

Message

Inter-agent message format (legacy).

ToolResult

Tool execution result (legacy).

LLMConfig

LLM provider configuration (legacy).

AgentContext

Agent execution context (legacy).

RoutingDecision

Manager routing decision (legacy).

PerformanceMetrics

Agent performance tracking (legacy).

Type Guards

Provider Type Guards

Utility Types

DeepPartial

Make all properties of a type optional recursively.

ProviderConfigMap

Map of provider types to their configurations.

ExtractProviderConfig

Extract configuration type for a specific provider.

Zod Schemas

officeLLM uses Zod schemas for runtime type validation. Here are the schema definitions:

Usage Examples

Type-Safe Configuration

Runtime Type Checking

Generic Provider Functions