#llm #openai #rag #ai #data

swiftide-docker-executor

A docker executor for swiftide agent tools

16 releases (5 breaking)

new 0.6.3 Feb 19, 2025
0.6.2 Feb 13, 2025
0.5.0 Feb 9, 2025
0.4.2 Feb 2, 2025
0.1.1 Jan 6, 2025

#1278 in Asynchronous

Download history 592/week @ 2025-01-01 910/week @ 2025-01-08 1022/week @ 2025-01-15 417/week @ 2025-01-22 401/week @ 2025-01-29 366/week @ 2025-02-05 572/week @ 2025-02-12

1,861 downloads per month
Used in kwaak

MIT license

58KB
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

~22–37MB
~583K SLoC