← Back to archive

Repo of the Day

hydro-project/infinity

Published: Nov 8, 2026

Open repository ↗

An agent runtime and tool protocol for principled agent concurrency

Summary

Infinity is a Rust framework for building agent systems in which many agents can wait for slow tools without blocking a worker. Between turns, an agent is represented by its conversation history; it has no running task, stack, or open connection, so the runtime can let it hibernate until another event arrives. The repository also defines the Reactive Agent Protocol (RAP) for exposing tools over a network without requiring a continuously connected agent process.

What it is useful for

Infinity is useful when many agents need to wait on slow tools or receive delayed results. An agent waiting for one tool does not need to occupy an active execution thread, while other agents can continue. Its coding-agent example, Infinity Code, runs builds and tests in the background, streams their output, performs edits in parallel threads with stacked sandboxes, and returns each result as a diff to review.

For networked tools, RAP delivers results and subscription events when they become ready, even if the calling agent has no live process. Existing MCP servers are supported through a compatibility layer, which matters when deciding whether to expose a server directly through RAP.

The README says the same agent code can run in a laptop-resident process or on AWS Lambda, where scale to zero is the default. It also gives a concrete scale claim: 75,000 agents fit in a Raspberry Pi’s memory. However, the README does not explain the measurement conditions, so treat that as a stated capacity example rather than a general guarantee.

How engineers can use it

The documented local path is to construct the runtime with conversation and state stores, attach a model, start the system, launch a thread, and consume its events:

let system = AgentSystemBuilder::new_local(
    InMemoryConversationStore::new(),
    InMemoryStateStore::new(),
    StaticModel::new(provider, "global.anthropic.claude-sonnet-4-6").await?,
)
.start();

let mut thread = system.thread_builder().launch().await;
thread.send_user_text("Write a haiku about Rust").await?;

while let Some(event) = thread.recv().await {
    println!("{event:?}");
}

Here, StaticModel uses the configured provider and named model; sending “Write a haiku about Rust” demonstrates the request and event flow. For tools reached over a network, implement or adapt them to the open RAP specification instead of requiring a persistent agent connection. For serverless deployment, the linked Lambda guide includes CDK constructs.

Setup is only partly specified in the supplied README: it does not give dependency installation, credential setup, or a runnable shell command, and the example assumes provider is already configured. Follow the repository README and the runtime quickstart for current setup steps. Also check the RAP specification for protocol details; the README provides no compatibility matrix.