Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
01cd8c1
feat: start implementing Agent Communication Protocol (ACP) server wi…
mrazza Jul 19, 2026
098ffff
refactor: rename Agent to Session
mrazza Jul 20, 2026
9b7ca3d
feat: add NewSessionRequest/Response types and start session creation…
mrazza Jul 20, 2026
65e566f
feat: implement session management and persistent state handling in A…
mrazza Jul 20, 2026
ceeabd9
feat: add support to stream message and thought content back to the c…
mrazza Jul 20, 2026
ed5d7c5
feat: implement streaming response support for session turns and add …
mrazza Jul 20, 2026
e2decee
refactor: extract streaming chunk processing to new converter module …
mrazza Jul 21, 2026
e267f07
feat: support context-aware tool execution where a context object is …
mrazza Jul 21, 2026
d718143
fix: content-length is case insensitive
mrazza Jul 22, 2026
f59bd52
fix: Improve Tool ctx object unwrapping by hiding the optional anyopa…
mrazza Jul 22, 2026
3a0f94b
feat: gracefully handle errors and report them to the ACP client
mrazza Jul 22, 2026
40e6dc7
feat: add jsonrpc to response messages
mrazza Jul 24, 2026
1fd20d0
refactor: improve tool context passing to not rely on anyopaque from …
mrazza Jul 25, 2026
6a7cc90
refactor: make comptime operations more explicit
mrazza Jul 25, 2026
f9cf8f0
feat: add support for session-scoped state data being exposed to tools
mrazza Jul 25, 2026
86eaffd
refactor: move SessionStorage to use StringHashMapUnmanaged rather th…
mrazza Jul 25, 2026
a08c1e6
feat: system prompt
mrazza Jul 25, 2026
2bbc692
feat: add the ability for tools to prepend context in a dedicated ste…
mrazza Jul 25, 2026
cdc80b7
refactor: improve structure of handling state and persistent context …
mrazza Jul 26, 2026
6751283
refactor: relocate todo tool to agent package and implement comprehen…
mrazza Jul 26, 2026
764e9b0
docs: add doc comments
mrazza Jul 26, 2026
1bfb2cd
feat: add support for tool call updates and results in ACP streaming …
mrazza Jul 26, 2026
1e25207
refactor: prepend injected context once per turn and support multi-pa…
mrazza Jul 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ var http_client: std.http.Client = .{ .allocator = allocator, .io = io };
var gemini_client = try provider.Gemini.init(allocator, &http_client, api_key);
var client = gemini_client.provider();

const agent_config: types.AgentConfig = .{
const session_config: types.SessionConfig = .{
.model = selected_model,
.tools = &[_]Tool{ weather_tool },
};

var agent = try Agent.init(allocator, io, client, agent_config);
defer agent.deinit();
var session = try Session.init(allocator, io, client, session_config);
defer session.deinit();

const result = try agent.executeTurn(.{ .prompt = "What is the weather in 90210?" });
const result = try session.executeTurn(.{ .prompt = "What is the weather in 90210?" });
```

## Project Structure
Expand Down
30 changes: 29 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ pub fn build(b: *std.Build) void {
},
});

const acp = b.addModule("acp", .{
.root_source_file = b.path("src/acp/root.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "agent", .module = agent },
.{ .name = "llm", .module = llm },
.{ .name = "testing", .module = testing },
},
});

// This creates a module, which represents a collection of source files alongside
// some compilation options, such as optimization mode and linked system libraries.
// Zig modules are the preferred way of making Zig code available to consumers.
Expand All @@ -78,6 +89,7 @@ pub fn build(b: *std.Build) void {
.{ .name = "llm", .module = llm },
.{ .name = "provider", .module = provider },
.{ .name = "agent", .module = agent },
.{ .name = "acp", .module = acp },
},
});

Expand Down Expand Up @@ -122,6 +134,7 @@ pub fn build(b: *std.Build) void {
.{ .name = "llm", .module = llm },
.{ .name = "provider", .module = provider },
.{ .name = "agent", .module = agent },
.{ .name = "acp", .module = acp },
},
}),
});
Expand Down Expand Up @@ -180,6 +193,7 @@ pub fn build(b: *std.Build) void {
"kcov-out/suite_3",
"kcov-out/suite_4",
"kcov-out/suite_5",
"kcov-out/suite_6",
});

for (coverage_test_suites, 0..) |suite, i| {
Expand Down Expand Up @@ -222,7 +236,7 @@ fn createTestSuites(
b: *std.Build,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
) [6]*std.Build.Step.Compile {
) [7]*std.Build.Step.Compile {
const llm = b.createModule(.{
.root_source_file = b.path("src/llm/root.zig"),
.target = target,
Expand Down Expand Up @@ -259,6 +273,17 @@ fn createTestSuites(
},
});

const acp = b.createModule(.{
.root_source_file = b.path("src/acp/root.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "agent", .module = agent },
.{ .name = "llm", .module = llm },
.{ .name = "testing", .module = testing },
},
});

const coma = b.createModule(.{
.root_source_file = b.path("src/root.zig"),
.target = target,
Expand All @@ -267,6 +292,7 @@ fn createTestSuites(
.{ .name = "llm", .module = llm },
.{ .name = "provider", .module = provider },
.{ .name = "agent", .module = agent },
.{ .name = "acp", .module = acp },
},
});

Expand All @@ -279,6 +305,7 @@ fn createTestSuites(
.{ .name = "llm", .module = llm },
.{ .name = "provider", .module = provider },
.{ .name = "agent", .module = agent },
.{ .name = "acp", .module = acp },
},
});

Expand All @@ -299,5 +326,6 @@ fn createTestSuites(
b.addTest(.{ .root_module = agent }),
b.addTest(.{ .root_module = llm_test_module }),
b.addTest(.{ .root_module = testing }),
b.addTest(.{ .root_module = acp }),
};
}
10 changes: 10 additions & 0 deletions src/acp/Config.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! Configuration of an ACP server.

const std = @import("std");
const Provider = @import("llm").Provider;
const SessionConfig = @import("agent").types.SessionConfig;

const Config = @This();

provider: Provider,
default_session_config: SessionConfig,
Loading
Loading