Appearance
Faimulus TypeScript API / @faimulus/driver-sdk
@faimulus/driver-sdk
TypeScript contracts for extending Faimulus with AI provider, memory, toolset, and channel drivers.
The package contains interfaces and types only. Driver implementations remain in your application workspace and are loaded by the Faimulus runtime.
Installation
sh
npm install @faimulus/driver-sdkDriver definitions
Import the contract for the driver type you are implementing:
ts
import {
AiProviderDefinition,
ChannelDriverDefinition,
MemoryDriverDefinition,
Toolset,
} from "@faimulus/driver-sdk";An AI provider driver, for example, exports a definition that creates models from validated configuration:
ts
import type { AiProviderDefinition } from "@faimulus/driver-sdk";
export const provider: AiProviderDefinition = {
type: "example",
displayName: "Example AI",
configSchema: {
type: "object",
additionalProperties: false,
},
async createModel(config) {
return {
async execute(request) {
return { input: request.input, config };
},
};
},
};Workspace driver manifests target SDK API version 1. Keep the SDK version used to compile a driver compatible with the Faimulus runtime that loads it.
Agent-capable provider drivers receive provider-neutral AgentMessage values. A tool result includes toolCallId, the workflow-visible tool name, and serialized content; adapters must preserve the call ID and translate the name to the provider's wire format.
For complete implementations, see the sample app:
- OpenAI provider
- Anthropic provider
- Google provider
- OpenAI-compatible provider
- File memory
Faimulus ecosystem
- GitHub repository - source code, issues, and releases
- Documentation - workspace layout, configuration, and runtime behavior
- Sample app - a complete application and ready-to-run workspace
- Docker image - the published Faimulus server runtime
License
Interfaces
- AgentCapableModel
- AgentTool
- AgentToolCall
- AgentTurnRequest
- AiModel
- AiModelRequest
- AiProviderDefinition
- AiUsage
- ChannelActionDefinition
- ChannelDiagnostic
- ChannelDriverContext
- ChannelDriverDefinition
- ChannelEvent
- ChannelInstance
- ChannelInteractionQuestion
- ChannelInteractionRequest
- ChannelInteractionResolvedRun
- ChannelLogger
- ChannelMessageSubmission
- ChannelOutboundReceipt
- ChannelOutboundRequest
- ChannelRunCompletion
- ChannelStatus
- ChannelSubmittedRun
- ChannelWorkflowDescriptor
- DriverManifest
- FileMemory
- KeyValueMemory
- MemoryDriverContext
- MemoryDriverDefinition
- ScopedChannelSecretStore
- ScopedChannelStore
- ToolCallRequest
- ToolDefinition
- Toolset
- ToolsetBinding
- WorkflowMemoryTarget
Type Aliases
- AgentMessage
- AgentTurnResult
- ChannelPresentationBlock
- ChannelState
- ChannelWorkflowRunResult
- DriverKind
- JsonObject
- JsonSchema
- JsonValue
- Memory
- MemoryKind
- MemoryScope