hydro-project/infinity

AI Engineering

A Rust runtime for running many AI agents concurrently, hibernating idle ones and serving tools over a connectionless protocol.

348
32
Rust
Apache-2.0
6 months old

Infinity is a Rust framework for building highly concurrent agentic systems. Its pitch is that agents should not block while waiting on slow tools: a turn yields instead of holding a thread, and between turns an agent is only conversation data, so it hibernates at no cost until the next event arrives. The README claims the runtime is light enough to hold 75k agents in a Raspberry Pi's memory, and that the same agent code runs in a resident process or on serverless platforms such as AWS Lambda README.

How it works

The core abstraction is an agent system built with three stores in the sample: a conversation store, a state store and a model. The example constructs a local system with in-memory conversation and state stores plus a StaticModel, launches a thread, sends user text, and then receives events in a loop README. That event loop is the practical difference for callers: work is observed as events rather than as blocking calls.

A second mechanism is the Reactive Agent Protocol (RAP), which serves tools over the network without holding a connection open. Results and subscription events are delivered whenever they are ready, including to agents that currently have no process. Existing MCP servers reportedly run unchanged through a compatibility layer, and the specification is open for other implementations README. This matters if tools are slow or remote: an agent can be dormant while a tool runs and still be woken by the result.

Where it fits

The documented paths are the Infinity Runtime, with a quickstart and architecture guide, plus AWS Lambda deployment with included CDK constructs runtime overview, quickstart, serverless quickstart. RAP is documented separately RAP overview, and Infinity Code is a coding agent built on the runtime that runs builds and tests in the background and edits in parallel threads with stacked sandboxes, returning each result as a diff Infinity Code overview.

A concrete use case is an agent that dispatches a build or test job and then yields. The runtime does not keep a thread or connection alive while the job runs, and the result arrives as an event when the tool completes. The same pattern lets a serverless deployment scale to zero by default, since an idle agent costs nothing until the next message README.

Requirements and limits

The framework is written in Rust, and the sample uses the Rust API directly; the README does not document a non-Rust SDK. The local setup example uses in-memory stores, while serverless deployment is documented separately for AWS Lambda with CDK constructs README, serverless quickstart. The README gives no independent evaluation scope for the 75k-agent memory claim, and it does not describe compatibility beyond the AWS Lambda path or a formal security review. The project is Apache-2.0 licensed repository.

Written by AI from the project's README, updated October 29, 2026. The project's own docs are the source of truth.