Auto-Optimize your agent

The framework for building and auto-optimizing the agent harness and context — hit production accuracy in minutes, not months.

Install the SDK

pip install afnio
Swiss Re logo
Navis Bio logo
Flashka logo

Why Afnio

Ship 30% more accurate agents
from day one

Transparent op graph

Define your agent as ops with explicit context messages I/O. No opaque rewriting, no abstraction hiding the LLM calls. Every optimization change is a Python diff you can inspect and version-control.

harness.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Structural credit assignment

Afnio backpropagates textual gradients through the computation graph via the chain rule, delivering targeted feedback to each Parameter based on its specific contribution to the output.

Optimization Step #3
$ afnio learn --source production
parseretrievereasonrespondeval

Modular context

The context aggregates multiple Parameters — you set which to optimize and which to freeze. A shared Parameter accumulates feedback from every op that uses it.

system_prompt
$ python train.py

Batching as a primitive

Afnio Variables carry a batch dimension as tensors do. Ops broadcast over it through a simple sync interface, dispatching concurrent LLM calls and aggregating gradients automatically — no example lists, async plumbing, or retry loops.

batched.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Pricing

Start free,
scale when you’re ready

Free for solo developers, paid plans for teams in production.

See full pricing →
FREE
$0per user / month

For individuals getting started. Perfect for auto-optimizing simple agents with a small set of examples and monthly runs — no credit card required.

  • Up to 1 Seats 
  • 20 Private Runs/month 
  • 3 h/month Private optimize time 
Get started free
Most popular
PRO
$50per user / month

For teams with extended needs. Larger run quotas for auto-optimizing complex agents with more examples or weekly runs. Ship production agents that improve over time.

  • Up to 5 Seats 
  • 80 Private Runs/month 
  • 20 h/month Private optimize time* Additional hours billed at $1/hour
Get started free

Ship your first auto-optimized agent in minutes

Free to start. No credit card required. Build optimized agents in minutes.

Install the SDK

pip install afnio