#artificial-intelligence #llm #rag #openai

swiftide-docker-executor

A docker executor for swiftide agent tools

25 releases (6 breaking)

new 0.7.4 May 6, 2025
0.7.0 Mar 28, 2025

#1372 in Asynchronous

Download history 789/week @ 2025-01-18 324/week @ 2025-01-25 360/week @ 2025-02-01 677/week @ 2025-02-08 533/week @ 2025-02-15 815/week @ 2025-02-22 871/week @ 2025-03-01 295/week @ 2025-03-08 99/week @ 2025-03-15 255/week @ 2025-03-22 115/week @ 2025-03-29 413/week @ 2025-04-05 448/week @ 2025-04-12 137/week @ 2025-04-19 53/week @ 2025-04-26 206/week @ 2025-05-03

1,011 downloads per month
Used in kwaak

MIT license

62KB
1.5K SLoC

Swiftide Docker Tool Executor

A Tool executor meant to be used with Swiftide Agents.

Process is two-staged. First, configure the executor, then start it. The started executor implements ToolExecutor and can then be used in agents.

This executor is used mainly in kwaak. It is set up generically, is useable as an executor for any swiftide agent.

Usage


let executor = DockerExecutor::default()
    .with_context_path(".")
    .with_image_name("test")
    .with_dockerfile("Dockerfile.overwritten");

executor

let context = DefaultContext::from_executor(executor);

let agent = Agent::builder().context(context).build();

How it works

The executor communicates with docker over a grpc client build in swiftide-docker-service. The service is published on docker hub.

This gives more control than just relying on shell execution and enables future expansion.

When given a dockerfile, the executer copies the service from the swiftide-docker-service image, then starts it. Any existing CMDs or ENTRYPOINTs are removed.

For convenience, the executor only works with Ubuntu based images.

Dependencies

~24–39MB
~616K SLoC