Agent Focused Optimization framework for bounded agent optimization loops
Project description
AFO
Agent Focused Optimization (AFO) is a small Python framework for bounded agent optimization loops.
AFO separates the agent that chooses actions from the world model that verifies, evaluates, records, and checks convergence. The package is intentionally generic: users provide their own design space, evaluation model, tools, and convergence criteria.
Installation
python -m pip install afo
For local development from this repository:
python -m pip install -e .
Quick Start
Run the bundled quadratic smoke example:
afo run-example quadratic
Or run it from source:
python examples/quadratic/run_quadratic.py
Core Concepts
Agent: selects the next bounded tool call.ActionSpace: declares the tools the agent may use.DesignSpace: verifies proposed design variables.EvaluationModel: evaluates verified design variables.WorldModel: verifies, evaluates, records, and checks convergence.RunLoop: executes the default AFO loop.
Minimal Example
from afo.logical.world_model.evaluation_model import EvaluationModel
from afo.logical.world_model.evaluation_result import EvaluationResult
class MyEvaluationModel(EvaluationModel):
def evaluate(self, design_variable, evaluation_inputs=None):
return EvaluationResult(value=design_variable["x"] ** 2)
See examples/quadratic/ for a complete runnable example.
SysML
The repository includes AFO.sysml, the SysML source describing the framework
requirements, functional actions, logical contracts, and physical flow.
License
AFO is distributed under the GNU General Public License v3.0 only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file afo-0.1.1.tar.gz.
File metadata
- Download URL: afo-0.1.1.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3384194be0cdb2fc55f12c4c0fb5eb461090fddceaea3e8dfa00ecaa667889e9
|
|
| MD5 |
b58daefccd9d374791dd984b3cce8502
|
|
| BLAKE2b-256 |
7d7651fd33308375a683c5e707396504546d16e1b332ad66b52c12ac8f5a35b0
|
Provenance
The following attestation bundles were made for afo-0.1.1.tar.gz:
Publisher:
workflow.yml on triet228/AFO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
afo-0.1.1.tar.gz -
Subject digest:
3384194be0cdb2fc55f12c4c0fb5eb461090fddceaea3e8dfa00ecaa667889e9 - Sigstore transparency entry: 2256719947
- Sigstore integration time:
-
Permalink:
triet228/AFO@faadc14a08c7a90b9415bad9d00e23ced652f688 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/triet228
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@faadc14a08c7a90b9415bad9d00e23ced652f688 -
Trigger Event:
push
-
Statement type:
File details
Details for the file afo-0.1.1-py3-none-any.whl.
File metadata
- Download URL: afo-0.1.1-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cd82c5360bfdb924b96a7737137fc5589798b71bcd9d0e6f668d7a44674d7b4
|
|
| MD5 |
d065b4a4b8422133a1721123d004e4ba
|
|
| BLAKE2b-256 |
b6f6aec5db13c48779b12d95f12263ef73193a3984bdc05ef8809593e47b1b69
|
Provenance
The following attestation bundles were made for afo-0.1.1-py3-none-any.whl:
Publisher:
workflow.yml on triet228/AFO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
afo-0.1.1-py3-none-any.whl -
Subject digest:
9cd82c5360bfdb924b96a7737137fc5589798b71bcd9d0e6f668d7a44674d7b4 - Sigstore transparency entry: 2256719956
- Sigstore integration time:
-
Permalink:
triet228/AFO@faadc14a08c7a90b9415bad9d00e23ced652f688 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/triet228
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@faadc14a08c7a90b9415bad9d00e23ced652f688 -
Trigger Event:
push
-
Statement type: