add A2A swarm agent with DHT-based discovery and multi-server guide
This commit is contained in:
22
build.zig
22
build.zig
@@ -646,6 +646,28 @@ pub fn build(b: *std.Build) void {
|
||||
const run_a2a_conversation_step = b.step("run-a2a-conversation", "Run autonomous A2A conversation between two agents");
|
||||
run_a2a_conversation_step.dependOn(&run_a2a_conversation.step);
|
||||
|
||||
// A2A Swarm Agent (DHT-based agent discovery + A2A messaging)
|
||||
const swarm_agent_module = b.createModule(.{
|
||||
.root_source_file = b.path("examples/a2a/swarm_agent.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
swarm_agent_module.addImport("p2p", p2p_module);
|
||||
swarm_agent_module.addImport("network", network_module);
|
||||
swarm_agent_module.addImport("protocol", a2a_protocol_module);
|
||||
|
||||
const swarm_agent = b.addExecutable(.{
|
||||
.name = "swarm-agent",
|
||||
.root_module = swarm_agent_module,
|
||||
});
|
||||
b.installArtifact(swarm_agent);
|
||||
|
||||
const run_swarm_agent = b.addRunArtifact(swarm_agent);
|
||||
run_swarm_agent.step.dependOn(b.getInstallStep());
|
||||
if (b.args) |args| run_swarm_agent.addArgs(args);
|
||||
const run_swarm_agent_step = b.step("run-swarm-agent", "Run DHT-based A2A swarm agent");
|
||||
run_swarm_agent_step.dependOn(&run_swarm_agent.step);
|
||||
|
||||
// Resume test
|
||||
const resume_test_module = b.createModule(.{
|
||||
.root_source_file = b.path("examples/resume_test.zig"),
|
||||
|
||||
Reference in New Issue
Block a user