Core interfaces and types for the EigenLayer AgentKit framework. This package provides the foundation for building verifiable AI agents with zkTLS proofs.
npm install @layr-labs/agentkit
# or
yarn add @layr-labs/agentkit
# or
pnpm add @layr-labs/agentkit
- Type definitions for zkTLS proofs and verifiable operations
- Interface definitions for verifiable inference adapters
- Interface definitions for verifiable logging adapters
- Common error types and utilities
import {
IVerifiableInferenceAdapter,
VerifiableInferenceResult,
Proof,
GenerateTextOptions
} from '@layr-labs/agentkit';
class MyInferenceAdapter implements IVerifiableInferenceAdapter {
async generateText(
prompt: string,
options?: GenerateTextOptions
): Promise<VerifiableInferenceResult> {
// Implementation here
}
async verifyProof(proof: Proof): Promise<boolean> {
// Implementation here
}
}
import {
IVerifiableLoggingAdapter,
VerifiableLogEntry,
Proof,
LoggingOptions
} from '@layr-labs/agentkit';
class MyLoggingAdapter implements IVerifiableLoggingAdapter {
async log(
data: unknown,
options?: LoggingOptions
): Promise<VerifiableLogEntry> {
// Implementation here
}
async verifyProof(proof: Proof): Promise<boolean> {
// Implementation here
}
async getLogEntry(id: string): Promise<VerifiableLogEntry | null> {
// Implementation here
}
async queryLogs(options: Record<string, unknown>): Promise<VerifiableLogEntry[]> {
// Implementation here
}
}
Represents a cryptographic proof that can be verified.
interface Proof {
type: string;
data: unknown;
timestamp: number;
metadata?: Record<string, unknown>;
}
Result of a verifiable inference operation.
interface VerifiableInferenceResult<T = string> {
content: T;
proof: Proof;
}
Interface for adapters that provide verifiable inference capabilities.
Interface for adapters that provide verifiable logging capabilities.
Thrown when proof verification fails.
Thrown when proof generation fails.
Please read the contributing guidelines in the root of the monorepo for details on our code of conduct and the process for submitting pull requests.
MIT License - see the LICENSE file for details.