From e8272efd9f71ad27a0e62b6b3fa3d13e99a6736f Mon Sep 17 00:00:00 2001 From: T Date: Mon, 25 May 2026 12:19:50 -0700 Subject: work --- libpanto/src/agent.zig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libpanto/src/agent.zig (limited to 'libpanto/src/agent.zig') diff --git a/libpanto/src/agent.zig b/libpanto/src/agent.zig new file mode 100644 index 0000000..7ebc058 --- /dev/null +++ b/libpanto/src/agent.zig @@ -0,0 +1,23 @@ +const std = @import("std"); +const provider = @import("provider.zig"); +const conversation = @import("conversation.zig"); + +pub const Agent = struct { + provider: provider.Provider, + allocator: std.mem.Allocator, + + pub fn init(allocator: std.mem.Allocator, prov: provider.Provider) Agent { + return .{ + .provider = prov, + .allocator = allocator, + }; + } + + pub fn runStep(self: Agent, conv: *conversation.Conversation, receiver: *provider.Receiver) !void { + try self.provider.streamStep(conv, receiver); + } + + pub fn deinit(self: Agent) void { + self.provider.deinit(); + } +}; -- cgit v1.3