infy — Open-Source AI Agent Framework by Sayyed Hojjat Mousavinezhadinfy — Open-Source AI Agent Framework by Sayyed Hojjat Mousavinezhad

infy — Open-Source AI Agent Framework

Portfolio project
Sayyed Hojjat Mousavinezhad
infy — a zero-dependency, Rust-accelerated framework for building AI agents, with a
governance layer that makes it safe to give them real authority.
The problem
LangChain and LangGraph are heavy where it hurts: cold start, memory, and per-call overhead. And once an agent can touch shell, deploys, money, or customer data, "it probably did the right thing" is not good enough. You need proof.
What I built
A from-scratch Python runtime with no third-party runtime dependencies. The hot paths (JSON parsing, similarity, tokenization) run through a compiled Rust extension that falls back to pure Python when it is absent. It ships a chat-model abstraction, composable runnables, structured output, tool-calling agents, and a Pregel-style stateful graph executor with checkpointing and human-in-the-loop interrupts, sync and async throughout. It is LangGraph-compatible and Apache-2.0.
Three pieces I am proudest of:
Tool routing instead of injection. A ToolRouter keeps a one-line summary of the whole catalogue in the prompt and promotes full schemas only for the tools a turn needs. On a 120-tool catalogue that cuts tool-payload context 8.6x.
Governance you can prove. An optional control plane policy-checks every tool call in-process: deny-by-default and fail-closed, with a human approval gate and durable approvals bound to the exact action (TOCTOU-safe). Every step lands in a SHA-256 hash-chained audit log. The demo above runs a production incident end to end: a denied database drop, a suspended deploy, a human approval hours later, and a receipt that cannot be edited without the chain saying so.
Memory with two clocks. BiTemporalMemory stores facts on valid time and transaction time separately, so history is never rewritten and corrections stay auditable.
Honest performance
Framework overhead is isolated by porting real LangChain and LangGraph projects to infy over a shared deterministic offline leaf and verifying byte-identical output before any number is trusted. Only the orchestration differs, so the difference is the framework.
Cold start (import + compile): 8.6x faster
Resident memory: 5.4x lighter
Per-invocation framework overhead: 21x lower
Tests: 411 passing
Open source: github.com/Infyrence/infy
Docs: docs.infyrence.com

0 likes · 1 view · Nov 10, 2026

Open-source AI agent framework with a Rust-accelerated runtime, stateful graph execution, and governance with human approval gates and audit logging.

Tags