@axiom-lattice/protocols
v2.1.20
Published
Unified protocol type definitions for Axiom Lattice framework
Maintainers
Readme
@axiom-lattice/protocols
Unified protocol type definitions for the Axiom Lattice framework.
Overview
This package provides a collection of standardized protocol interfaces for the Axiom Lattice framework. These protocols define the contract between different components of the system, ensuring consistent behavior and interoperability.
Protocols
BaseLatticeProtocol: Base protocol for all lattice typesModelLatticeProtocol: Protocol for LLM model integrationToolLatticeProtocol: Protocol for tool executionAgentLatticeProtocol: Protocol for agent behaviorMemoryLatticeProtocol: Protocol for memory managementStorageLatticeProtocol: Protocol for data storageUILatticeProtocol: Protocol for UI componentsMessageProtocol: Protocol for standardized message communication
Usage
import {
ModelLatticeProtocol,
ToolLatticeProtocol,
MessageProtocol,
Message,
UserMessage,
AssistantMessage,
} from "@axiom-lattice/protocols";
// Implement a model lattice
class MyModelLattice implements ModelLatticeProtocol {
// Implementation details...
}
// Implement a tool lattice
class MyToolLattice implements ToolLatticeProtocol {
// Implementation details...
}
// Use message protocol for communication
class MyMessageHandler implements MessageProtocol {
// Implementation details...
// Example of creating a conversation
createConversation() {
const messages: Message[] = [
{
id: "user_1",
role: "user",
content: "Hello, can you help me?",
},
{
id: "asst_1",
role: "assistant",
content: "Of course! What can I help you with today?",
},
];
return messages;
}
}License
MIT
